.

SqNodeSegment.DigitalOutGet

DigitalOutGet reads a series of consecutive digital output bits and returns the states as a Boolean array.

Version History

Introduced in MPX 2.0.

Result

Array of Boolean

Arguments

 
Argument Type Description
bitStart UInt32 The first digital output bit to read.
bitCount UInt32 The number of digital output bits to read. The last digital output read will be bit number (bitStart + bitCount -1).

Common Exceptions

 
Error Occurs when...
Argument When bitCount exceeds 32.

Visual Basic

Syntax

Function DigitalOutGet(bitStart As UInt32, bitCount As UInt32) As Boolean()

Sample Code

 
Dim sqNode As Mpx.SqNode = Controller.SynqNet(0).Node(2)
Dim sqSegment As Mpx.SqNodeSegment = sqNode.Segment(1)

'Get the number of outputs
Dim count As Integer = sqSegment.DigitalOutCount

'Get all the digital output values
Dim values() As Boolean
values = sqSegment.DigitalOutGet(0, count)


Sample Application

 

C#

Syntax

bool[] DigitalOutGet(uint bitStart, uint bitCount);

Sample Code

 
Mpx.SqNode sqNode = Controller.SynqNet[0].Node[2];
Mpx.SqNodeSegment sqSegment = sqNode.Segment[1];

// Get the number of outputs
int count = sqSegment.DigitalOutCount;

// Get all the digital output values
bool[] values = sqSegment.DigitalOutGet(0, count);

 

See Also

DigitalOutBit
DigitalOutSet
DigitalOutWait

Overviews
Overview of MPX I/O

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering