Natural Binary 9bits to Decimal ControlLogix5000

juanmdx

Member
Join Date
May 2007
Location
SLP
Posts
281
Hello,

I've a fast input card (1769-IQ16F) and a encoder that works in natural binary with 9 bits (845DSJDZ25ANDW4), and I need to convert this input to a decimal code.
I'm working with ControlLogix 5000 (the plc is a compaq logix), and I see there is a BCD to Decimal block, but I can't see a block that works with natural binary.

Could you please help me to solve this convertion?


Thanks and best regards

Juan
 
There is no need for a conversion as the numbering system for integers within the ControlLogix system is, as you describe, 'natural binary.

If the encoder occupies the lowest nine inputs of the card then use the AND instruction with the input card as the first source, 511 (decimal) or 1FF (hexadecimal) as the AND mask and your chosen destination as the third argument.

If the bits occupy higher inputs then the mask would change (use your Windows calculator) and the result would have to be right-shifted the appropriate number of places.
 
Last edited:
It might be 9-bit Signed Binary, in which case bit 8 would be the sign bit.

If you put this into an CompactLogix DINT, then you could....

XIC bit 8, OTE bit 31, OTU bit 8

Bernie's "right-shift" would be easier with a BTD instruction.
 

Similar Topics

Hi, I have been tasked with adding basic telemetry to an outdoor, non-enclosed natural gas substation. The substation is not enclosed in a...
Replies
8
Views
1,966
All, I have a project that has stumped me..... This is an upgrade from a Bristol Babcock flow computer to a new ML1400. This NG gas site has two...
Replies
17
Views
5,549
I know that Siemens provide a library in association with AGA for Step7. Anyone who has the library? Or any other technique for implementing the...
Replies
0
Views
1,723
We are building 2 test cells. Each will have natural gas in them, we need gas detectors. Anyone have suggestions on make/model? Thanks
Replies
9
Views
3,188
U
I need to evaluate how much heat can be dissipated from an electrical enclosure. Inside I have 500W of losses and I cannot have no cooling...
Replies
2
Views
3,191
Back
Top Bottom