UnderAutomation
Eine Frage?

[email protected]

Kontakt
UnderAutomation
⌘Q
This page is only available in English.

Inputs & Outputs

Read and write digital signals (SDI, SDO, RDI, RDO, UI, UO, SI, SO, WI, WO) and numeric I/O (GI, GO, AI, AO) via SNPX.

  • Digital signals
  • Read and write digital signals
  • Numeric I/O
  • Read and write numeric I/O
  • Complete example
  • API reference

SNPX supports 13 digital signal types and 5 numeric I/O types, all with single and range read/write operations.

Digital signals

Digital signals are boolean values. The following types are available:

TypeDescription
SDI / SDOStandard Digital Input / Output
RDI / RDORobot Digital Input / Output
UI / UOUser Input / Output
SI / SOSystem Input / Output
WI / WOWeld Input / Output
WSIWire Stick Input
PMC_KPMC Keep Relays
PMC_RPMC Internal Relays

Read and write digital signals

parameters.Snpx.Enable = true;
robot.Connect(parameters);
// Read SDI[10]
bool sdi10 = robot.Snpx.SDI.Read(10);
// Write RDO[1] = ON
robot.Snpx.RDO.Write(1, true);
// Read UI[5]
bool ui5 = robot.Snpx.UI.Read(5);
// Read 100 SDI signals starting at index 1
bool[] values = robot.Snpx.SDI.Read(1, 100);
// Write 3 SDO signals starting at index 1
robot.Snpx.SDO.Write(1, new[] { true, false, true });
}
}
Click to see the full code

Numeric I/O

Numeric I/O signals are 16-bit unsigned integers (ushort):

TypeDescription
GI / GOGroup Input / Output
AI / AOAnalog Input / Output
PMC_DPMC Data

Read and write numeric I/O

parameters.Snpx.Enable = true;
robot.Connect(parameters);
// Read GI[1]
ushort gi1 = robot.Snpx.GI.Read(1);
// Write GO[1] = 500
robot.Snpx.GO.Write(1, 500);
// Read AI[1]
ushort ai1 = robot.Snpx.AI.Read(1);
// Write AO[2] = 32767
robot.Snpx.AO.Write(2, 32767);
// Read a range of GI values
ushort[] giValues = robot.Snpx.GI.Read(1, 100);
}
}
Click to see the full code

Complete example

using UnderAutomation.Fanuc;
using UnderAutomation.Fanuc.Common;
public class SnpxIo
{
public static void Main()
{
FanucRobot robot = new FanucRobot();
ConnectionParameters parameters = new ConnectionParameters("192.168.0.1");
parameters.Snpx.Enable = true;
robot.Connect(parameters);
// --- Digital signals (boolean) ---
// Read a single digital input
bool sdi10 = robot.Snpx.SDI.Read(10);
// Write a single digital output
robot.Snpx.RDO.Write(1, true);
// Read a range of digital inputs (100 signals starting at index 1)
bool[] sdiRange = robot.Snpx.SDI.Read(1, 100);
// Write a range of digital outputs
robot.Snpx.SDO.Write(1, new[] { true, false, true });
// Other digital signal types: UI, UO, SI, SO, WI, WO, WSI, PMC_K, PMC_R
bool ui5 = robot.Snpx.UI.Read(5);
robot.Snpx.SO.Write(3, false);
// --- Numeric I/O (ushort) ---
// Read Group Input
ushort gi1 = robot.Snpx.GI.Read(1);
// Write Group Output
robot.Snpx.GO.Write(1, 500);
// Read Analog Input
ushort ai1 = robot.Snpx.AI.Read(1);
// Write Analog Output
robot.Snpx.AO.Write(2, 32767);
// Read a range of numeric I/O
ushort[] giRange = robot.Snpx.GI.Read(1, 100);
// Other numeric I/O types: PMC_D
ushort pmcD = robot.Snpx.PMC_D.Read(1);
}
}

API reference

Class
DigitalSignalsinherits SnpxElements<bool,int>
C#Python

Provides read/write access to digital I/O signals on the robot.

MemberTypeDescription
SegmentName
Property
read only
SegmentName
Gets the segment name identifying this signal group.
SegmentOffset
Property
read only
SegmentOffset
Gets the segment offset for this signal group.
SegmentSelector
Property
read only
SegmentSelector
Gets the segment selector for this signal group.
Read(int)
Method
bool
Reads the digital signal at the specified index.
  • index : The signal index (1-based).
Read(int, ushort)
Method
bool[]
Reads a range of digital signals.
  • firstIndex : The first signal index (1-based).
  • count : The number of signals to read.
Write(int, bool)
Method
void
Writes a value to the digital signal at the specified index.
  • index : The signal index (1-based).
  • value : The boolean value to write.
Write(int, bool[])
Method
void
Writes values to consecutive digital signals.
  • firstIndex : The first signal index (1-based).
  • values : The boolean values to write.
Class
NumericIOinherits SnpxElements<ushort,int>
C#Python

Provides read/write access to numeric (group/analog) I/O on the robot.

MemberTypeDescription
SegmentName
Property
read only
SegmentName
Gets the segment name identifying this I/O group.
SegmentOffset
Property
read only
SegmentOffset
Gets the segment offset for this I/O group.
SegmentSelector
Property
read only
SegmentSelector
Gets the segment selector for this I/O group.
Read(int)
Method
ushort
Reads the numeric I/O value at the specified index.
  • index : The I/O index (1-based).
Read(int, ushort)
Method
ushort[]
Reads a range of numeric I/O values.
  • firstIndex : The first I/O index (1-based).
  • count : The number of values to read.
Write(int, ushort)
Method
void
Writes a value to the numeric I/O at the specified index.
  • index : The I/O index (1-based).
  • value : The value to write.
Write(int, ushort[])
Method
void
Writes values to consecutive numeric I/O.
  • firstIndex : The first I/O index (1-based).
  • values : The values to write.

Integrieren Sie Roboter von Universal Robots, Fanuc, Yaskawa, ABB oder Staubli ganz einfach in Ihre .NET-, Python-, LabVIEW- oder Matlab-Anwendungen

UnderAutomation
KontaktLegal

© All rights reserved.