Contrologix Number to bit position?

mhopley

Member
Join Date
Jun 2005
Location
Manchester
Posts
65
I am trying to duplicate some Modicon code in a Contrologix PLC.
This a sequence step number that is incremented on each step (78 steps). The modicon code uses a MBIT instruction to set a bit corresponding to each step.

I am struggling to find a neat way of doing this in Logix 5000.
My first thought was a boolean array and just have a coil of Step[StepNumber] but you can't manipulate boolean arrays to reset the coil.

Also I would like to have this in a UDT (I have 28 identical sequences) and have a description of each step.

I'm thinking an AOI with 78 compares might be the only way.

Does anyone have any ideas for a better method?

Thanks
 
Perhaps one of these would work for you:

  • bit shift (left/right) array
  • Sequential Function Chart
  • Sequencer instruction
  • An integer-controlled stepper
The last working like so: while INT=1 do all the things needed for step 1; when step 1 complete, increment INT to 2.

while INT=2 do all the things needed for step 2; when step 2 complete, increment INT to 3, etc.
 
Perhaps one of these would work for you:

The last working like so: while INT=1 do all the things needed for step 1; when step 1 complete, increment INT to 2.

while INT=2 do all the things needed for step 2; when step 2 complete, increment INT to 3, etc.

Thanks Doug, an integer controlled stepper is exactly what i am doing but rather than have StepNum = 1 in my program I want a contact with a description Like Step01 Wait For start.

BSL might get me there,now that I realise that I can't use boolean arrays.
SQO/SQI seems over the top for what I am trying to do
NO SFC licencse
 
Thanks Doug, an integer controlled stepper is exactly what i am doing but rather than have StepNum = 1 in my program I want a contact with a description Like Step01 Wait For start.
So, set up a series of rungs with EQU stepnum 1,2,... OTE Step01... Then use the Stepnn outputs.
 
I use an array of UDT's for most of my sequencers, and just index through them.

The basic format of the UDT is an input mask, an input ignore mask, an output mask, a timer, and a string field for the step description. Then I put them in an array of however many steps I need.

When a sequence starts, I just move the output mask to the controlled outputs, and wait for the input mask to match whatever it should be, and then move to the next step.

I copy the active step to an identical UDT just so my HMI's can point to one thing and always have current information.
 
So, set up a series of rungs with EQU stepnum 1,2,... OTE Step01... Then use the Stepnn outputs.

That is exactly what i was suggesting with an AOI and 78 compares.

rdrast,
I like your idea, I already have an action table for each step which calls different subroutines.
I was trying to keep close to the Modicon code so as not upset too many sparks :)
 

Similar Topics

Is there anyway to determine via GSV instruction that edits occur in a 1756-L63 CPU? We are having a timing problem with our Ignition...
Replies
5
Views
2,763
Can anyone confirm that using contrologix 5580 controller is not possible to work with powerflex 527? It's been a couple of days now that i am...
Replies
8
Views
1,179
Hello, I have a flow control PID that keeps locking up. It seems to control fine but after a while the output no longer moves. For instance...
Replies
4
Views
958
Hi everyone, I can't add any modules to the Controllogix backplane and it doesn't matter online or offline. Both is not working. Please see the...
Replies
13
Views
2,972
Hello, I have a question regarding the possibility of using messages instructions to communicate between: PLC5/80E Series D - CE Water Mark...
Replies
12
Views
3,049
Back
Top Bottom