Sign in to follow this  
Followers 0
bigjoe

Acheiving output with PLS

8 posts in this topic

First, this is the part of the program that i wrote: ----lX1l----------[ PLS M0 ] ----lM0l----------[ Y0 ] But when I run the program Y0 did not turn ON. Then I modify it with this next circuit: ----lX1l----------[ PLS M0 ] ----lM0l----------[ SET Y0 ] with this Y0 turns ON. I aslo included another PLS and RST instruction on the next line to turn Y0 off. Is it really necessary to incorporate SET and RST command everytime we use Pulse instruction to achieve output? regards, johnny

Share this post


Link to post
Share on other sites
When using PLS instruction for the device designated by destination (D), the specified device turns ON One Scan.

Share this post


Link to post
Share on other sites
What is meant by one scan actually? sorry just new on plc, basically I can make program out of it similar to relays, so I am just starting to learn other functions. Is that the reason why in the first circuit Y0 did not turn on? regards, johnny

Share this post


Link to post
Share on other sites
when you write program and download it to plc, plc executes your code line by line until it reaches end of the program. after that it simply does it again and again and again... this is called scanning (interpreting of your program). single scan is just one pass of the program. if you look under plc status and see something like "plc scan = 3.400ms" it means that plc can execute whole program in 3.4ms or almost 300 times per second. when you use PLS instruction to turn on output, it works but it happens so fast that you cannot see it. if you want to see something this fast, you should use scope. usually plc scan time is in the order of 5-30ms depending on plc type and size of program, but this is not carved in stone. there is always some overhead as well (like communication etc.)

Share this post


Link to post
Share on other sites
panic, thanks for explaining. When do we usually use pulse function on practical applications? If you use it in with SFTL function (BSL) will the output of the SFTL function be seen on the real world? johnny

Share this post


Link to post
Share on other sites
when ever you need to do something only once.... for example you have + and - pushbuttons (or 'previous' and 'next') to change some value. If you press such button for some 1 second or so it will work but it will do the job on every scan. depending on scan time and duration of press you will get the value to change dozens or hundreds of times. also search for flip-flop logic.

Share this post


Link to post
Share on other sites
PLS is not a good instruction to use with real world outputs since the scan time of the PLC is in milliseconds, you'll most likely never see the output even activate (especially if it's a relay as they take a long time to switch states). It's good for making something in your program happen once. But most of the instructions (MOV, ADD, etc) allow for a pulsed instruction just by adding a P to the end of the instruction. MOVP performs a move only once at the off to on transition of te logic feeding the instruction. It will not happen again until the logic has turned off and back on.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0