The RMP Motion Controller APIs

◆ IOGet()

IO* IOGet ( int32_t  nodeNumber)
Description:
IOGet takes a node reference number and returns a pointer to the IO object it represents.
Parameters
nodeNumberThe reference number of the node the IO is on. The first I/O node is the 0th Node. Non-I/O Nodes are not considered for this numbering schema.
Returns
(IO*) A pointer to the IO specified.
Remarks
This function is also available in RapidSequencer. Part of the Create and Initialize RapidCode Objects method group.
Sample Code:
IOPoints
const int NODE_INDEX = 0; // The EtherCAT Node we will be communicating with
//const int INPUT_INDEX = 0; // The PDO Index in that Node
const int OUTPUT_INDEX = 0; // The PDO Index in that Node
// IOPoint input0 = IOPoint.CreateDigitalInput(controller.IOGet(NODE_INDEX), INPUT_INDEX); // Automatically gets the memory index of a specified node and input index
IOPoint output0 = IOPoint.CreateDigitalOutput(controller.IOGet(NODE_INDEX), OUTPUT_INDEX); // Automatically gets the memory index of a specified node and input index
output0.Set(false);
controller.SampleWait(1);
Assert.False(output0.Get(), "The getter function should return a value equal to false");
Note
The RMP assigns a logical number to each I/O node that it encounters during initialization. This number will be consistent as int32_t as the network node's relative location on the network remains the same.
Examples
SingleAxisSyncOutputs.cpp, Template.cpp, and UserLimitDigitalInputAction.cpp.