TwinCat 3- Program POU- Execution order

kalabdel

Member
Join Date
Feb 2015
Location
Ontario
Posts
1,108
Hello gentlemen,


If I have more than one Program POU assigned to the same PlcTask, how do I changed the priority of which program executes first?

The only way I can do that is in the project tree; I delete all the programs and then add them by order of first priority. I thought, there was a dialogue box that lists the Program POUs and I can move them up and down the list, like in CodeSys.


Thanks
 
Hello gentlemen,


If I have more than one Program POU assigned to the same PlcTask, how do I changed the priority of which program executes first?

The only way I can do that is in the project tree; I delete all the programs and then add them by order of first priority. I thought, there was a dialogue box that lists the Program POUs and I can move them up and down the list, like in CodeSys.


Thanks

Hi, you can drag and drop in project tree under plc->plctasks to change the execution order. If this is what you are looking for.
 
What is the reason for multiple calls from the task - you can also call other programs from a program and then it is just a matter of order you write the calls in.

Also, are all programs really needed or should some part be fb's?
 
Programs are best called (activated or 'jumped to') from the program 'Main'.


Main (PRG)
*************



line 1> PRG_first_program();
line 2> PRG_second_progam();
 
What is the reason for multiple calls from the task - you can also call other programs from a program and then it is just a matter of order you write the calls in.
There are some other supposedly IEC-61131-compliant software packages that do not allow calling POUs from other POUs. Arranging multiple POUs within a task is the only way to control the order of execution.
 
There are some other supposedly IEC-61131-compliant software packages that do not allow calling POUs from other POUs. Arranging multiple POUs within a task is the only way to control the order of execution.

Might be, but that is not Twincat 3 as mentioned in the title šŸ™ƒ
 
Thank you everyone.
@Lare, that's what I've been doing and was surprised that there is no way to move them up or down either in the project tree or in a dialog box as in vanilla CodeSys.


This all came about when while working with TcUnit and keeping it the test suite separate from the development code being tested.
All the suggestions here would work just fine I think.


Thanks
 
Thank you everyone.
@Lare, that's what I've been doing and was surprised that there is no way to move them up or down either in the project tree or in a dialog box as in vanilla CodeSys.


This all came about when while working with TcUnit and keeping it the test suite separate from the development code being tested.
All the suggestions here would work just fine I think.


Thanks

I don't get what are you looking for. When you run unit tests, why would you run anything else than unit tests?
 
I don't get what are you looking for. When you run unit tests, why would you run anything else than unit tests?




The test runs to completion and then I can continue to do manual testing or troubleshooting if I wish to, for example if a test fails. And in general I am working with the same project, simulating,breaking and stepping into code and having two programs makes it easy to move from one mode to another. Programming then testing then back to programming without having to do any modification like adding or removing coder or dragging Program POU. Just pure convenience.
 

Similar Topics

Hi! I am trying to run the 'SimpleSample' (https://infosys.beckhoff.com/content/1033/TF5100_TC3_NC_I/Resources/3438746891/.zip ) to understand the...
Replies
2
Views
96
Hello, I was wondering if anyone know how to upload a PLC program to the Beckhoff TwinCAT 3 from a file? i.e. without having the development pc...
Replies
0
Views
743
Hello Everyone, For my final school project, need to run a c++ program on my beckhoff plc. I already have a ladder program That run on it but i...
Replies
0
Views
1,367
I am running 2 Beckhoff Industrial PC's that are identical, just different computer names and IP addresses. I connect remotely using ā€œChoose...
Replies
4
Views
3,440
I mentioned this question in another post but i feel that it needs its' own post. I have a Beckhoff CX5010 software PLC running Windows Embedded...
Replies
1
Views
4,903
Back
Top Bottom