|
If you have an instrument that transmits binary data and
you would like to pass this data to another program as decimal
data, you can use a combination of features available in
the Wedge to perform this type of operation. Although the
Wedge does not have a direct Binary to Decimal conversion
function, it does allow you to select a "Binary To Hex" filter
for each data field that you define and it also allows you
to enter a "Hex to Decimal" function in the Math
Expression for each field . If you apply the "Binary
To Hex" filter to a data field, the Wedge will translate
each ASCII character in the field to a two byte hexadecimal
string. For example if you received an ASCII one followed
by an ASCII 255 character, the Wedge would convert the two
bytes to the four byte string "01FF". If you also
entered the math expression "&h(Field(n))" for
the field (where n is the number of the field containing
the data), the Wedge would convert the hex data to decimal.
In this above example, you would end up with the number 511
in the data field in the Wedge.
More Cool Wedge Tricks
|