InterruptUserDataGet with LIMIT_ERROR

How does one properly use InterruptUserDataGet()?
The example code in the doc seems only to pertain to user limits (the function isn’t invoked in the sample).

In particular, for a RSIEventTypeLIMIT_ERROR, I want to get the commanded and actual positions (that caused the error), and retrieving the instantaneous values for those doesn’t always get the data that caused the problem.

Are there predefined “user data” items for each interrupt type?

I see that InterruptUserDataDoubleGet() does have a sample that employs the API function. What I don’t see is a description of which indices exist for which event types.

Is this published somewhere?

Good questions. At present the RapidCode API only gives you programmable access to the Interrupt UserData for UserLimits with MotionController::UserLimitInterruptUserDataAddressSet().

In theory, each type of Interrupt supports up to five unique UserData values, so we’ll need to add the RapidCode API to allow you to specify the UserData addresses for various interrupt types. How’s that sound?

1 Like

That sounds reasonable.

I presume these will be methods of the RapidCodeInterrupt class?

Yes, exactly. Something like this:

1 Like

This looks well thought out. Thanks, @scott.

It’ll be released with 10.5.4. No release date set yet, let us know if you want it scheduled soon.

This feature was released in 10.5.4 on July 10, 2024.