Skip to main content

getGpioSignal v5.4

Before v5.4, this method was called getGpioCondition.

Get the current state of a GPIO signal.

Parameter​

The name of the GPIO signal.

Return value​

KeyTypeDescription
activebooleanWhether the signal is active. v6.0
edgeCountnumberNumber of edges (state changes) of the signal. v6.0
activeCountnumberNumber of times the signal became active. v6.0
generationnumberA number that changes whenever the signal changes, for use with waitForGpioSignalChange. v6.0
statebooleanDeprecated name of active.

The counts are every change of the signal's value. For an input or trigger signal, device.<…>, that includes the change from inactive while its state is unknown, when its I/O module connects with it active. The input's or trigger's own counts, from getGpi or getTrigger, leave that out, so they can be lower.

Example​

getGpioSignal "MySignal"