General Purpose I/O

What are general purpose IOs?

In RapidCode API, when we use the term IO, we mean general purpose digital inputs or outputs and analog inputs or outputs.

General purpose I/O’s are typically connected to EtherCAT network via slave module. Click to see hardware list.

To control dedicated I/O’s on drive such as Home, Positive Limit, Negative Limit, please read Dedicated IO topic documentation.

Important to Understand

Motion Controller Class

Represents the PCI motion controller board or the RMP INtime soft motion controller. This class provides an interface to general controller configuration, firmware upload/download, network, and data recording.

Axis Class

Represents a single axis of motion control. This class provides an interface for commanding motion, reading trajectory parameters, configuring filter (control law) parameters, homing, limit switch configuration, motor configuration, position capture, electronic gearing and Node information.

IO Class

This class provides an interface to an I/O Node. An I/O node can have various combinations of digital or analog inputs and outputs.

IO Objects have access to NetworkNode Functions.

IOPoint Class

This class provides a common interface to any I/O Point, regardless of where it resides: Motion Controller, Axis, or I/O Node.

It represents a point class. An IO Point object can be any specific Digital Output, Digital Input, Analog Output, or Analog Input

Classes Overview

EXAMPLE 1 - EtherCAT Network IO Modules

1st - Create Motion Controller

MotionController controller = MotionController.CreateFromSoftware(); OR MotionController controller = MotionController.CreateFromSoftware(@"C:\RSI\X.X.X\");

2nd - Create Your Node Object

IO ioNode = controller.IOGet(Int nodeNumber); ioNode.NetworkNode.RapidCodeNetworkNodeFunction OR Axis myAxis = controller.AxisGet(Int nodeNumber); myAxis.NetworkNode.RapidCodeNetworkNodeFunction

3rd - Access Specific IO Point

ioNode.NetworkNode.DigitalOutGet(int digitalOutputNumber) OR IOPoint DI1 = IOPoint.CreateDigitalOutput(IO ioNode, int bitNumber)

EXAMPLE 2 - PDO Digital Inputs/Outputs

PDOs (Process Data Objects) are memory addresses that are exchanged cyclically with our drive.

PDO’s are typically used to read/write addresses on a drive. However to access dedicated IO’s on a drive, refer to Dedicated IO topic documentation.

To see which PDO’s are being exchanged between the master ( RMP EtherCAT motion controller) and your slave (EtherCAT device) go to:

RapidSetup → Tools → NetworkIO

1st - Create Motion Controller

MotionController controller = MotionController.CreateFromSoftware();

2nd - Get Output or Input Memory Address from PDO List

ulong inputAddress = controller.NetworkInputAddressGet(INPUT_INDEX); OR ulong outputAddress = controller.NetworkOutputAddressGet(OUTPUT_INDEX);

To check your IO indexes go to: RapidSetup --> Tools --> Network Data