Class: Bit

Bit

Class for accessing a single bit by name from the parent attribute.

NOTE: In the memory map, if the parent attribute is unnamed, this Bit (and other children of the parent) become accessible via the parent's parent.

Members


value :bool

Gets/sets the value of the bit. cip.CIPVar#readOnly must be false in order to be able to write to this property.

Also accessible using the shorter named property 'v'.

Type:
  • bool
Since:
  • 1.0 (WAT 1.0)

Methods


clear()

Sets the Bit to false. Same as value = false. Can be connected to a signal.

Since:
  • 1.0 (WAT 1.0)

set()

Sets the Bit to true. Same as value = true. Can be connected to a signal.

Since:
  • 1.0 (WAT 1.0)

setValue(val)

Sets the value of the Bit. Same as writing to value, but can also be connected to a signal from another object.

Parameters:
Name Type Description
val bool

The new value of the Bit

Since:
  • 1.3 (WAT 1.4)

toggle()

Toggles the state of the Bit. Same as value = !value. Can be connected to a signal.

Since:
  • 1.0 (WAT 1.0)

Events


valueChanged

Fires when the bit toggles as a result of a field bus update.

Parameters:
Name Type Description
newValue bool

The new value of the bit

Since:
  • 1.0 (WAT 1.0)