You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old July 4th, 2006, 03:49 PM   #1
chad k
Member
Canada

chad k is offline
 
Join Date: Aug 2005
Location: edmonton
Posts: 16
about periodic tasks

In an AB documentation explain the periodic tasks, the following is listed:
"In the past the function of a periodic task was accomplished by placing multiple copies of some select code within the continuous task. The code was placed at appropriate intervals so that the input would be detected and outputs controlled."

can anybody help me out to understand this?

Thanks a lot!
  Reply With Quote
Old July 4th, 2006, 04:43 PM   #2
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 4,596
Consider a standard ladder logic program. During execution it takes 50ms to complete 1 scan. But you have an operation which must be evaluated at least every 25ms.

So you could put the logic into a subroutine and call the subroutine twice during the scan execution. Another way would be to place the complete code twice in the main ladder at spaced intervals (this second is directly what is being described in your quote).

In either case in order for the routine to have fresh data you would use any "immediate input" functions which wer available and any "immediate output" functions to make the results available in a timely manner.

The "Periodic Task" is one which is called based on a time clock and interrupts the operation of the main scan. So it fulfills the function of the multiply called subroutine.
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old July 4th, 2006, 04:59 PM   #3
chad k
Member
Canada

chad k is offline
 
Join Date: Aug 2005
Location: edmonton
Posts: 16
thank you for your reply.

It is the "immidiate I/O" concept light me up. I guess it is I/O that is configured not restricted by the regular scan time. is this right?

thanks again.
  Reply With Quote
Old July 5th, 2006, 08:06 AM   #4
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 4,596
At least in Allen Bradley SLC500 and AutomationDirect a copmmand is available to cause an input to be re-read at the moment of the instruction's execution. There are also output instructions which do the same, an immediate update. The take a lot of extra CPU time an in some cases do not update the image that the rest of the ladder sees. But this is necessary for possibly multiple instances of the same code (either by multiple copies or multiple calls of the same subroutine) so that the code isn't just doing exactly the same thing - making its multiple call pointless.

In a machine we made which applied glue based on an encoder count a subroutine which did an immediate update of the encoder count for inputs and an immediate update of the glue solenoid as an output was called multiple times.
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old July 5th, 2006, 11:11 AM   #5
TConnolly
Lifetime Supporting Member
United States

TConnolly is offline
 
TConnolly's Avatar
 
Join Date: Apr 2005
Location: Salt Lake City
Posts: 5,412
In an application in a SLC500 where we are counting gear teeth with a proximity sensor the following code can be found in four places in the program.



--------------------+-IIM------+-
|SLOT I:3.0|
|MASK 08h|
|Len 1|
+----------+

I:3/3
---] [--------------+-CTU------+-(CU)
|C5:8 +-(DN)
|PRE 48 |
|ACC 0 |
+----------+





By placing this code four places in the program we don’t miss any gear teeth, however if it was only once we would miss teeth. Note that the CTU instruction can appear more than once operating on the same address. By placing it in four places and performing an immediate IO update for the proximity switch we can detect the true-false-true transitions and increment the counter ACC accordingly. (if you don’t understand why this works look up the instruction and refer to the .CU bit)



In a Controllogix PLC I have two options. I could configure the IO module for a fast update rate and place the code just once in a periodic task executing at a rate that is faster than the gear teeth can pass the proximity switch or, better still, I can place logic in an event task which will be executed by an event generated by the IO module every time the input changes state.

Last edited by TConnolly; July 5th, 2006 at 11:15 AM.
  Reply With Quote
Old July 5th, 2006, 12:59 PM   #6
plchacker
Member
United States

plchacker is offline
 
plchacker's Avatar
 
Join Date: Feb 2006
Location: Helwestern, AL
Posts: 314
Quote:
Originally Posted by Alaric
In an application in a SLC500 where we are counting gear teeth with a proximity sensor the following code can be found in four places in the program.


[ladder]
--------------------+-IIM------+-
|SLOT I:3.0|
|MASK 08h|
|Len 1|
+----------+
Note the Mask function in the IIM instruction. This is important if you have several inputs that need to be monitored. If you place all of the inputs on a single input card, you can check part of, or the whole card, without having to use two or more IIM instructions. In one case, I had to move inputs/outputs in order to allow a single IIM / IOM (output)each.

Placing the same logic, in multiple places will work, but the STI is a much more powerful tool. It makes sure that your selected code is processed at a regular timed interval that you can set, with of course some restrictions.

Funny thing, during a Rockwell Software Training session, the instructor pointed out what an STI was, then told us that we would not likely ever use one, or see one used. Famous last words. Several years later, I did find one, and then used one in a different program to solve an issue that had nagged me for seven years. If you have a time critical situation, consider the STI. With SLC500, you only get one, but with care, it can work wonders.
__________________
Its easier to beg for forgiveness than to ask for permission.
  Reply With Quote
Old July 5th, 2006, 01:03 PM   #7
plchacker
Member
United States

plchacker is offline
 
plchacker's Avatar
 
Join Date: Feb 2006
Location: Helwestern, AL
Posts: 314
Hey Bernie,


Spray Lines are fun aren't they? My first real projectin the plywood world as changing out a flying say, and rewriting the saw logic.
__________________
Its easier to beg for forgiveness than to ask for permission.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Periodic Event in RSView32 ghettofreeryder LIVE PLC Questions And Answers 4 May 4th, 2006 03:12 AM
PIDE's in periodic tasks RSLogix 5000 BENNY LIVE PLC Questions And Answers 18 August 25th, 2005 11:06 AM
Remotely Automating PLC tasks by changing tags over WLAN paseka LIVE PLC Questions And Answers 0 August 23rd, 2005 01:50 AM
Deleting Tasks in CL5k jimdi4 LIVE PLC Questions And Answers 1 May 10th, 2005 11:30 AM
Periodic event & Event in RSView ckchew666 LIVE PLC Questions And Answers 1 October 8th, 2004 07:37 AM


All times are GMT -5. The time now is 02:35 AM.


.