Manage diverse inputs and outputs conveniently using the IOPoint class.
🔹 What is IOPoint?
The IOPoint class provides a simple standardized interface for interacting with the various things that can be thought of as an input or output.
An IOPoint can be an input or an output and can be Digital or Analog.
An IOPoint can be created from:
- An Axis's dedicated input/output
- An Axis's general input/output
- An IO object and a bit number
- A memory address
- A network PDO input/output
📜 Sample Code
IO Points Basics
This sample apps will demonstrate how to use the IO point object to read and write to network data.
- C#
const int NODE_INDEX = 0;
const int OUTPUT_INDEX = 0;
Assert.That(output0.
Get(), Is.False,
"The getter function should return a value equal to false");
IO Point User Buffer
This sample application will show you how to create a simulated IOPoint from base on a memory address and index.
- C#
const int INPUT_INDEX = 0;
const int OUTPUT_INDEX = 1;
Assert.That(output0.
Get(), Is.False,
"The getter function should return a value equal to false");
Assert.That(output0.
Get(), Is.True,
"The getter function should return a value equal to true");
Assert.That(input0.
Get(), Is.False,
"The getter function should return a value equal to false");
Assert.That(input0.
Get(), Is.True,
"The getter function should return a value equal to true");