Documentation Home Page Cell Monitoring Device Emulation Add-On for NI VeriStand Home page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

How to Manage Hexadecimal and Binary Data in VeriStand Channels

When working with devices in the CMDE Add-On, managing different notations of channel data is crucial for ensuring accurate emulation results and user interaction. The data stored in the channels of the custom device may be represented in decimal, hexadecimal, or binary formats. This guide provides a comprehensive overview for handling data in each of these cases.

VeriStand’s flexible user interfaces, known as Screens, offer settings that allow channel data to be input or displayed various formats without altering the underlying values. Default channel values, on the other hand, can only be input in decimal notation. Refer to the device-specific documentation to confirm the format of each VeriStand channel associated with your model.

Decimal Data

Channels containing decimal data can be mapped to standard numeric controls and numeric indicators in a VeriStand screen. No custom configuration is necessary. Default values of input channels can also be entered as normal.

Hexadecimal Data

For channels containing hexadecimal data, modify the display format of numeric controls and indicators in the VeriStand Screen to allow the user to view and input hexadecimal data directly. When configuring the default value of an input channel in the system definition, convert the value to decimal first.

Configuring Hexadecimal Controls and Indicators

  1. In the VeriStand Screen, map the channel to a numeric control or numeric indicator.

  2. Right-click the control or indicator and select Properties.

  3. Expand the Display Format section and select Hexadecimal from the drop-down menu.

  4. Enable the Show Radix option.

Hex.PNG

Setting the Default Value of a Hexadecimal Channel

  1. In the system definition file, expand the configuration tree and navigate to the channel.

  2. Manually convert the desired default value from hexadecimal to decimal.

  3. Enter the decimal value into the Default Value field.

DefaultHex.png

1-bit Binary Data

In the VeriStand screen, single-bit binary data channels can be mapped to Boolean controls and indicators, such as checkboxes, switches, or LEDs. It is also possible to use numeric controls and indicators, if desired.  Default input channel values in the System Definition can simply be entered as 0 or 1.

Configuring 1-bit Binary Controls and Indicators

  1. In the VeriStand Screen, map the channel to an appropriate control or indicator.

    • For input channels, use a switch, button, checkbox, or numeric control.

    • For output channels, use an LED or numeric indicator.

If using a numeric control or indicator:

  1. Right-click the control or indicator and select Properties.

  2. Expand the Display Format section and select Binary from the drop-down menu.

  3. Enable the Show Radix option.

Setting the Default Value of a 1-bit Binary Channel

  1. In the system definition file, expand the configuration tree and navigate to the channel.

  2. Enter 0 or 1 into the Default Value field.

4-bit Binary Data

For channels containing 4-bit binary data, modify the display format of numeric controls and indicators in the VeriStand Screen to allow the user to view and input binary data directly. When configuring the default value of an input channel in the system definition, convert the value to decimal first.

Configuring 4-bit Binary Controls and Indicators

  1. In the VeriStand Screen, map the channel to a numeric control or numeric indicator.

  2. Right-click the control or indicator and select Properties.

  3. Expand the Display Format section and select Binary from the drop-down menu.

  4. Enable the Show Radix option.

  5. Set the Minimum Field Width to 4.

Setting the Default Value of a 4-bit Binary Channel

  1. In the system definition file, expand the configuration tree and navigate to the channel.

  2. Manually convert the desired default value from binary to decimal.

  3. Enter the decimal value into the Default Value field.

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323