PLC_PRG how to cal other PRG's? Wago 750-841

bapetc

Member
Join Date
Mar 2009
Location
Genk
Posts
6
Hello,

I use codesys to progam my wago plc.
When you create a new project, there is a standard program PLC_PRG.
But I make other programs to structure my logic and stuff.
But, how can I call my different programs, so that he PLC will call al my programs cyclisch?

I tryed:

CAL program1

that works. But how to call more then one.
I tryed

CAL program1
CAL program2

En the project does not compile anymore?
I also tryed CAL program1;
CAL program2;
 
What error message are you getting? I tried it like you describe and it works fine for me. I am using TwinCAT, but it is the same as CodeSys

CallTwoPRGs.PNG
 
You are trying to call an FB and not a PRG.

To call an FB, you must declare an instance and call the instance:

VAR
FBInstance : fb1;
END_VAR


CAL FBInstance


A PRG is like a subroutine, but an FB is a reusable block of code like a Timer.
 
Yes but alles_uit is not a FB, it is a program like the ohter 2.
As you can see, the screenshot of alles_uit, it is not af function block, but a program?
 
It's hard to see on the screen shot, but I only see one error message. Remove the first line from PLC_PRG, then Build.

Can you make the CodeSys window smaller, and only capture it on the screen shot so it will be easier to read the text.
 

Similar Topics

Hi, I am trying to upload the program from the PLC to the PC using the Winproladder software. When I click the On-line under PLC, the following...
Replies
1
Views
3,185
Good Day to all of you, this is my first post, i will try to explain as best as possible, english is not my natural language. I am performing an...
Replies
0
Views
26
Hi All, Someone at work has put a PLC system on my desk, that's just been taken off an idle production line. He said "It's an S7 PLC. We don't...
Replies
8
Views
143
I have a project to automate four generator sets. The system will monitor and store the load demand of the factory. Once there's Power outage, the...
Replies
0
Views
49
i have two plc 1. s7-1212dc/dc/dc ip; 192.168.0.1 2. s7-1500 1513-1pn ip; 192.168.3.2 i need to get data from plc1 to plc2. any idea how to do...
Replies
5
Views
93
Back
Top Bottom