◆ CreateDigitalOutput() [1/5]

static IOPoint* CreateDigitalOutput ( Axis axis,
RSIMotorDedicatedOut  motorDedicatedOutNumber 
)
static

Create a Digital Output from an Axis' Dedicated Output bits.

Part of the IOPoint Creation method group.

Description:
Parameters
axis
motorDedicatedOutNumberRSIMotorDedicatedOut
Returns
(IOPoint*) A pointer to the newly created IOPoint.
Sample Code:
IOPoints
//---Arrange---
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
//---ACT---
output0.Set(false);
//---ASSERT---
controller.SampleWait(1);
Assert.False(output0.Get(), "The getter function should return a value equal to false");
Note
Examples
SingleAxisSyncOutputs.cpp, and SyncOutputWithMotion.cpp.