referencing Bits to outputs

ljcoulthurst

Member
Join Date
Feb 2017
Location
californa
Posts
6
I'm using a micrologix at school. I want to start associating bits (B3:0) or one i create like B9:0 for example...say i have 3 outputs. 2 lights and a motor.

O:2/0 - O: 2/2

how do I reference those outputs using the bits?

i have a more complicated assignment than that but the idea is the same.

so ideally i'd like to use bit B3:0 B3:1 and B3:2 to use instead of the outputs.
 
what i'm saying is ...when i want to say turn on an output...like O:2/0
and I want to use a bit instead of the literal O:2/0, how does the the program know that B3:0 is the same as O:2/0? if it doesn't, how do i tell it that I want to represent O:2/0 with binary bit B3:0? don't know how much more exact I can be.
 
My labeling got a little screwed up there but you get the idea. This way you can use the bit throughout the remainder of the program so that you don't have to use the output.
 
In the place where the OTE is, instead of entering an output address like O:1/0 enter B3/0, or whatever.

OTE.PNG
 
If I understand your question correctly then what you are trying to do is generally called I/O mapping. It is a very common practice that can be very useful in many applications. The most straight forward way to accomplish mapping is to associate each output with a corresponding binary bit. For example,

---| |-----------( )
B3:0/0 . ..... O:1/0

---| |-----------( )
B3:0/1 ...... O:1/1

---| |-----------( )
B3:0/2 .. .... O:1/2

And so on....

Then in you program if you wanted to turn on pilot light when a photo eye is blocked it would look something like this.

PE101
---| |-----------( )
I:0/0 ........B3:0/0

Pilot light
---| |-----------( )
B3:0/0 ......O:0/0

The same process can be used for all of your inputs as well. So when it's all said and done it looks like this.

PE101
---| |-----------( )
I:1/0 ......B3:1/0

---| |-----------( )
B3:1/0 ...... B3:0/0

.........Pilot light
---| |-----------( )
B3:0/0 ...... O:0/0

The actual mapping is a little time consuming at first, but once you have done it once, it is a simple copy/paste/adjust to do it again.

Hopefully this answers your question.
Bubba.
 
Last edited:

Similar Topics

Hello, In my PLC, I have an array of 10 DINT (DINT[10]). This array is used to read message from another PLC (from MSG instruction). I now want...
Replies
4
Views
1,819
So my HMI is writing D words to the FX1s PLC for buttons, etc. How does one reference these bits in the PLC? I've tried several syntaxes on an...
Replies
3
Views
3,440
Hello, first time poster here! A belated "thank you" for the direction I've already received from this forum! So, can I do this? Move value 1...
Replies
6
Views
717
I was looking at a Studio5000 PLC file as reference, and noticed the "standard" for this job used was using program tags for each program folder...
Replies
1
Views
1,161
I was looking at a Studio5000 PLC file as reference, and noticed the "standard" for this job used was using program tags for each program folder...
Replies
0
Views
541
Back
Top Bottom