Bit Fields tab

A bit field packs multiple pieces of data together in one variable. Each field represents one piece of data. Each piece of data should have no dependency upon other fields. Bit Fields are used to define custom variable types and values.

Adding Bit Fields

A Bit Field may be created in one of three ways:

  • Right-click within the Bit Fields tab and select Insert BitFields.
  • Press the Insert key while the Bit Fields tab is active
  • Double-click within the Bit Fields tab.

This creates a default Bit Field labelled as "BitFieldn" with a Value type "INT".

  • The Bit Field type Value may be modified by double-clicking on value, allowing a selection from a list.

Once the Type is defined you may populate the bits.

  • Double click on a bit value to change the text.

  • To save your changes you must press Enter, Tab, the Up, or the Down arrow key.


  • Bit Fields are supported over MODBUS. Below is a variable with a custom Type defined in the Bit Fields list which is flagged for KVB. It will be exported.to MODBUS.

Using Bit Fields

Following is an example of setting up and testing a Bit Fields entry.

  1. Define the Bit Field Type and Values.

    Here we have defined a bit called AxisState with four values.

  2. Create a variable whose Type that matches the Bit Field.

    Here we have defined a variable called Motor_State. We selected the AxisState type from the dropdown menu.

  3. To use the bit enter VariableName.BitName in any editor.

    Here we are using the Structured Text editor and typed "motor_state." When the dot was typed the selector opened, showing us the available bits for the variable.