The RMP Motion Controller APIs

◆ AddressGet() [1/2]

uint64_t AddressGet ( RSIControllerAddressType type)
Description:
AddressGet returns the host address for a particular MotionController value.
Parameters
typeUse RSIControllerAddressType.
Returns
(int32_t) The (host) controller memory addr for specified value.
Remarks
This function is also available in RapidSequencer.

IO: Input & Output

const int INPUT_INDEX = 0;
const int OUTPUT_INDEX = 1; // The PDO Index in that Node
UInt64 userBufferAddress = controller.AddressGet(RSIControllerAddressType.RSIControllerAddressTypeUSER_BUFFER, 0); // Grabing an memory address to store a simulated IO point.
IOPoint input0 = IOPoint.CreateDigitalInput(controller, userBufferAddress, INPUT_INDEX); // Automatically gets the memory index of a specified node and input index
IOPoint output0 = IOPoint.CreateDigitalOutput(controller, userBufferAddress, OUTPUT_INDEX); // Automatically gets the memory index of a specified node and input index
//---ACT/ASSERT---
output0.Set(false);
Assert.False(output0.Get(), "The getter function should return a value equal to false");
output0.Set(true);
Assert.True(output0.Get(), "The getter function should return a value equal to true");
controller.MemorySet(input0.AddressGet(), 0);
Assert.False(input0.Get(), "The getter function should return a value equal to false");
controller.MemorySet(input0.AddressGet(), 1);
Assert.True(input0.Get(), "The getter function should return a value equal to true");
See also
MotionController::MemoryGet
Examples
InputOutput.cs, MathBlock.cs, MotionHold.cs, MotionHoldReleasedBySoftwareAddress.cpp, Recorder.cs, and UserLimit.cs.