I'm searching multitask structure in PLC ?

wojteks

Member
Join Date
Mar 2005
Posts
5
I'm writting an application which has to be done in multi-structure (task Mast,task Fast, and the events), but exactly I don't know what should be programme in fast tast and what in events.
Maybe is there anybody who programme applications
like this and could give some hints, or maybe someone have description, specification about this topic.
icon12.gif
 
Last edited:
wojteks,

"Multi-tasking" for a PLC usually means that the PLC can be made to do many tasks at the same time. Most PLCs cannot really do more than 1 thing at a time, but with the use of clever programming, it can be made to APPEAR as if it is doing many things, when really it is doing the tasks in sequence one after the other, but so fast that to a human they appear to be done at the same time. The key is a concept called "Interrupts".

A PLC microprocessor can be built to have a signal that causes the normal program scan to be temporarily halted, and another routine ran instead, and when the Interrupt routine is finished, then the normal program is resumed. An Interupt routine is triggered by some external input or condition in your program.

Your tasks (jobs to be performed by the PLC) can be divided into priority (importance) levels, and an Interrupt routine prorammed for each level. This usually is only needed for tasks that have to be peformed at high speed or in a short time. For 95% of the things that a PLC is used to do, then the normal program scan is adequate, and the Interrupt routines are not needed.
 
Last edited:
IEC!!! Your PLC and software will need to be able to handle tasks. Usually there are 16 that you can use.

What brand of PLC (model etc) and software (version etc)? Then maybe someone can help you.
As an example. Omron CX-Programmer will allow you to program tasks and will also allow you to break your program into sections.

More information required.
 
I don't know what "task mast" and "task fast" terminology implies.
I take it that English is not your first language.
In any case the ideal PLC platform for multitasking is built
into AB's ControlLogix processors. You can set them up for
periodic processing (as opposed to continuous) and you can assign
processing times and priorities to each task. You can also generate event driven interrupts.
 
I believe he may have been exposed to the Modicon Quantum/Premium Line. That is terminology they use in their applications.

But I am sure that the most brands support this now.

As far as hints. Forethought is the word of the day here.

Look at your processes that will be controlled. Break them into their components and determine what needs to be updated a a fast rate.

Typically, PID control can be put in a timed task that has a relatively slow update. High speed counting applications need fast updates or a special card with its own processor to handle that rate.

You just need to give it some thought. What is your application? That maybe would help with getting the tips you want.

David
 
I believe that task Mast and task Fast are just names for the tasks referred to. They can really be anything. Will post a bit more later.
 
Here is some information from Omron CX-Programmer help files that may shed some light on the subject for you.

"Multi-tasking" for a PLC usually means that the PLC can be made to do many tasks at the same time. Most PLCs cannot really do more than 1 thing at a time, but with the use of clever programming, it can be made to APPEAR as if it is doing many things, when really it is doing the tasks in sequence one after the other, but so fast that to a human they appear to be done at the same time. The key is a concept called "Interrupts".

Very close. I guess multi-programming is probably more accurate. From the zipped help files, a task can be turned on or off as required. If several tasks are turned on, they are processed. If they are turned off they are ignored. Thus scan times can be dramatically reduced by turning off tasks. If all tasks are on, the scan time will extend due to the extra processing. Very variable scan times are common place with this type of program.

Interrupts can be programmed to occur in most PLCs with out programming tasks. There are various methods but the most common ones are to either program a time based interrupt (called different things in different brands) or an interrupt based on an event.

PLC programmers have been using interrupts, interlocks etc for years to perform what now can be programmed in a far easier fashion using the task commands.

A further advantage can be observed in the zipped help files where most of the program can be left without password protection and only the "tricky" software that you want to protect can be placed in a task and password protected.
 
More information about multi-task structure

BobB said:
IEC!!! Your PLC and software will need to be able to handle tasks. Usually there are 16 that you can use.

What brand of PLC (model etc) and software (version etc)? Then maybe someone can help you.
As an example. Omron CX-Programmer will allow you to program tasks and will also allow you to break your program into sections.

More information required.

I'm working on an aplication that should control an elevator, and all program shoul be programme in three tasks ( Mast, Fast and Event).
My PLC is TSX Micro 37-22 ( company Schneider ), my software
is PL7 Pro (ver.3.4). I know mainly properties of this PLC and software (i can programme 16 events).
Thanks
 
More information about multi-task structure

davidg68124 said:
I believe he may have been exposed to the Modicon Quantum/Premium Line. That is terminology they use in their applications.

But I am sure that the most brands support this now.

As far as hints. Forethought is the word of the day here.

Look at your processes that will be controlled. Break them into their components and determine what needs to be updated a a fast rate.

Typically, PID control can be put in a timed task that has a relatively slow update. High speed counting applications need fast updates or a special card with its own processor to handle that rate.

You just need to give it some thought. What is your application? That maybe would help with getting the tips you want.

David

I'm working on an aplication that should control an elevator, and all program shoul be programme in three tasks ( Mast, Fast and Event).
My PLC is TSX Micro 37-22 ( company Schneider ), my software
is PL7 Pro (ver.3.4). I know mainly properties of this PLC and software (i can programme 16 events).
Thanks
 
Do not comply with Lancie, but Bob I agree. Only when parallel processing exists can have is assertion. When an equipment receives the order of execution and make sequence independent, can affirm that operation exists multi-tasking.
 
Okay,


Are you a student? If so, I will help, but I will not do your homework for you.

