Create Soft/Phantom/Custom EtherCAT I/O?

There are times when we could use software/phantom I/O points when it’s difficult or expensive to collect the hardware to do it. For development/testing, it would be a great convenience if we could create and control an I/O (more precisely, an input) that more-or-less behaved like one of the Real™ EtherCAT I/O points.

What options do we have?

  • Do phantom motors have I/O?
  • User Buffers (almost nothing documented about this feature—or, at least, I can’t find any)
    • While these are memory addresses for which I can access with block I/O, use in user limits, etc., I’d have to create my own “I/O” points for them and they would appear distinct from any genuine EtherCAT I/O, right?
  • Is there any way for me to actually control an (otherwise unused) EtherCAT input?
  • Can alterations to the EtherCATNodeInfo.xml file allow me to associate an I/O point with some memory address on the drive (I realize this would probably be manufacturer-specific) that I could control with SDOs or something that would effectively give me programmatic control of an input?

One specific instance when I could use this is for probing. If I could control an input based on the axis position, then I could assign that I/O point as the probe input (in our software) and get something very similar to a probe (without requiring purchasing a probe and setting up a mechanical system in which the physical probe would get triggered).

This certainly wouldn’t be a good test of probing in general, but it would allow us to test portions of our probing code that only care that there’s an operable probe input.

All axes including phantoms have general io associated with them. Most of the time there is nothing associated with them except in the cases of a few dedicated (P-OT, N-OT, Home and not always these).

User Buffers are really just memory that can leveraged by the user. We don’t do anything with them except create access so you can store and retrieve values from them. Sorry, there isn’t a way to make an IOPoint from them from our api.

I haven’t added a way to overwriting an input. We generally want the real info provided. There could be some simulation cases where it might be helpful to pretend we getting something else back. We just haven’t had a need to add such a feature yet.

You can use EtherCATNodeInfo.xml to change the PDOs and entries exchanged with a drive. This could get any drive memory associated with a Network Input or Output. We don’t currently have a way to create an IO point with Network Inputs and Outputs.

I’ve created a story to expand IOPoint to include Network Inputs and Outputs and potentially any controller memory as an Input (Output to any location seems unsafe). Please work with Raj to get these moved up in priority on our backlog.

You could use a UserLimitOutputSet to capture information when its condition (such as Position or an Network Input/Output hit a target). You specify an outputPtr such as a User Buffer. You specify conditions as normal for an UserLimit. You specify an inputPtr to the source address (position or some other info you find valuable).