Hello VEE-Ites

Does anybody know how to convert a decimal Word into 16-bit binary,

or hexadecimal.

I know it can be displayed in Alphaneumeric Displays in these

formats, but ideally I need to convert to

binary to produce a bit by bit display using Alarm indicators.

Any suggestions will be greatly appreciated

Thank you

Andy G

VRF Rules

Does anybody know how to convert a decimal Word into 16-bit binary,

or hexadecimal.

I know it can be displayed in Alphaneumeric Displays in these

formats, but ideally I need to convert to

binary to produce a bit by bit display using Alarm indicators.

Any suggestions will be greatly appreciated

Thank you

Andy G

VRF Rules

I've done this on a regular basis. Don't transform the integer to

binary which would be a string. Instead, use multiple FORMULA

objects, each with the formula BIT (A,x) where x is the desired bit

value to extract. Put all of these into a single User Object with one

input (the integer value) and several outputs (the bits that you

desire to monitor) and feed the output pins directly into your

indicators.

So if the first 8 bits of you integer have meaning, you have an

object with one input and 8 outputs. Each of the 8 outputs

corresponds to the logical value (0/1) of the first 8 bits and you

feed these into the set of Indicators for display. The 8 formulas

inside the UO would be - bit(A,0) - bit(A,1) - bit(A,2), etc.

I hope this conveys the concept adequately.

Thomas Groleau

tucson, Arizona

______________________________ Reply Separator _________________________________

Subject: VRF - Number Conversions

Author: andrew.g@amplicon.co.uk at CCGATE

Date: 5/21/98 7:40 AM

Hello VEE-Ites

Does anybody know how to convert a decimal Word into 16-bit binary,

or hexadecimal.

I know it can be displayed in Alphaneumeric Displays in these

formats, but ideally I need to convert to

binary to produce a bit by bit display using Alarm indicators.

Any suggestions will be greatly appreciated

Thank you

Andy G

VRF Rules