UnderAutomation
질문이요?

[email protected]

문의하기
UnderAutomation
⌘Q
Fanuc SDK documentation
Registers
Documentation home

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
  • 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

// 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 });

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

// 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);

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

Members of Snpx.Internal.DigitalSignals :
public class DigitalSignals : SnpxElements<bool, int> {
// Reads the digital signal at the specified index.
public override bool Read(int index)
// Reads a range of digital signals.
public bool[] Read(int firstIndex, ushort count)
// Gets the segment name identifying this signal group.
public SegmentName SegmentName { get; }
// Gets the segment offset for this signal group.
public SegmentOffset SegmentOffset { get; }
// Gets the segment selector for this signal group.
public SegmentSelector SegmentSelector { get; }
// Writes a value to the digital signal at the specified index.
public void Write(int index, bool value)
// Writes values to consecutive digital signals.
public void Write(int firstIndex, bool[] values)
}
Members of Snpx.Internal.NumericIO :
public class NumericIO : SnpxElements<ushort, int> {
// Reads the numeric I/O value at the specified index.
public override ushort Read(int index)
// Reads a range of numeric I/O values.
public ushort[] Read(int firstIndex, ushort count)
// Gets the segment name identifying this I/O group.
public SegmentName SegmentName { get; }
// Gets the segment offset for this I/O group.
public SegmentOffset SegmentOffset { get; }
// Gets the segment selector for this I/O group.
public SegmentSelector SegmentSelector { get; }
// Writes a value to the numeric I/O at the specified index.
public void Write(int index, ushort value)
// Writes values to consecutive numeric I/O.
public void Write(int firstIndex, ushort[] values)
}

Universal Robots, Fanuc, Yaskawa, ABB 또는 Staubli 로봇을 .NET, Python, LabVIEW 또는 Matlab 애플리케이션에 쉽게 통합

UnderAutomation
문의하기Legal

© All rights reserved.