- ๐ง Setup
- ๐ Get started
- ๐ Concepts
- โ๏ธ Software APIs
- ๐ฅ๏ธ Software Tools
- โ FAQ
- Changelog
![]() |
APIs, concepts, guides, and more
|
Implement User Limits to configure and trigger actions based on specific input conditions in real-time.
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.
Where output actions are:
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.
Parameter | Definition |
---|---|
int number | Enter the user limit number that will be used. Starts from 0 and goes to (UserLimitCountGet โ 1. |
int conditionNumber | Enter 0 or 1 to define the number of input conditions to be processed. Maximum of two input conditions can be combined with AND or OR logic. ConditionNumber would be set to 0 to compare one input bit. ConditionNumber would be set to 1 to compare two input bits. |
RSIUserLimitLogic logic | Represents logic that user will need to select to select how an input value is compared. See Enumerations below for valid options. Ex: user wants to compare an actual position to see when actual position is greater than 2000 counts. User would have to enter RSIUserLimitLogicGT |
ulong address | User needs to enter the address of the input. User can call Axis.AddressGet(), MotionController.AddressGet(), or MotionController.NetworkInputAddressGet() to get the address of a particular input. |
int mask | Decide the bits in an address which need to be used when comparing. Use 0xFFFFFFFF when all bits should be considered. (only applicable when the Conditionโs DataType is a 32-bit integer or bitmask) |
int limitValue | The value to be compared which needs to be set here. |
Parameter | Definition |
---|---|
int number | Enter the user limit number that you are setting up. Starts from 0 and goes to (UserLimitCountGet โ 1). |
RSIUserLimitTriggerType triggerType | Choose the how the condition<em>(s) should be evaluated. ![]() |
RSIAction action | Choose the action you want to cause when the User Limit triggers. ![]() |
int actionAxis | Select the axis that the action (defined above) will occur on. |
double duration | Enter the time delay (in seconds) before the action is executed after the User Limit has triggered. Resolution of the duration is sample periods (default is 1ms). |
Parameter | Definition |
---|---|
int number | Enter the user limit number that you want to configure to trigger an output. Starts from 0 and goes to (UserLimitCountGet โ 1). |
int andMask | This is a 32-bit AND mask. andMask is always computed before orMask. Bit mask will be AND-ed with the data pointed by the ulong outputPtr. |
int orMask | This is a 32-bit OR mask. Bit mask will be OR-ed with the result of (andMask & outputPtr). |
ulong outputPtr | Pointer to any location in the motion controller firmware. This is a host address, like the values returned from AddressGet(...) methods. |
bool enabled | If TRUE, the output AND-ing and OR-ing will be executed when the User Limit triggers. |
Trigger: Digital Input
Conditions: 1
This sample code is done in AKD Drive with one Actual axis. There are a lots of available/free firmware address. Some are suggested in comment. Available/free firmware address can be found using vm3 as long as there is no label on address, it can be used.
Trigger: Digital Input
Conditions: 2
This sample code shows how to configure the RMP controller's User Limits to compare an two different input bits to a specific signal (high signal (1) OR low signal (0)). If the (2 conditions) patterns match, then the specified output bit is activated (turns high).
The INPUTS are specified in two different UserLimitConditionSet()
The OUTPUT is specified in UserLimitOutputSet()
In this example Beckhoff IO Terminals (Model EL1088 for Inputs and Model EL2008 for outputs) were used to control the Digital IO signals. Make sure to check the correct digital IO signal indexes of your system in:
RapidSetup -> Tools -> NetworkIO
Trigger: Digital Input
Conditions: 1
Event: EStop
This sample code shows how to configure a RMP controller's User Limit to compare an input bit to a specific signal (high signal (1) OR low signal (0)). If the (1 condition) pattern matches, then the specified input bit has been activated (turned high) and a User limit Event will trigger. In this example we configure a user limit to trigger when our INPUT turns high(1). Once the INPUT turns high(1) then our user limit will command an E-Stop action on the Axis and store the Axis Command Position. The INPUT is specified in UserLimitConditionSet()
The User Limit configuration is done on UserLimitConfigSet()
The specified address to record on User Limit Event is specified in UserLimitInterruptUserDataAddressSet()
The Data from the speficified addres is retrieved by calling InterruptUserDataGet()
In this example Beckhoff IO Terminals (Model EL1088 for Inputs) were used to control the Digital IO signals. Make sure to check the correct digital IO signal indexes of your system in:
RapidSetup -> Tools -> NetworkIO
Trigger: Position
Conditions: 1
Event: FeedRate
Configure a UserLimit to change the FeedRate when the axis has reached a specified position.
Trigger: Position
Conditions: 1
Event: Abort
Configure a User Limit to call abort when a specified position is reached.
Custom
Configure two UserLimits. The first will trigger on a digital input and copy the Axis Actual Position to the UserBuffer and decelerate to zero velocity with TRIGGERED_MODIFY.
The second UserLimit will trigger after the first UserLimit triggers and the Axis gets to IDLE state and it will directly set the command position of an Axis from the position stored in the UserBuffer.
Trigger: Math Block Process Value
Conditions: 1
Event: Abort
This sample code demonstrates how to use a MathBlock to calculate the difference of in position between two axes and trigger a UserLimit when the difference exceeds a certain value.