APIs, concepts, guides, and more
General Purpose IO

Utilize general-purpose IO for versatile digital and analog input/output control across the EtherCAT network.

🔹 What are general-purpose IOs?

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

General-purpose IOs are typically connected to the EtherCAT network via slave module. Click to see the hardware list.

Here is a picture of RapidSetupX showing all available general purpose IO in the system's network:

RapidSetupX: IO Page

Note
To control dedicated IO on the drive such as: Home, Positive Limit, Negative Limit, etc. Please navigate to Dedicated IO topic documentation.

🔹 How do I get/set general-purpose IOs?

There are two ways to access general purpose digital/analog inputs/outputs:

  1. Via the NetworkNode object (recommended):

    // get node
    var node = controller.NetworkNodeGet(nodeNumber: 0);
    // digital io
    bool dIn = node.DigitalInGet(digitalInNumber: 0);
    bool dOut = node.DigitalOutGet(digitalOutNumber: 0);
    node.DigitalOutSet(digitalOutNumber: 0, state: dOut);
    // analog io
    int aIn = node.AnalogInGet(analogChannel: 0);
    int aOut = node.AnalogOutGet(analogChannel: 0);
    node.AnalogOutSet(analogChannel: 0, analogValue: aOut);
  2. Via the IOPoint object: check out the IOPoint concept page.