Console.WriteLine("📜 User Limit: Digital Input Two Condition");
try
{
controller.UserLimitCountSet(1);
controller.InterruptEnableSet(true);
controller.UserLimitConditionSet(
number: 0,
conditionNumber: 0,
userLimitMask: (uint)input0.
MaskGet(),
limitValueUInt32: (uint)input0.
MaskGet());
controller.UserLimitConditionSet(
number: 0,
conditionNumber: 1,
userLimitMask: (uint)input1.
MaskGet(),
limitValueUInt32: (uint)input1.
MaskGet());
controller.UserLimitConfigSet(
number: 0,
actionAxis: 0,
duration: 0);
controller.UserLimitOutputSet(
number: 0,
enabled: true);
Console.WriteLine("Waiting for both inputs to trigger...");
throw new Exception("ERROR: Output should not be triggered yet");
controller.MemorySet(input0.
AddressGet(), 0b0001);
throw new Exception("ERROR: Output should not trigger with only one input");
controller.MemorySet(input1.
AddressGet(), 0b0011);
if (controller.InterruptWait(1000) !=
RSIEventType.RSIEventTypeUSER_LIMIT)
throw new Exception("ERROR: User limit did not trigger when both inputs were high");
throw new Exception("ERROR: Output should be high after user limit triggered");
Console.WriteLine("✓ User limit triggered successfully - both inputs high, output activated");
controller.UserLimitDisable(0);
Console.WriteLine("\nUser limit digital input two condition complete.");
}
finally
{
controller.Delete();
}
uint64_t AddressGet()
Get the Host Address for the I/O point.
void Set(bool state)
Set the state of a Digital Output.
static IOPoint * CreateDigitalInput(Axis *axis, RSIMotorDedicatedIn motorDedicatedInNumber)
Create a Digital Input from an Axis' Dedicated Input bits.
static IOPoint * CreateDigitalOutput(Axis *axis, RSIMotorDedicatedOut motorDedicatedOutNumber)
Create a Digital Output from an Axis' Dedicated Output bits.
bool Get()
Get the state of Digital Input or Output.
int32_t MaskGet()
Get the bit mask for the I/O point.
Represents one specific point: Digital Output, Digital Input, Analog Output, or Analog Input....
static MotionController * Get()
Get an already running RMP EtherCAT controller.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
RSIControllerAddressType
Used to get firmware address used in User Limits, Recorders, etc.
RSIEventType
Event Types or Status Bits.
RSIUserLimitLogic
Logic options for User Limits.
RSIAction
Action to perform on an Axis.
RSIUserLimitTriggerType
Trigger types for UserLimits.
Helpers namespace provides utility functions for common tasks in RMP applications.