RsLogix 5000 Converting Decimal to Binary

mcalidl

Member
Join Date
Aug 2006
Location
Birimingham, AL
Posts
50
Does anyone know how to convert from a decimal number to a true binary output. For example convert the number 15 to 1111 and then be able to turn on outputs using the four bits.
 
Not exactly sure what your after. If you move a 15(integer) into an output group you will get the least four outputs to come on no conversion necessary. However alot of people use hex just because its easier to see the higher bits.
 
Not exactly sure I understand your reply. Maybe I should clarify. What I am after is being able to convert a decimal number to binary and then be to use the bits from the conversion for discrete logic. For example, the number 12 convers to 1100 binary. I need to be able to use the four individual bits for basic logic.
 
If Decimal_Number is defined as a DINT (or INT or SINT) then the least significant bit is accessable as Decimal_Number.0 and so on. Doe that give you what you need?
 
What processor/plc? Basically binary conversion is not necessary in a plc. If in CLGX you mov decimel 12 or binary 1100 into Local:7:O.Data then you will turn on Local:7:O.Data.02 and Local:7:O.Data.03. If you do a decimel move or a binary move the results are the same. If you just want to see it in binary you can change the "style" of the tag.
 
Decimal to Binary conversion on DoMoreDesigner

Hi folks!
New here, and to PLCs really. I'm playing around with a project, can't make head nor tail of it.
I've got to convert a number from decimal to binary, and represent it on 12 outputs of the C Memory as binary, from 0 to 4095. No idea where to start.
Anyone have any suggestions on how to go about this??
Any help would be much appreciated!
Cheers!
Bill
 
Hey Bernie, thanks a lot, was banging my head off a wall trying to get that. It puts it out backwards, but it is good.
What is that expression, an internal function?? I can't find anything explaining about it.
Thanks for your help, very much appreciated!
 

Similar Topics

I am using rslogix 5000 V20 and converting 2 INT to a real. The data from the real I am reading is lower than what is should be and not sure if...
Replies
2
Views
2,628
Looking for info on converting RSLogix 500 file to RSLogix 5000 format. 1747-L552 CPU is being changed out with the 1769L35E
Replies
3
Views
9,794
Hi all! I have a question here: I have installed in my computer the RS Logix 5000 versions 15.00 and 16.00 Because of specific reasons I'm...
Replies
3
Views
4,256
Long story short, the operator inputs a code that is always two letters and a single number for a process. I need to take that in rslogix5000 and...
Replies
13
Views
20,523
Hello all, I have a question in regards to RSlogix 5000. I am having issues with the program force closing when I try to make online edits. We...
Replies
0
Views
95
Back
Top Bottom