kolyur
Lifetime Supporting Member + Moderator
One of my customers builds equipment with a MicroLogix 1100 using a program I wrote some years ago. Now he wants to transition to a Micro 820 because the Rockwell rep sufficiently convinced him that the 1100 will not be around much longer. So this is my first foray into CCW (version 12). I will be manually rewriting the program (auto import of RSLogix program into CCW was astonishingly bad) but I want to keep the logic as similar as possible for ease of troubleshooting by electricians that will have to work on both generations.
I think I have CCW mostly figured out but I'm stuck on how to handle the sequencing. I used a bit-based sequencer on the 1100 program which consists of individual bits within a B3 word that are latched on and off in the corresponding steps. Nowadays I typically use integer-based sequencing but the bit method works well for this application and makes sense to others involved. A nice feature of this type of logic in RSLogix is that you can assign individual descriptions to the bits, which show up when addressing them individually, while still manipulating them as part of the entire word when necessary. So I'm using some comparison instructions, to indicate when the sequence is past its halfway point for example. Also a MOV or CLR to turn off all the bits.
I can't figure out how to replicate this in CCW, if it's even possible. I know I can declare an INT or DINT and then address the individual bits, but I can't assign individual descriptions to them which is fairly important for interpreting the logic. If I just create a bunch of individual BOOLs, I would lose the ability to manipulate them as a group. I thought about making a structured text routine that would set each bit of an integer to the state of a corresponding BOOL, which would basically achieve what I want but seems like a kludge. Thoughts?
I think I have CCW mostly figured out but I'm stuck on how to handle the sequencing. I used a bit-based sequencer on the 1100 program which consists of individual bits within a B3 word that are latched on and off in the corresponding steps. Nowadays I typically use integer-based sequencing but the bit method works well for this application and makes sense to others involved. A nice feature of this type of logic in RSLogix is that you can assign individual descriptions to the bits, which show up when addressing them individually, while still manipulating them as part of the entire word when necessary. So I'm using some comparison instructions, to indicate when the sequence is past its halfway point for example. Also a MOV or CLR to turn off all the bits.
I can't figure out how to replicate this in CCW, if it's even possible. I know I can declare an INT or DINT and then address the individual bits, but I can't assign individual descriptions to them which is fairly important for interpreting the logic. If I just create a bunch of individual BOOLs, I would lose the ability to manipulate them as a group. I thought about making a structured text routine that would set each bit of an integer to the state of a corresponding BOOL, which would basically achieve what I want but seems like a kludge. Thoughts?