8 output SLC Sequencer help Pls

chrisflint

Member
Join Date
Aug 2005
Location
Norfolk
Posts
22
Hi All,
I need a little help here, i can program a sequence using lots of timers, but what i really need to do is have a one shot input which will step to the next output on every press of a button. i.e. one power up start at output 1, press button step to output 2, press button step to output 3, this goes round in circles thus, 1,2,3,4,5,6,7,8,1,2 etc.

Any help on a simple approach to this would be most grateful, any available code for this to suit the SLC would be just wonderful.

Regards Chris
 
Hi Chris,

No code... but I would use a MOV to a word, then look at that word for my output.... so mov B3:0/0 that has a value of 1 to B3:0/1, I am sure that this is the long way and there are 100 ways of doing it but I like to be able to look at my word B3:0 and see the value of the bit's

You can also use FIFO and several other ways, I am sure someone will tell you a better way :)

just a thought...
 
Another method is the SQO function however Geniousintrainings method is just as easy to set up or you can also use a counter and compare statements I have examples of the SQO but not the other two
 
You could do it with a sequencer instruction, like this:


| Input One-Shot |
| I:1/0 B3:0/0 +---SQO------------+ |
|----| |--------(OSR)--------| Sequencer Output |----|
| | File #B3:1 | |
| | Mask 0FFFFh | |
| | Dest O:2.0 | |
| | Control R6:0 | |
| | Length 8 | |
| | Position 0 | |
| +------------------+ |
| |

 
Can anyone tell me what instruction (and how to) compare or switch a bit/output for each position of the sequencer, i.e. i know i ignor position 0, but then want to energise say output 1 when seq is at position, output 2 when in position 2 etc.

I would be most gratefull for your assistances and helping me to get my head around this.

Best regards Chris
 
Last edited:
yer right I ran out of time so posted what I had should have specified that. Chris it depends on what your controlling if your looking for say a cylinder when it reaches position your going to need some form of signal feedback when in position then you can use that completed signal (ie a photoeye) then use that photeye input to activate the rung for the next cylinder. In the above example yuo can also use a time base but if something prevents the cylinder from working you won't know using timers. You may have to provide more info as to what your trying to run
 
mordred said:
yer right I ran out of time so posted what I had should have specified that. Chris it depends on what your controlling if your looking for say a cylinder when it reaches position your going to need some form of signal feedback when in position then you can use that completed signal (ie a photoeye) then use that photeye input to activate the rung for the next cylinder. In the above example yuo can also use a time base but if something prevents the cylinder from working you won't know using timers. You may have to provide more info as to what your trying to run

Hi Mordred,
Ok here is the real deal.

I am controlling 10 4" air operated valves, 8 valves are on the silos, silos are in banks of 4, there are two main discharge lines. discharge from each silo is in sequence and valve 9 operates when 1, 3, 5 or 7 are open and 10 operates when 2, 4, 6, or 8 opens. Reason i wanted to sequence the outputs is beacuse i need to have a minimum time open if a valve does not open, have a 2x differential inputs (1 for each bank) if the temp matches the input and discharge temp then step to next valve, and a maximum time if differential is not satisfied. I do have 20 inputs to give me closed and open condition of each valve. I feel with this approach it is by far the easiest approach without using a massive amount of timers and complecated logic. also i will be adding in fault logic if a valve does not reach its limit when operating within a few seconds.

Hopes this makes this all look clear now.

Regards Chris
 
Again there are several ways that you can do this...

One way would be looking at the word that you are MOVing the bit's (if you went that route) if you look at the word as a decimal then depending what bit was true your value would be different, then you can use that as an equals, so if your value in B3:0 = xxxx then you would run/start routine X.... if it was something else then your other would be true, see below

Also see if you can use something like this if you went the way Lancie1 said to go, its just compare, then do...

Binary111.JPG



Binary1112.JPG
 
Can anyone tell me what instruction (and how to) compare or switch a bit/output for each position of the sequencer, i.e. i know i ignor position 0, but then want to energise say output 1 when seq is at position 1, output 2 when in position 2 etc.
First you need to understand how a Sequencer works. It is a simulation of the old mechanical drum switch. When the drum turns, it has "knobs" (protrusions) on it that activates output switch contacts. The outputs and the sequence of the outputs are strictly defined and pre-set ahead of time. You can only control WHEN the drum turns (steps to next output), not how the outputs are arranged (once they are set). That is why a sequencer is only useful for an operation that is well-defined, well-known, and once set, the sequence never varies.

For the SQO instruction, you can manually set the outputs ahead of the operation by opening the Data Table (B3 in this case) and setting one-or-more bits to "1" in a series of words (16-bit collection). This series of words is the "pattern" that the sequencer uses to determine which Outputs to turn on on each Step. In my previous example, with Start Position #B3:1, and using Words B3:2 to B3:9 (Length of 8 words):

To turn on Output O:2/0 in Step 1, set B3:2 = 0000000000000001 (decimal 1).

To turn on Output O:2/1 in Step 2, set B3:3 = 0000000000000010 (decimal 2).

To turn on both Outputs 0 and 1 on Step 3, set B3:4 to 0000000000000011 (decimal 3).

To turn off all Outputs in Step 4, set B3:5 to 0000000000000000 (decimal 0).

To turn on Output O:2/2 in Step 5, set B3:6 = 0000000000000100 (decimal 4). You get the idea.

Once Step 8 (or whatever you set Length) is done, the sequencer goes back to Step 1 and repeats the cycle.

To prevent any bit from being capable of turning on, set a 0 in the "Mask" for that output.

The ahead-of-time sequencer set-up operation can be done automatically by the PLC, usually on the First Scan by using S:1/15 to move the correct value to each word of the SQO sequencer. A PLC sequencer's steps can actually be re-defined while operating, but that job is not recommended for the beginner.
 
Last edited:
here is the corrected program using counter/equal statements
I haven't added any code for the feedback from your sylo

Had to change the processor type to run a simulation as I don't have rs simulator so its currently set for a SLC 504 and the ouput card is a 240 volt
 
Last edited:
Chris it almost sounds like the instructions that may work best for you is to use SQO for the outputs SQL to load the actaul positions to a data file
(on seperate input card) then compare statements to activate the steps once the temperatue is correct. If temp is not correct the max timer forces the outputs to the next step. Using the program I wrote you can add an R6:0 statement to increment at the same time as the counter use the SQL then compare to the data table value N7:0 when it equals and temp is in range or max timer then increment counter and r6:0(by incrementing b3:0 in Lancies example)
 
Last edited:

Similar Topics

I had a 5/01 CPU give a CPU Fault. It lost the program and I was not able to establish communication with it. I replaced it with a 5/03 we had in...
Replies
3
Views
111
I have an strange thing happening with a SLC 5/04 On a 1746-OA16 output card I get 120 volts with or with out the output being true. The LED for...
Replies
5
Views
1,788
A customer asked if I could change an output address in a SLC 500 that he thinks is bad. I've not worked with that PLC before, so I asked him to...
Replies
6
Views
2,572
I just had a weird one last night and was wondering if anyone else has ever seen this. A SLC5/05, 7 slot rack. One thermocouple input, One 18...
Replies
3
Views
2,068
Just looking to learn something today.... My understanding is that an output shorting on a SLC Triac card is a pretty standard card failure, with...
Replies
6
Views
2,330
Back
Top Bottom