List out your inputs and outputs. Then write a basic sequence of operations. This will allow you to see where you might have missed some steps and add to it as necessary to get to a point where you are comfortable with the sequence. Then, considering your inputs and outputs, assign that I/O to various functions. This in turn will ensure you have all the necessary I/O and present any possible holes you may have. After this, determine what is the highest priority. Events, in this case, will interrupt normal processing of the program and execute logic to handle that situation. I can think of a few things on an elevator you may want to process like that and they have to do with safety. I really do not think anything else will need to be in anything but the Master Task, but someone else may have some input there. Say, elevmike?

David
 
For the Telemecanique TSX37 family the task definitions are:

Mast[er] -> this portion of control logic is scanned sequentially, this is the type of logic scanning found in the majority of PLCs, the actual scan time is dependent on things like amount of logic that is active (in particular data moves and math) and servicing of communications ports, this task can have subroutines, this task can be interrupted by other tasks.

Fast -> this portion of logic is scanned on a timed interval basis, the timed interval can be faster than a normal scan time (actually it could even be longer), the predictability of this task makes it ideal for closed-loop control, this task can have subroutines, this task can be interrupted by event tasks.

Event -> this portion logic is only executed when a high-speed input is sensed, these portions have the highest level of priority making them ideal for alarm condition monitoring, subroutines are not allowed in event tasks.
 
First... following up on dandrade's post, with regards to "Multi-Tasking"...

"While I'm doing 'this' I might be aware that I also need to do 'that'... but I can't actually do 'that' until I'm done with 'this'. Sure... I AM THE COMPUTER!... but Hey, c'mon, gimme a break... I am only one guy!"

True "Multi-Tasking" can only be accomplished by multiple processors. It takes two people to do two separate jobs, concurrently.

Examples of "True Multi-Tasking" are...

...a PLC and Motion Control Card combination (separate processors)
The PLC passes a command packet (whatever it might contain) to the Motion Control Card. The Motion Control Card then carries out those orders, according to its own processing, while the PLC continues doing what it does.

...multiple PLCs on a network sharing duties in a given process (separate processors)
Each PLC is running independently, however, each might depend on data from the other, to one degree or another, before furthering its own progress through its own portion of the process.

Bringing in (bringing on-line) any sub-routine-like coding is NOT Multi-Tasking. It is nothing more , or less, than extended processing.

There are other routines that use an effect called "Time-Slicing". These routines "steal" a little bit of scan-time, every so often, to provide the time necessary to be completed. These routines take multiple scans to be completed. These routines should NOT be Timing-Critical routines!

Then there is this effect called "Background Processing". I have this on my TI, as well as the Time-Slicing effect. I can write a routine to run in the "background". It can be "called" every 10-mSec (or less often). It can use the current values from the Input Image Table or it can use Immediate Inputs from the field (actually, I can use Immediate Inputs anytime I want). It uses the current values of the Control Relay Table.

In the course of processing the routine, all changes to Internal Control Relays are, of course, immediate. The routine can change the actual values of the Outputs to the field through "Immediate Output".

This means that Outputs can change state WHILE the ladder is still in process! As always... process development requires careful consideration!

This routine, running in the "Background", is "Interrupt Driven".

There are two kinds of "Interrupts": the first is "externally generated" (by Input) while the second is "internally generated" (by Clock).

Neither one of those is a "Multi-Tasking" function... but they can sure seem to be so.

Second... regarding the Elevator Program...

It appears that you are being "instructed" to develop the program in this particular manner. If so, I'm not going to go against your instructor.

However, even if this PLC is only a mid-range type, in terms of capability, I find it weird to see you say that "i can programme 16 events".

Are you talking about using a "DRUM"?

If so... that is NOT a good tack to take.

So... What say you?
 
Terry is right about using a Drum or sequencer for this type of application. As well as his description of the 'Multi-Tasking' nature of PLCs.


There aree too many branches or 'ifs' for this type of program to be a sequencer. BUt, using Event Driven actions in reeguards to safeties would be acceptable here. THe reality of the situation is this is not rocket science for the elevator program. BUt it is an exercise in solving a problem. THat is why I started you along this path. Your instructor, in all likelyhood, doesn't work with it enough to know these things as well as some on this board. Your goal is to solve a problem. Elegance and understanding will come later. First, just try to solve the problem. Reduce it down to its ssmallest parts, and you will develope your logic from this. This will allow you to see some relationships that can be missed by looking a larger model. Figure out what the buttons must do. Then figuree out what your safeties must do. Figuree out what your drive motor needs to do. Think about the situations that occur for 2 levels first, then add a third. THe fourth, fifth, ect. will be similar to the third. It will intuitively show you what interlocks will be needed. THen you will have to make sure you test these and see if you have all the necessary situations covered. Don't forget about the doors, theree are some reelationships here to consider as well.

David
 

Similar Topics

is it just me, or has something happened with the google search when using chrome? looks likes safari on mac is ok, but edge/chrome on windoze has...
Replies
10
Views
839
Besides using BootP in the past, I am relatively new to having to look for privately addressed devices in many control networks. All of the...
Replies
23
Views
3,974
Good morning, could anyone recommend a 24VDC pulse counter which counts up or down to a preset #? Once it reaches this number, send a 24VDC back...
Replies
3
Views
1,650
Hi, Using FactoryTalk View SE version 9.0. Wondering if someone can help me as to whether or not I can search an entire display for instances of a...
Replies
3
Views
2,303
Is there any way to stop a search from finding a text string inside a sub-tag name. For example: if I'm searching for "run" ... I only want to...
Replies
10
Views
2,123
Back
Top Bottom