binary to outputs RSLOgix 500

realolman

Member
Join Date
Mar 2009
Location
here
Posts
584
Is there an instruction to convert a number to binary and then apply that binary to outputs of a SLC 500

eg. convert the number 6 to binary = 110... then have three outputs follow that number... perhaps outputs 5 and 6 be on and 7 be off, or something similar

I could certainly do it by hand but ... well, you know
thank you
 
You can address number registers down to the bit level for instance N7:0/0, N7:0/1 ..the. Just use those bits to drive the outputs you want.
 
Just to add to ndzied1 post.

Just use a "MOV" instruction. Move the value 6 to an integer e.g N7:0 and the corresponding bits will be true.( 0000 0000 0000 0110 ).
 
Last edited:
I've seen it done with masked moves. The masked move allows you not to use the entire output word. A year ago I replaced a panelview that had died with an 1980's message board (we already owned it). The message board was driven by eight outputs. I needed most of the other outputs to drive other things so I did a masked move into an output word (actually utilizing only like 6 of the output bits).
 
When looking at your N data file, change the radix and see how you can address an integer down to the bit level. You can also look at a binary data file as an integer.
 
Do a move directly to the output word. Why use an integer file? You will have the same bit pattern?

How do i access the output integer file? I am not familiar with that, but what u are saying and with a masked move certainly sounds like what i am trying to do
I only want to control three outputs and not mess with any of the others
Thank you
 
Post your program and tell us which outputs you want to control. Zip the .rss file first.

I would write to an integer first then move it to the output word. More control.
 
How do i access the output integer file?

There is no such thing. What you do is Move the Nx:y word (source), which holds the bits you wish to use to control some outputs, through the Mask word using the output word as the destination. Check out the MVM in instruction help in RSLogix.
 
+1 to the MOV command. I would say use a move directly to your output card such as MOV to O:0. That is if you decide you are using the whole card for that command. If not, As others said, MVM would do it.
 

Similar Topics

Hi folks, I'm trying to parse a binary string on a Red Lion DA30D using a Raw UDP/IP input port. I've done this before with ASCII strings so I do...
Replies
38
Views
974
So here's my situation, I have been tasked with modifying the logic to mimic a button press in the PLC. I have two identical machines however one...
Replies
6
Views
538
Hi, I want to extract every second bit of a double word and place it in a new word but the position of placement should be from 0,1,2......15...
Replies
17
Views
3,066
Hello, I am trying to convert a incoming string that is in Binary format (See attachment) to a DINT. Any ideas? When I use the STOD command it...
Replies
6
Views
2,208
How can I read individual binary bits from a SLC500 within FTH SE? With the Tag Browser I can get to the Binary Files and get each Integer from...
Replies
5
Views
1,601
Back
Top Bottom