cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

PLC Open bb, Ab and AF from S-0-0135 Status Word

PLC Open bb, Ab and AF from S-0-0135 Status Word

bclapperton
New Contributor

With PLCOpen  (maybe also with AxisInterface) I can't see how to access the power up status of a drive ie. bits 15/14 of S-0-0135 Status Word. I want to use the status bits in some logic for MC_Power.Enable so I don't enable when there is no power. 

I could do a non real time access to the datalayer but I would prefer to use the cyclic data from S-0-0135.

bclapperton_0-1684821028050.png

 

 

8 REPLIES 8

stefanAT_ctrlX
New Contributor

I just looked in the PLC but could not find a function for that.

But you could read the S-135 in the PLC programm. Or is this way not what you want.

I just tried in my PLCopen test programm: It works:

1) Import at Datalayer-Realtime node:

stefanAT_ctrlX_0-1684854358900.png

 

2) Then you have i.e. at %IW0 the state word S-135 (in my case)

 

stefanAT_ctrlX_1-1684854390332.png

3) Then it's clear for you:

stefanAT_ctrlX_2-1684854517099.png

Regards,

Stefan

Thanks @stefanAT_ctrlX 

Please keep in mind that axis bits like bb, Ab and AF are not part of PLCopen state machine.

@bclapperton you can also have a look in our template for cartesian handling systems. There we also process the bits out of the status word:

Declaration:

 

...
AxisY_StatusWord      AT %IW200	 :	WORD;  // S-0-0135 Drive status word
AxisY_bb_relay           AT %IX202.0	 :	BOOL;  // P-0-0115.0 Drive status word (bb signal)      
AxisY_in_Ab_AH_AF    AT %IX200.15  :	BOOL;  // S-0-0135.15 Drive status word (Ab,AH,AF signal) 
AxisY_to_Ab               AT %QX202.0  :	BOOL;  // S-0-0240 DC Bus Power Control (Swith to Ab signal)
...

 

Implementation:

 

...
// check if DC bus is OK (all axis in AB,AH,AF)
bDCBusLoaded := AxisX_in_Ab_AH_AF AND AxisY_in_Ab_AH_AF AND AxisZ_in_Ab_AH_AF AND AxisX2_in_Ab_AH_AF AND AxisZ_in_Ab_AH_AF AND AxisY2_in_Ab_AH_AF AND AxisZ2_in_Ab_AH_AF AND AxisLin_in_Ab_AH_AF;

// check all axis in AF
bAllAxesInAF :=  bDCBusLoaded          AND_THEN
                 AxisX_StatusWord.14   AND_THEN 
                 AxisY_StatusWord.14   AND_THEN 
                 AxisZ_StatusWord.14   AND_THEN 
				 AxisX2_StatusWord.14  AND_THEN 
                 AxisY2_StatusWord.14  AND_THEN 
                 AxisZ2_StatusWord.14  AND_THEN 
				 AxisLin_StatusWord.14 OR_ELSE (bRealAxis=FALSE);
...

 

 

Thanks @CodeShepherd 

It is sad that these signals were not included in MC_ReadStatus.

The PLC mapping method above needs to be manually addressed. This is not good for projects with many axes. 

I'm looking for a way to use an AXIS_REF variable to look them up. 

I'm happy to use a DL_ReadNode even though it is not real time. I just need a datalayer node with the same name as my AXIS_REF variable and build the nodename using string functions.  

I can't see a statusword node under motion/axs/...  Let me know if there is one. 

 

The motion does not have a drive status word node. Also in the axisprofile it the setting parameter where the profile is looking for the data.

For your case you could do it more dynamic:

  • Do a DL_BrowseNode no path "fieldbuses/ethercat/master/instances/<<name_of_instance>>/realtime_data/input/data" to see all connected IO slave modules that provide input data. You will get a list of strings also including all axis names.
  • Do a loop with DL_ReadNode to the data e.g. "fieldbuses/ethercat/master/instances/<<name_of_instance>>/realtime_data/input/data/<<name_of_axis>>/AT.Drive_status_word" and exchange the axis name with read names or your AXIS_REF.

We are currently discussing and working on a data source like AxisData known from the MLC but there is no release date for this.

Thanks @CodeShepherd 

I look forward to having a ctrlX version of AxisData!

PADE
Established Member

Hello, is  there any update whether some Status information would be available in incoming releases? I would really expect some data available to make programming more efficient (as we promise everywhere;)).

Thanks a lot.

CodeShepherd
Community Moderator
Community Moderator

Current time scheduler is set to next year but I cannot tell a exact date. Please keep in mind that this has nothing to do with PLCOpen as it was mentioned in the header of this topic.

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist