|
|
| long DigitalOutGet |
( |
long |
startBitNumber, |
|
|
long |
bitCount | |
|
) |
| | |
- Description:
- DigitalOutGet returns the state of 32 digital output bits. It is passed a starting bit ID relative to the Node (not Segment).
- Parameters:
-
| startBitNumber | The starting digital output bit number on the node, starts from 0. |
| bitCount | The number of digital output bits to get (1 minimum, 32 maximum). |
- Returns:
- (long) State of the outputs.
- Sample Code:
- Check [numberBits] starting at [startBit] of Digital Output bits.
printf("State of the %d output bits, starting with bit %d: 0x%x.\n", startBit, numberBits,
io->DigitalOutGet(startBit, numberBits));
Console.Writeline("State of the {0} output bits, starting with bit {1}: 0x{2}.", startBit,
numberBits, io.DigitalOutGet(startBit, numberBits));
- Notes:
- Method will fail if startBitNumber and bitCount attempt to read more bits than exist on the I/O node. Slice I/O has multiple segments of same type (Digital/Analog In/Out) which are grouped together. The reference number for any bit of a given type can be defined as when it is encounted relative to the Slice I/O Node or an individual Slice.
- See also:
- DigitalOutSet
|