Signal

This chapter describes the Signal interface. The Signal interface provides access to parameters and variables.

Data type

A Signal has a ‘native’ data type. The data type of a Signal might be queried for display purposes, e.g. in controller agnostic tooling.

Not all data types have a unique accessor. A signal can be accessed by calling ValueDouble and ValueUint32 (for C#) or Read/WriteDouble and Read/WriteUint32 (for C++). For boolean, enum and mask signals Translations can be used to translate a signal value into human-readable enumerated string representation.

The Signal data types and accompanying accessor are listed in the following table:

Signal data types

Data type

Accessor type

Description

Uint8

Uint32

8-bit unsigned integer value

Int8

Double

8-bit signed integer value

Uint16

Uint32

16-bit unsigned integer value

Int16

Double

16-bit signed integer value

Uint32

Uint32

32-bit unsigned integer value

Uint64

Double

64-bit unsigned integer value

Int32

Double

32-bit signed integer value

Int64

Double

64-bit signed integer value

Double

Double

Double-precision floating-point value

Enum

Uint32

Enumeration, e.g. a state machine state.

Float

Double

Single precision floating-point value

Mask

Uint32

Individual bits each represent an individual condition or entity, e.g. error flags.

Bool

Uint32

True (1) or false (0)

Access

A Signal can be Read-Only (R) or Read-Write (R/W). Whether a signal is writable can be retrieved using the IsWritable property on the Signal interface. Read-Write signals can also be configured via XML, this is described in Signal.

Signal access

Access

Description

Read-Only

Signals, which can be viewed and reported but cannot be edited.

Read-Write

Signals, which can be viewed, edited, and reported.

Bounds

The bounds state the maximum and minimum value a signal can have. The range can be limited due to the native data type of the implementation, or due to other restrictions. An exception is thrown when writing an out of bound value to a signal. The UpperBound and LowerBound properties on the Signal interface can be used to retrieve the bound values.

Match conditions

A match condition is used to check whether a Signal has reached a certain value. The mask can be used when the user is only interested in a particular part of the Signal. Signal operator definitions explains the available conditions.

Signal operator definitions

Signal operator

Uint32 expression

Double expression

Smaller

(signal & mask) < value

signal < value

SmallerEqual

(signal & mask) <= value

signal <= value

Equal

(signal & mask) == value

signal == value

LargerEqual

(signal & mask) >= value

signal >= value

Larger

(signal & mask) > value

signal > value

NotEqual

(signal & mask) != value

signal != value

Change

abs((signal & mask) - (signal_p & mask)) > value

abs(signal - signal_p) > value

BitSetAny

(signal & mask) != 0

N/A

BitClearAny

(signal & mask) != mask

N/A

BitSetAll

(signal & mask) == mask

N/A

BitClearAll

(signal & mask) == 0

N/A

BitRiseAny

(~signal_p & signal & mask) != 0

N/A

BitFallAny

( signal_p & ~signal & mask) != 0

N/A

BitRiseAll

(~signal_p & signal & mask) == mask

N/A

BitFallAll

(signal_p & ~signal & mask) == mask

N/A

Note

signal indicates the current value of the signal. signal_p indicates the previous value of the signal.

There are no guarantees about callback order of independent callbacks registered with SubscribeMatch.

Locking

Under certain conditions, the motion software requires exclusive editing rights, such as for signals added to a Lockable Parameter set. When editing such a signal via an other method, an exception is thrown.

See also

Signal

XML configuration example of the signal interface.