AngryRobot

Setting up EtherCAT or EthernetIP devices from within PLC program?

5 posts in this topic

Is it possible to setup Ethercat parameters from within the PLC program?  I am facing a situation where a machine is going to have changeable tooling fixtures and each fixture is going to have an EtherCAT device on it.  I am guessing they will need to be setup to look like the same node to the PLC, but they will have different physical IDs and different settings for some of the parameter fields.  They will be the same device so they will have the same parameter fields, just different values in those fields.

I can also get these devices with EthernetIP as the fieldbus option.  In that case I would always have a network error because the PLC would always see one of the devices missing from the network.  is it possible to enable/disable Ethernet connections from within the program logic to avoid the error?

Share this post


Link to post
Share on other sites

I would set different addresses for each of the different devices and then use the EC_ChangeEnableSetting Function block.  You can enable those that are present and disable those that are not.

There are also status flags that start with _EC for instance, _EC_DisableSlavTbl is an array of bits that tell you which nodes are disabled.  

Share this post


Link to post
Share on other sites

Thanks!  Looks like that is what I need.  Luckily I think we've been able to redesign the machine so that I won't have an individual device on each fixture now, so it has simplified things for me.

Share this post


Link to post
Share on other sites

I have finally gotten the chance to test this and I've got one issue.  I have no control over when the operator might disconnect the fixture cable.  I have it programmed with a "Remove Fixture" button that disables all of the enabled Ethercat nodes and prevents errors.  If the operator removes the cable before pressing the button though the disable function block will not disable the node, which leads to an EC error that can't be reset because an enabled device is disconnected.

Does anyone know any tricks to force it disabled, even if the FB doesn't want to?

Share this post


Link to post
Share on other sites

How about a cable connector with an auxiliary contact?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now