8 output SLC Sequencer help Pls

Mordred,

I think that it is the same project. As you see, I asked many questions in that old thread. Chris apparently thinks that someone can write him a working program without knowing WHICH terminals his Inputs and Outputs are connected to. A program will work only as good as the information used to create it. Poor info = poor results. Who wants to risk his reputation writing something that is almost guaranteed not to work, simply because there is not enough info to do the job?

Here are more questions that Chris needs to answer:

1. Which of the six 5/03 processors are you using? (Choosing the wrong one will prevent your program from running!)
SLC503_Choices.jpg


2. Which Input modules are you using? You said they were 16 Inputs, but are they the 1746-IA16, 1746-IB16, 1746-IC16, 1746-IH16, 1746-IM16, 1746-IN16, 1746-ITB16, 1746-ITV16, 1746-IV16, or you just don't know? Using the wrong one in a program will result in compile errors!

3. Which Output modules are you using? You said they were 16 Outputs, but are they the 1746-OA16, 1746-OB16, 1746-OB16E, 1746-OBP16, 1746-OG16, 1746-OV16, 1746-OVP16, 1746-OW16, or you just don't know? Using the wrong one in a program will result in compile errors!

4. Are the Input and Output cards installed? If so, which slots are they in? Which slot is the RTD card in, and what is its correct Part Number? Using the wrong module part numbers can cause the processor to go into Fault mode!

5. Is the PLC configured for the correct arrangement of the modules? Using the wrong slot numbers can cause the processor to go into Fault mode!

6. Is the SLC 5/03 already wired up? Is power connected? Are the inputs connected? Are the outputs connected? If so, where is each one connected? Using the wrong input and output addresses will cause your program not to work!

Answering these questions is a real chore. That is why it is usually easier for the Questioner to submit a preliminary program, with the processor, rack, slots, modules, and I/O configured to match his set-up.
 
Last edited:
thopught I recongnized the variation on the question seen lots of sequence questions lately I was almost ready to assume a homework assignment glad I was wrong on the second thought
 
mordred said:
I take it this is the same project as this thread?

http://www.plctalk.net/qanda/showthread.php?t=37972


Yeah Mordred,
You are spot on! it is that very project.

I have sorted out all the sequencing now and the differential inputs to step to next output.

Later this week i will put in some more effort and start on the fault handling. I have approx two weeks left now before i need to install the code into the plc for the job.

I didnt get on AB 5 day course next week as i was hoping to do, so looks like that course is going to be sometime in the future now.

Regards Chris
 
Lancie1 said:
Mordred,

I think that it is the same project. As you see, I asked many questions in that old thread. Chris apparently thinks that someone can write him a working program without knowing WHICH terminals his Inputs and Outputs are connected to. A program will work only as good as the information used to create it. Poor info = poor results. Who wants to risk his reputation writing something that is almost guaranteed not to work, simply because there is not enough info to do the job?

Here are more questions that Chris needs to answer:

Hi Lancie1,
Wow does that sound like an offer to write the code hehe..

Actually it would be real nice for that, but really what i was after was some real good pointers and examples to see some code so i could get my head around sequencers, i had seen code for many others but just couldnt get to grips with them.

I will say that i have spent some 8 hours writing and testing code and am getting on pretty well, well thats my opion, i will put the code up, maybe you can look at it and tell me if i am way off line.

It is not complete as yet, but is running with the maximum timer in circuit (it is set down to seconds, not the 20 mins it will end up as)

Any feedback will be appreciated whether positive or negative, i will take it all as constructive..

Regards Chris
 
At a quick glance looks like you've got the idea behind the sequencers or at least I didn;t see anything that jumped out as wrong. Although you have no control entries for the outputs for your SQO instruction right click on the instruction and go display special currently all bit pattern entries are all 0's which means no outputs will turn on your mask is correct to understand what I mean is you will need to place value 0000 0000 0000 0001 on b3:1 step 0 when true this will run output 1
0000 0000 0000 0010 on b3:2 step 1 output 2
0000 0000 0000 0100 on b3:3 step 2 output 3
0000 0000 0000 1000 on b3:4 step 3 output 4
bit shift left each entry till you reach b3:9
Doing that you won't need all the rungs on your outputs ladder 3 as the SQO statement will control your outputs You can still use the rungs with the Or statements to run the outputs 9 and 10. To explain further whichever step is on the SQO the results of the mask will tell the processor which outputs will turn on. In other words the SQO will drive your outputs
 
Last edited:
also don't believe you need rungs 4 to 9 on ladder 2 so want to use your button press in an "or"statement with the max timer to drive your SQO OSR statement. Later I'll try to get time to change what you have to correct the mistakes I see but I won't be able to run a simulation test
 
I will say that i have spent some 8 hours writing and testing code and am getting on pretty well, well thats my opion, i will put the code up, maybe you can look at it and tell me if i am way off line.
I am sorry to be the one, but someone really should warn you: you are WAY off line.

The SQO command should control your Outputs. Apparently you have some other ideas about how a Sequencer instruction works. You just need to read the instruction manual (or the Help file) for RSLogix on the "SQO" command. Read it until you understand what it says. It is the Sequencer that is supposed to do the work and replace all those OTHER rungs that you have in your prograam. The whole reason for using a sequencer is to minimize the amount of logic needed, although at the expense of making it more obscure.

Your understanding seems to be so limited, that I don't think an example will do you much good. I don't think you would be able to figure out how it was working, until you understand the basics of the SQO instruction.

If you insist on a program example, just look in the "Downloads" under "Allen Bradley" for sequencer examples.

SQO [Sequencer Output]
Rockwell Software 2000

Use with processors: All SLC and MicroLogix processors

Example of Instruction(Parameters shown are examples only, your data will vary.)

