User Limits are a functionality through which users can configure a comparison between inputs, so an output or an interrupt can be triggered when the comparison happens.
A User Limit will evaluate conditions set by the user. These conditions will be processed in the firmware of the RMP. When these conditions are met, the User Limit will generate an interrupt and can also output 32-bit word to any location in the MotionController firmware.
Each User Limit supports up to two input conditions and one output configuration block.
User Limits are best suited for real-time logic processing that must happen in RMP firmware, not in the user application.
- 1.When you want to generate an action based on a digital input state change.
- 2.When you want to generate an action based on two different input state changes.
- 3.When you want to generate an action based on a specific encoder/axis position.
- 4.When you want to trigger a digital output when an Axis’ Actual Position is exceeded.
Where output actions are:
- Axis ESTOP
- Axis STOP
- Axis ABORT
- Digital Output State Change
- Proportional Gain Change
- Monitor Different Variables
The client has a high-speed conveyor machine that sorts and packages seed packets. They needed to increase the throughput of their machine but were limited by their PLC because the I/O latency was too high. High-speed sorting and packaging machines require high-speed and deterministic IO. Using User Limits, the client was able to set up a comparison of the conveyor position and the location of the packet that is monitored in controller firmware. As soon as the seed packet reached the diverter position, the User Limit comparison became true and fired the “extend” digital output within 1 EtherCAT sample (this system sample = 1 ms) to extend the appropriate actuator and divert the packet into its box.
- 1.This method should be called first. UserLimitConditionSet() configures user limits to evaluate an input bit. It sets a condition for when the user limit should trigger.
- 2.To track more complex input bit addresses, user can get the address from VM3 or contact us.
A user wants to compare the input condition of only a single axis position. If user intends on tracking two input conditions, call the function twice using 0 for the first condition and 1 for the 2nd condition.
If the user wants the User Limit to trigger when axis-0 position is greater than 2000 counts, then 2000 would be the limitValue.
For a Digital Input Slice I/O, if the 4th bit is changing then the user would simply enter: 0x00010000.
UserLimitConfigSet(int number, RSIUserLimitTriggerType triggerType, RSIAction action, int actionAxis, double duration)
Call this method after UserLimitConditionSet(). This method configures a User Limit and enables it.
UserLimitOutputSet(int number, int andMask, int orMask, ulong outputPtr, bool enabled)
Call this method after UserLimitConfigSet(), but only if you want to configure an output to be triggered. The output will only be triggered when the User Limit is triggered.
- It is important to know that our API reserves a user limit per every axis.
- The RMP controller has up to 2048 User Limit objects.
- UserLimitCountSet should be done after either setting AxisCountSet and/or starting the network. (Internally, RapidCode Axis objects use UserLimits.) UserLimitCountSet must be called before creating an Axis or MultiAxis object with MotionController::AxisGet() or MotionController::MultiAxisGet().
- User Limits are “zero” ordinate when accessing them.
Are User Limits monitored cyclically like PLC?Yes, User Limit objects are running inside the real-time motion firmware and they are cyclic (processed every cycle).