Skip to main content

Kollmorgen Support Network

KVB HMI - Displaying Bitwise Variables in KVB / AKI2G | 02 Sep 2022 | |

KVB HMI - Displaying Bitwise Variables in KVB / AKI2G


KAS application developers can combine multiple pieces of information into one variable. One example is storing the status of up to 16 items into a 16-bit Integer or INT variable.   As an example  the bits of the INT could be designated as follows:

  1. At Home 
  2. Operation 1 Active
  3. Operation 2 Active
  4. Operation 3 Active
  5. Operation 4 Active
  6. Operation 5 Active
  7. Operation 6 Active
  8. Operation 7 Active
  9.  High Speed Operation 
  10. Low Speed  Operation
  11. Product Jam
  12. High Temperature
  13. Daily Product Goal Met
  14. Time for Maintenance
  15. Input Bin Empty
  16. Replace Filter

If the application status was stored in a variable called OperationStatus and the machine status was  Operation3 Active (bit 3), High Speed Operation (bit 8) , and Input Bin Empty (bit 14), the value of OperationStatus would be set in by the running program to 16, 648.

  • 23 + 28 + 214 =  (0100 0001 0000 1000) bin   or (16,648) dec

OperationStatus can be sent to the AKI2G HMI via Modbus TCP/IP and the status displayed.

Generic Example

The following example reviews displaying information from an INT in the .kas project onto an AKI2G(Advanced Kollmorgen Interface) screen. 2 LED objects, indicating on and off, will be used for each of the 16 bits in the INT.

Start off by checking the variable in the KAS IDE dictionary to be used in KVB. For this example, the variable INT16_1 was created.


Compile the .kas project, then open KVB (Kollmorgen Visualization Builder) from inside the IDE.  In KVB the variable will be automatically added in the KVB tag list. An LED object is then added to the display for each of the 16 status bits

Each LEDs is placed on the screen  using the KVB Multi-picture control:



The multi-picture is then configured as follows using the Configure Pictures button.  For each bit, a boolean mask expression is set up with an output of 1 (LED on)  or 0 (LED off)  Example below: to evaluate Bit 10 the Expression (value & 0x1000)== 0x1000 is created



About this Article

C Wontrop