PDA

View Full Version : SLC500 first scan


namboothiripad.mbs
April 23rd, 2008, 10:11 AM
Hi,
I am using SLC 500 with RSlogix 500.
In the following instruction for Latch/Unlatch I always get the output latched.


I0:0 B0:0/1
|----|/|------------------+-------------------()
| |
| B0:0/1 I0:1 |
|-----||--------|/|-------+

I0:0 (Stop Button wired to NC contact) is normally High. So B0:0/1 will not be High. On actuation of I0:0 I want to set the B0:0. When I0:1 goes Low, It will get Unlatched.

After Downloading the program, B0:0/1 gets Set, even though
I0:0 is high (rung is false). If I initiate I0:1 once then it works fine.After downloading, if I resets it once, it is ok.

I tried using First Scan bit,
I used Simple Latch/Unlatch instruction, But I am not able to solve the problem.

In another part of the code I have a different situation
where I want to latch the status of NO contact, which is Low
initially(NO contact of Push Button). Here the B0:0/1 is not latched after downloading.

I0:0 B0:0/1
|----||-------------------+-------------------()
| |
| B0:0/1 I0:1 |
|-----||--------|/|-------+

Does it mean, the Latch/Unlatch will work only with NO contacts ?
(Power not available in Input of IO module)

I must confess that I am new to SLC-500 as I normally work in Siemens S7 & S5 PLCs. Pressing a reset button is not too much, and the job of B0:0/1 willm start after I0:1 becomes high. But I want to know the answer.

Regards,
MBS Namboothiripad.

CowDung
April 23rd, 2008, 10:25 AM
It's probably not great form, but a short timer might help you out with your normally closed input. Use a NO timer done bit as the first condition of your latching rung. This will allow time for the PLC to read the I/O point correctly when the program first starts. By the time the timer expires, the NC contact will open so that the rung will not be latched until the button is pressed.

Your addressing seems a bit odd--there is no B0:0/1 format in SLC500. Could you mean B3:0/0 perhaps?

TConnolly
April 23rd, 2008, 11:06 AM
Hi,
I am using SLC 500 with RSlogix 500.
In the following instruction for Latch/Unlatch I always get the output latched.


I0:0 B0:0/1
|----|/|------------------+-------------------()
| |
| B0:0/1 I0:1 |
|-----||--------|/|-------+

I0:0 (Stop Button wired to NC contact) is normally High. So B0:0/1 will not be High. On actuation of I0:0 I want to set the B0:0. When I0:1 goes Low, It will get Unlatched.

After Downloading the program, B0:0/1 gets Set, even though
I0:0 is high (rung is false). If I initiate I0:1 once then it works fine.After downloading, if I resets it once, it is ok.

I tried using First Scan bit,
I used Simple Latch/Unlatch instruction, But I am not able to solve the problem.

In another part of the code I have a different situation
where I want to latch the status of NO contact, which is Low
initially(NO contact of Push Button). Here the B0:0/1 is not latched after downloading.

I0:0 B0:0/1
|----||-------------------+-------------------()
| |
| B0:0/1 I0:1 |
|-----||--------|/|-------+

Does it mean, the Latch/Unlatch will work only with NO contacts ?
(Power not available in Input of IO module)

I must confess that I am new to SLC-500 as I normally work in Siemens S7 & S5 PLCs. Pressing a reset button is not too much, and the job of B0:0/1 willm start after I0:1 becomes high. But I want to know the answer.

Regards,
MBS Namboothiripad.

