The RMP Motion Controller API

◆ DigitalInGet()

virtual bool DigitalInGet ( int32_t  digitalInNumber)
pure virtual

Get the state of a digital input bit.

DigitalInGet returns the state of a single digital input bit. It is passed a bit ID relative to the Node (not Segment).
digitalInNumberThe digital input number on the node, starts from 0.
(bool) State of the bit.

ℹ This function is avaliable in RapidCode and RapidSequencer

Part of the IO Members method group.

Sample Code:
Check Digital Input bit [bitNum].
// -- C++ -- //
printf("Bit %d shows a value of: %d.", bitNum, io->DigitalInGet(bitNum));
// -- C# -- //
Console.Writeline("Bit {0} shows a value of: {1}.", bitNum, io.DigitalInGet(bitNum));
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.