Logix5000, PLC question

Join Date
Jul 2007
Location
Kiruna
Posts
600
Hi Guys,

I need a few tips here as for something I thought was simple I may be over complicating. I started this and now realise there is a ton if if statements required to get this right.

Logix5000,FTView SE

I have 6 PLC controlled machines that I want the ability to pair as required from HMI.

Logix5000, FTView SE

Feed Mac1 Mac2 Mac3 Mac 4 Mac5 Mac6
Machine 1 1 1 1 0 0 0
Machine 2
Machine 3
Machine 4
Machine 5
Machine 6
Machine 7

Each machine has a Machinex_Media_Word tag of type Int. In the first selection row I have paired 1,2 and 3 so they will share the same feed resources.

If I set the respective bits in the INT through radio buttons on HMI how do I get it to copy down through each word ensuring that there are no invalid selections?

In other words if Machine1, Machine2 and Machine 3 are paired they will share the same resources, so on the next line Machine 2 should automatically be 111000.

Does this make sense?
 
I would just have a 7x7 grid on the hmi of radio buttons. Each time a button is pressed it also sets/resets the corresponding button on the paired row. So if 1-7 is set then 7-1 is set. Then all the words will have the correct bit pattern. Of course 1-1 and 2-2 etc would be grayed out.
 
Hi Robert,

Thats exactly what I have. Its just a lot of if statements and bit setting. I thought i might have been over complicating it.
 
I see the delimma now. You want transitive pairing. If you pair 1 to 2 and 1 to 3 you automatically want 2 paired to 3 and 3 to 2. There is probably a way to reconcile the grid after the fact but on the fly you might have to live with the IFs.
 
Last edited:
I see the delimma now. You want transitive pairing. If you pair 1 to 2 and 1 to 3 you automatically want 2 paired to 3 and 3 to 2. There is probably a way to reconcile the grid after the fact but on the fly you might have to live with the IFs.

Aha Robert,

I didn't know how to word it. Transitive pairing is perfect!

As I see it now its going to be much more than ifs, not its gonna be IFs and ANDs, its gonna be messy.
 
Maybe change it so that you select the group.

Code:
M# G1 G2 G3 G4 G5 G6
M1 1  0  0  0  0  0
M2 1  0  0  0  0  0
M3 1  0  0  0  0  0
M4 0  1  0  0  0  0
M5 0  1  0  0  0  0
M6 0  1  0  0  0  0

If they can't be in more than one group. then use radio buttons.
If they can be in more than one group, use checkboxes.
 
They cannot be in more than one group

Feed M1 M2 M3 M4 M5 M6
Machine 1 1 1 1 0 0 0
Machine 2
Machine 3
Machine 4
Machine 5
Machine 6
Machine 7

By selecting (via radio/tick boxes) M1 M2 M3 to form a group, I need Row 2 and 3 to be populated as follows:

Feed M1 M2 M3 M4 M5 M6
Machine 1 1 1 1 0 0 0
Machine 2 1 1 1 0 0 0
Machine 3 1 1 1 0 0 0
Machine 4
Machine 5
Machine 6
Machine 7
 
how about looking at it as a multiplication table. Row x Column with each square having a value.

Capture.PNG
 
I typed something up earlier but lost it. If you go into excel and do a 7x7 grid you'll note a pattern. Each time you set a bit high in a row if you copy that row to each column that has a high bit in that row it works out. If you clear a bit you clear the column and then recopy the row to each column again it works out. I didn't carry it far through all the permutations but it did show a pattern.
 
the first post was just a thought. Here is a excel sheet that may help give you an idea. I would have to do this in a plc to get these values. I am not a SE user so I am not sure how to accomplish this in FTVSE.
 
Hi there all,

Thanks again for your input. The excel sheet you sent I have tried.

If I select M1 M4 and M5 in row 1, must I then go and select M1 and M5 in M4 row? This should be done automatically ideally to avoid any mistakes.
 
After playing with the sheet and re-reading your post. I realized 6 bits true in DINT = 63 therefore if you set M1 row 123 that equals 7. So Move 7 into M2, M3. and Move 56 into M4,M5 and M6. This would pair 123 and pair 456. There are 20 combinations to do so it could be done in 20 rungs.

123,124,125,126.134,135,136,145,146,156.
234,235,236,245,246,256.
345.346.356.
456

LOGIG for 123
XIC M1.0 XIC M1.1 XIC M1.2 MOV 7 M2 MOV 7 M3 MOV 56 M4 MOV 56 M5 MOV 56 M6
 

Similar Topics

So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
427
Hello everyone, I have an RSLogix5000 project which is running live in the factory but I need to make some changes to the logic. I want to test...
Replies
0
Views
1,120
What is the best way to set a bit over an ethernet/IP network on an Allen-Bradley ControlLogix Series PLC from a Windows PC. We have a program...
Replies
7
Views
2,105
Hi everyone, How can I know what type of tag do I have to use? Like if i have a coil that is connected only to contacts and can be used by all...
Replies
6
Views
2,939
I am an Electric Engineer working as a maintenance engineer and manage some technician on the production hall now but in the past, I mostly focus...
Replies
12
Views
3,552
Back
Top Bottom