It appears to me that you are getting your -] [- and -]/[- instructions confused with regard to whether the buttons are wired N.O. or N.C.

When you connect a N.C. button to an input and the button is not pressed the input is high. -] [- will be true when the button is not pushed, and -]/[- will be false when the button is not pushed. The -] [- and -]/[- instructions do not mimic the state of the device that is connected to the input, they are instructions to evaluate the input to see if the input is high or low.



START BUTTON is wired N.O. to input I:1/0
STOP BUTTON is wired N.C. to input I:1/1

I:1/0 I:0/1 B3:0/1
-+----| |--------+----] [----------------( )=
| |
| B3:0/1 |
+-----| |-------+

CowDung
April 23rd, 2008, 11:50 AM
That's not the way I read it. It sounded to me that he had a NC push button wired to I0:0. The input would normally be energized and the NC contact in his rung would be open and should not pass power to the coil. When the button is pressed, he wants to latch on coil B0:0/1 until another button is pressed that energizes I0:1 and resets the coil.

bmw_apprentice
April 23rd, 2008, 12:43 PM
yea i agree with you. could it be to do with the state they are downloaded in? i often have problems when training people where they have left values in their data tables and it does not clear so they have values they shouldnt have. you could try disconnecting your switch and simulating it with wire to check the input and the switch. eliminates that problem.

bernie_carlton
April 23rd, 2008, 01:10 PM
I agree with bmw_apprentice. Examine the state of the questionable bits in your offline file. This is the state which will be downloaded. I believe the First Scan bit is only valid on a power cycle or an actual switch from Program to Run. I don't think it is effectiv on the transfer to run after a download.

allscott
April 23rd, 2008, 01:21 PM
I believe the First Scan bit is only valid on a power cycle or an actual switch from Program to Run. I don't think it is effectiv on the transfer to run after a download.

I don't think so, in order to download the processor switches to program so I am pretty sure the first scan bit comes on after a download.

CowDung
April 23rd, 2008, 01:25 PM
I don't think so, in order to download the processor switches to program so I am pretty sure the first scan bit comes on after a download.

I agree. After a download, the processor is in Program mode and changes to Run mode when you click the OK...

kamenges
April 23rd, 2008, 01:30 PM
The first scan bit does come on with any transition into run mode. In addition the SLC prescan SHOULD evaluates all rungs in the program as if their composite logic state is false. This in effect sets bits referenced by OTEs to 0 during prescan. So even if you downloaded the program with the bit set to 1 it would assume a value of 0 after prescan.

Keith

Ron Beaufort
April 23rd, 2008, 01:33 PM
I rearranged the text of the original post ...



http://www.plctalk.net/qanda/uploads/doublecoil2.JPG



if I’m reading this correctly, then our original poster has a “double-coil” arrangement which is probably what is causing his first rung to seal-in after a download ... specifically, the second rung is executing the “double-coil” output with TRUE logic - which also affects the first rung ...



going further ... namboothiripad.mbs, it would be VERY helpful if you could post your .RSS program file from now on ... we’re having a hard time understanding exactly what you’re up to here ...



note to BMW_APPRENTICE:



with an Allen-Bradley SLC-500 system, it doesn’t really matter what state the bits were in when the program file was saved - and/or downloaded ... specifically, any OTE will cause the bit to go to a ZERO status when the processor first goes into Run Mode ... you might want to read up on “pre-scan” if you’re interested in going further with this ... now then, if the bit is changing to a ONE status when the processor first starts to RUN, then “something” is causing that to happen ... specifically, the OTE made the bit become a ZERO - on “pre-scan” ... THEN, something in the program made the bit become a ONE ...



my guess is that this is the root cause of confusion for namboothiripad.mbs ...


EDIT NOTE: I see that my distiguished colleague kamenges came up with the same idea while I was typing ...

going further: personally I won’t let my students use the term “latch” or “unlatch” for the type of rung construction being discussed here ... I prefer “seal-in” and “drop-out” or something else along those lines ... but definitely NOT “latch” and “unlatch” ... the simple reason is that the AB PLC does indeed have “Latch” and “Unlatch” INSTRUCTIONS (OTL and OTU) ... these instructions do NOT give exactly the same type of operation as a “seal-in” rung construction ... so to prevent confusion, the rungs being discussed in this thread should really NOT be referred to as “latching” rungs ... my students would (eventually) say that the outputs are not being “latched” - they are being “sealed-in” ...



going still further: once again I’m not 100% sure that I understand what our original poster is trying to accomplish ... maybe once the typos are corrected we’ll know more ... but ... I’d strongly recommend that we discuss the positioning of the START and the STOP buttons on those rungs ... if I understand what’s SUPPOSED to be happening, then we might have a “jog-past-stop” arrangement - and NOT a simple “start-stop” arrangement ... the difference in operation comes into play whenever BOTH BUTTONS are pressed at the same time ... normally in such a case, we’d want the “output” to be OFF ... the rungs in the original post would allow the “output” to be ON instead ... that’s VERY rarely the operation that we want ...



bad scenario: a programmer unintentionally uses a “jog-past-stop” arrangement - instead of a simple “start-stop” arrangement ... the boss tests out the machine by pressing START BUTTON - and then the STOP BUTTON ... and then repeats the test a few more times ... the machine responds perfectly ... the boss signs off on the job ...



BUT ...



at some point in the future, the START BUTTON becomes stuck ON and the operator really wants to STOP the machine ... ooops! ... the STOP BUTTON has been inappropriately located down in the “seal-in” branch ... this could have serious implications ...

namboothiripad.mbs
April 25th, 2008, 01:14 PM
Dear Experts,
The confusion was caused because of the use of terminologies in different technologies. Let me explain the Problem once more.


I want to stop a running motor after a few operations (may take a few seconds) after the STOP push button is pressed, but the operator will not keep it pressed. He presses once and waits the motor to stop. So I want to store the status in a bit and after the motor stops, I want to reset it so that next time I can stop the motor after I start it.



In the first case which I referred, I want to set a bit B9:1/0 if the sinal I1:1/1 goes LOW making the rung TRUE. The Bit will be reset when I:1/45 goes HIGH.



I1:1/1 is coming from a STOP Push Button’s NC Contact. So Normally(When not actuated/pressed) the Signal is HIGH. The rung is False. (In Siemens terminology, the signal state is HIGH and RLO is LOW)

I:1.2/13 is coming from a NC Contact, which will be in CLOSED state (Un-Actuated) at the time of Actuating the STOP Push Button I1:1/1. So the rung-branch is TRUE. When Finally I get I:1.2/13 signal HIGH when HT is off , the rung-branch is FALSE and the Bit is Reset, as by this time I:1.0/1 signal has become HIGH.



After Downloading the program, if I do not operate any devices, I:1.0/1 signal is HIGH, I:1.2/13 is LOW. But the bit B9:1/0 is set.



Both the inputs are coming from Input cards connected to the CPU through RIO Scanner module 1747-SN.





COMMON STOP COMMON STOP FLAG

I:1.0/1 B9:1/0

|---------------]/[-------------------------------------------------------------------------+-----------------------------( )

| |

| COMMON STOP FLAG HT OFF FEED BACK |

| B9:1/0 I:1.2/13 |

|--------------| |----------------------------------------------|/ |------------------------ --+





Signal states at different times :-



Signal

I:1.0/1

I:1.2/13

B9:1/0

After Downloading

HIGH

HIGH

Should be low

Before operating I:1.0/1

HIGH

LOW

Should be low

Upon operating I:1.0/1

LOW

LOW

High

After some time

LOW

HIGH

LOW







In the second case, I am setting Bit B9:1/5 when Push Button (Connected as NO) is pressed and signal is HIGH. When the OFF Push Button (Connected as NC) is pressed, the signal level is LOW and the Bit is Reset as I1:0/4 is LOW at that time.







PUMP ON PB

1:1.0/4 B9:1/5

|---------------] [--------------------------------------------------------------------------+-----------------------------( )

| |

| PUMP ON FLAG BIT PUMP OFF PB |

| B9:1/5 I:1.0/5 |

|--------------| |----------------------------------------------| |---------------------------+



While doing Cut-Paste operation, the coil nos became duplicate. So there is no double-coil problem, if you mean same coil output generated in two different rungs.



Is the CPU setting the Bit B9:1/0 before the input from RIO SCANNER reaches the Input File?

I heard that the CPU and the SCANNER operate asynchronously. (Parallel Operation)



How I solved the problem





STOP PB HT ON /B STOP FLAG

I:1.0/1 I:1.2/12 B9:1/0

|---------------]/[-------------------------------------------| |----------------------------+-----------------------------( )

| |

| STOP FLAG HT ON FEED BACK |

| B9:1/0 I:1.2/12 |

|--------------| |----------------------------------------------| |------------------------ --+





Instead of OFF feedback from the HT breaker, I used the HT ON Feedback. So I SET the bit when HT is ON and STOP Button is pressed. The Bit will be reset when HT is made on in the next Switching ON of the Breaker.



Now coming to the technical jargons,



1. ] [ and ]/[ are diagrammatic representations of XIC & XIO. We use NC and NO to say what is the status of the signal when unacuated. The four cases of NC/NO/ACTUATED/NOT-ACTUATED are made into Voltage Present/Absent as we see at the input of terminals in the PLC panel we can only see Voltage present or not. As PLC and Ladder Logic was replacement of relay logic, it is seeing the contact closed or open and the output is going to the coil of a relay.



2. What will you call the part of the rung which processes one signal ?



3. What is the technically correct term for what is mentioned as sealing-in, drop-out.

( I feel I am a drop-out from your school)


If the PLC program is of interest to anyone, I will post it next time.
Regards,

MBS Namboothiripad.

Ron Beaufort
April 25th, 2008, 02:00 PM
Greetings MBS Namboothiripad ...



unfortunately I don’t have time right now to go through all of the details that you have posted ...



but at least I’ll try to give you a quick answer to your specific question:



What is the technically correct term for what is mentioned as sealing-in, drop-out.



first, read through the post at this link -



http://www.plctalk.net/qanda/showthread.php?postid=70681#post70681



and pay special attention to the comments in the figure at the end ...



many people (including myself) refer to the top rung in that figure as a “seal-in” rung construction ... some other common names are “holding rung” and “start/stop rung” ...



the rung construction is based on a very similar idea used for hardwired (not PLC ladder logic) relays and pushbuttons ... the idea behind the name is that once the START button has been pressed and then released, the OUTPUT will remain ON - because the contacts in the lower branch will “SEAL-IN” (close) and provide a current flow ... then once the STOP button has been pressed, the OUTPUT will “DROP OUT” (de-energize) and then remain OFF ... and so we will have a control circuit which uses MOMENTARY pushbuttons - instead of using a MAINTAINED contact switch ... the advantage to this (in most cases) is that if a power failure occurs, the circuit will automatically “DROP OUT” (de-energize) and will NOT automatically come back ON again when the power is later restored ... this is an important safety feature in many machines ...



the PLC ladder logic rung that we’re discussing in the present thread closely resembles the hardwired relay system that I just described ... and (in most cases) it works in a very similar fashion ...



now at the bottom of that same figure is another method of using MOMENTARY pushbuttons to control a device ... the two rungs involved use “Latch” and “Unlatch” instructions ... this is what I personally would definitely refer to as a “latching” arrangement ... specifically, I would never call this a “seal-in” construction ...



I think that if you’ll carefully read through the text in that post that I linked above, you’ll understand the differences that I’m talking about ... also ... you might want to download the “Beginner Level Quiz #110” from my website - and the “Answer” file to that quiz ... (look in the Sample Lessons area) ... the “Answer” file contains a step-by-step method of analyzing an ordinary PLC scan cycle ... (see pages 4 and 5) ... I am SURE that you will find it enlightening ... work through it SEVERAL times - and then post any specific question that you have ... I’ll be teaching next week so my time will be short - but I’ll try to help if you need it ... other forum members will also certainly be able to help ... please notice that the quiz does NOT contain a “seal-in” type rung - but the ideas that are covered should be very helpful to you ...



I feel I am a drop-out from your school



I sincerely doubt that you would be unsuccessful here ... all that is required for success in my classes is MOTIVATION ... based on what you’ve posted so far, I’d say that you have plenty of motivation - but that you’re suffering from some of the same common misconceptions that a LOT of people have about what really goes on “under the hood” of the PLC ... I run into that in EVERY class - even from students who have years of PLC experience ...



I hope this is helpful ... I wish you success ...

Lancie1
April 26th, 2008, 03:03 PM
] [ and ]/[ are diagrammatic representations of XIC & XIO. We use NC and NO to say what is the status of the signal when unacuated. The four cases of NC/NO/ ACTUATED/NOT-ACTUATED are made into Voltage Present/Absent as we see at the input of terminals in the PLC panel we can only see Voltage present or not. As PLC and Ladder Logic was replacement of relay logic, it is seeing the contact closed or open and the output is going to the coil of a relay. Perhaps XIO does not work exactly like you think it does, as this chart illustrates:
http://www.plctalk.net/qanda/uploads/PLC_Inputs3.JPG