Detect Specific Condition: Position Error/Limit Error

How do I detect specifically whether a position error is the source of a drive fault?

When checking for Motion out of Frames, we have to get the value at address RSIMultiAxisAddressTypeMOTION_STATUS and check for the bit RSIFirmwareStatusOUT_OF_FRAMES.

Is there a corresponding flag for position error limit exceeded? RSIFirmwareStatusMOTOR_LIMIT? I’m trying to avoid calling RapidCodeMotion::SourceGet() because it’s so slow.


Axis::StatusBitGet(RSIEventType.RSIEventTypeLIMIT_ERROR) is about twice as fast as SourceGet() from my testing.

The MotionStatus address you already use will contain a hint but not a specific mask for what you want… 0x80000000 is MOTOR_LIMIT status which combination of (Amp Faults, Amp Warnings, Feedback Faults, Torque, HW&SW Pos&Neg Limits and ErrorLimits). It will show up for any of them.

1 Like

Is there a piece of block I/O that will get the status word (or is this a host-memory-only kind of check)?
RSIAxisAddressTypeSTATUS, maybe?


You can use Axis::NetworkIndexGet(NetworkIndexTypeSTATUS_WORD_INDEX) with MotionController::NetworkInputAddressGet(returnIndex) to get the host address. This only works for axes which have a StatusWord specified in EtherCATNodeInfo.xml.

You can also access the value directly via NetworkNode::StatusWordGet(axisIndex) A function that should likely be under MotionController as it takes any Axis Index rather than the index associated with the node.

Is StatusWordGet() going to access host memory or require a cycle of EtherCAT traffic (like an SDO)?
(I’m concerned about speed here).

Can I ((StatusWordGet() & RSIEventTypeLIMIT_ERROR) == RSIEventTypeLIMIT_ERROR) to detect a position/limit error? The DSP402 document I have doesn’t show any bits of the status word that indicate a position error.

I’m not so much asking about the status word as about quickly detecting whether a position error has occurred.

StatusWordGet returns the most recently updated value. We get it cyclically so there is no need to fetch it. This returns the CiA DS402 status word of a drive following that profile. This is a different thing than the Logical objects in our Motion Controller. I’m afraid the most common ErrorLimit uses are entirely a MotionController feature. You can also setup something different in the drive but we don’t recommend it. Stick to settings which protect your hardware and represent as Amp Faults or End of Travels.

I have created a story to implement a new AddressGet Option that will allow you to read each of the MotorLimits such as Error Limit. I’ll try to get it in the next release for you.

1 Like

Thanks, Jacob. Until then, I’ll use Axis::StatusBitGet().