Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

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

Disable and Enbale Device Functions in PLC program

Disable and Enbale Device Functions in PLC program

CQ2023
Member

Our customers add axes with different configuration in the slave, these axes can't be used at the same time , but share the same programs. Is there some function block to enable or disable these slave device in programs?

Just like the operation as below:

CQ2023_0-1687253744089.png

CQ2023_1-1687253767687.png

 

 

 

3 REPLIES 3

CodeShepherd
Community Moderator
Community Moderator

Are these simple IOs or even motion axes that should be controlled via ctrlX MOTION?

My main question is how are these IOs in the PLC program addressed and then programed?Could you tell us some more what you want to achieve how your programing looks like?

In our "Template for cartesian handling systems V1.0" we created methods accessing partially the same IO range and only one is called depending on the configuration. These IOs have always a fix address but do not necessarily be all available.

ctrlX PLC Engineering cartesian template IO addresses and method callsctrlX PLC Engineering cartesian template IO addresses and method calls

ctrlX PLC Engineering cartesian template redundant addressing of IOsctrlX PLC Engineering cartesian template redundant addressing of IOs

Sorry, I didn't describe it clearly, and thank you for your answer.

these motion axes are controlled via softmotion.

I don't have customer's programs here, so I drew a diagram to show the actual situation.

CQ2023_0-1687850502316.png

In the picture, they configured a fixed number of slaves (four drives) in the PLC project to run the program. But in reality, there are two different configurations of slaves in the control network, and it is necessary to switch from one slave to another at different stages during the program running. (For example, from 4 to 3 drives). These two phases have the same control program, just using different number of drives. So in this case one drive must be automatically disabled by the program, otherwise the communication will be wrong.

Is there any way to solve this problem without having to disable the drive offline by hand?

 

CodeShepherd
Community Moderator
Community Moderator

Moved topic to coresponding sub forum CODESYS - PLC Add-ons.

So you really are changing the configuration of ther EterCAT fieldbus? Or how do you switch between the topologies?

EtherCat can actually not perform any hot plug functionality and in the actual state will give addresses automatically depending on the topology. See online documentation.

You can switch up the EtherCat partially to OP and not all modules need to be attached. In standard all data is transmitted in one package and as soon as one datum is faulty all data will get invalid. But several data packages can be set up that are checked individually. This is handled via so called "sync units" (see docu). So if a missing slave is another sync unit then the rest, the bus can go up.

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