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,195
HI everyone, i am new to Siemens plc programming and i am in need of some help. yesterday we had an S7-1200 CPU 1214C fail to turn on an output to...
Replies
7
Views
160
Hello, I have a Mitsubishi FX3G 14M PLC and a E615 HMI from Mitsubishi/Beijer. I'm using GXWorks 2 to do the programming and I have no problem...
Replies
4
Views
94
Hi, I'm trying to import a Rockwell/AB EDS to Beckhoff but I'm not sure how to import/install the EDS. It is a PowerFlex 525 EDS. Is there a way...
Replies
1
Views
92
I want to communicate my Q series PLC with Factory IO using GX works 2 software, I want to use modbus as server and the ips are as follows plc...
Replies
0
Views
62
Back
Top Bottom