Description
Use the SQO instruction with the SQC instruction to transfer 16-bit data to word addresses for the control of sequential machine operations.

On successive false-to-true transitions, the SQO instruction moves a step through the programmed sequencer file, transferring step data through a mask to a destination word. The done bit is set when the last word of the sequencer file is transferred. On the next false-to-true transition, the instruction resets the position to step one.

You may use indexed or indirect addressing to represent addresses in this instruction.

You can use the reset (RES) instruction to reset a sequencer. All control bits (except FD) will be reset to zero. The position will also be reset to zero. Program the address of your control register in the RES

Entering Parameters:

File is the address of the sequencer file. Make sure to use the file indicator (#). This file stores the reference data for monitoring inputs.

Mask is a hexadecimal code or the address of the mask word or file through which the instruction moves data. If the mask is a file, its length will be equal to the length of the sequencer file. The two files track automatically. You can enter the code in binary, decimal, or hexadecimal. RSLogix500 will make any necessary conversion and display the hexadecimal value. Click here for an example showing how to enter the Mask value using hexadecimal, binary, or decimal values.

Destination is the address of the output word or file for a SQO to which the instruction moves data from its sequencer file.
Control is the instruction’s address and control element (3 words) that stores the status byte of the instruction, the length of the file, and the position in the file. Do not use this address for any other instruction. Status bits in the control file include:
11 = ER (error bit)
13 = DN (done bit)
15 = EN (enable bit)

The control element:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Word 0= EN DN ER
Word 1= Length of sequencer file
Word 2= Position

Length is the number of steps of the sequencer file starting at position 1. Maximum = 255 words (104 words when using the MicroLogix controller). Position 0 is the startup position. The instruction resets (wraps) to position 1 at each cycle completion. For example, placing a 6 in this parameter means 6 elements beyond the starting address (total of 7 elements). A length value that points past the end of the programmed file causes a runtime major error to occur.

Position is the word location or step in the sequencer file from/to which the instruction moves data. A position value that points past the end of the programmed file causes a runtime major error to occur.

Related Topics
Sequencer Instructions
SQC (Sequencer Compare)
SQL (Sequencer Load)
Addressing Help
Rockwell Software 2000
 
Last edited:
Chris,

You are making this program a lot harder than it should be. You used about 64 rungs in your attempt and it still doesn't do the job. It can be written with about 21 rungs:

Rungs 0: Load patterns (binary words) into PLC memory that will control your sequence of outputs. You will need about 8 parallel branches on this rung, with a MOV command on each branch.

Rung 1: Sequencer that turns on Outputs based on patterns. This rung will need 6 parallel input branches to advance the sequencer based on: Input Switch, temperatures equal, temperatures not equal and Timer 0 done, stuck closed, stuck open, stuck midway.

Rung 2: Start Timer 1 and if Temperatures Not equal when Timer Done, use T4:0/DN bit to advance to next step.

Rung 3: Turn on Valve 9 if Valve 1, 3, 5, or 7 is ON.

Rung 4: Turn on Valve 10 if Valve 2, 4, 6, or 8 is ON.

Rungs 5-14: 10 Valve Indicator Lights and flashers

Rungs 15 - 18: Detect stuck valves, advance on "stuck closed", advance after 5 minutes on "stuck open" or "stuck midway"

Rungs 19, 20: Extra rungs in case I forgot something!
 
Last edited:
It will take about 31 rungs because I miscounted the indicator lights. There are 2 for each of the 10 valves, so it takes 20 total instead of 10 rungs for the lights.
 
Change your destination on the SQO statement to O:4.0, place the bit patterns described above and yu'll be able to see what Lancie and I are describing on the SQO
 
Last edited:
This is by no means complete, What I have done is change your
SQO destination to the first output card on your rack assignment so yur outputs to your 8 valves will need to be on outputs O:4.0 to O:4.7. length to 7 (0 to 7 provides the 8 sequences)
I removed the extra rungs on ladder 3 but did not remove the ladders on your digital ladder section. What is the intention there? do you have seperate switches to control the valves?
 
What I have done is change your
SQO destination to the first output card on your rack assignment so yur outputs to your 8 valves will need to be on outputs O:4.0 to O:4.7. length to 7 (0 to 7 provides the 8 sequences)
Mordred, You are right on about the Outputs O:4/0 to O:4/7. But the SQO "Start position" (Position 0) is only used as a resting place. Once the sequencer is enabled, it cycles from Position 1 to Max Position back to Position 1, skipping Position 0 until it is Reset. Therefore, the SQO still needs to have a Length parameter of 8.

I roughed out a program last night, letting the SQO do most of the work as you have said. It is must simpler than Chris's first draft.
 
Chris,

Take a look at this version. It only has 38 rungs, yet includes:

A sequencer that controls 8 valve outputs (MV9 and MV10 are controlled by other means),
Automatic loading of sequence pattern on first scan,
On/Off Selector Switch,
Flashing Fault Indicator Light,
Fault Light Reset Pushbutton,
20 Valve Position Indicator Lights (that flash on fault, solid on no fault for that valve),
Advance sequence on initial start-up,
Advance sequence if temperature differential < 4 degrees,
Advance sequence after 20 minutes if temperature differential > 4 degrees,
Advance sequence if valve stuck closed,
Advance sequence after 5 minutes if valve stuck open, and
Advance sequence after 5 minutes if valve stuck midway.

Other features you may need:
1. Decide if you need to reset the sequencer to Position 0 if the On/Off Selector Switch is turned off, forcing a sequence restart at Position 1, OR

2. If Selector Switch is turned off, should all valves close, and then restart at same place in the sequence when the switch is again turned on?
 
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
138
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,850
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,607
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,112
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,362
Back
Top Bottom