Simulation mode in CoDeSys
Hello I am trying to write a program but I do not have access to the hardware right now. I want to use simulation mode but when I run it in simulation mode my contacts show up as an unknown state when they should show up as FALSE. I don't know if I maybe have some settings messed up or if it is just simply not possible to run this on simulation mode? I have a basic program to test the simulation before I write any more. I have attached a picture to show the problem.


Answers
Hi
the simulation of the program allows you to test numerous features.
With the simulation active, you have to log in - but it seems from the image that you did it, as well as then switch to RUN-
To force the contact, once you have positioned the mouse over the one you want to try, double-click, until a blue square appears, then press F7 which indicates the forcing command. If you have no other points in the conflicting program, your FAN1 output should activate, with a dark blue square inside.
This image is an example, double click on E02 input:

And this is the results, after F7 activation of force command:

Hope this help you
BR
Flavio
the simulation of the program allows you to test numerous features.
With the simulation active, you have to log in - but it seems from the image that you did it, as well as then switch to RUN-
To force the contact, once you have positioned the mouse over the one you want to try, double-click, until a blue square appears, then press F7 which indicates the forcing command. If you have no other points in the conflicting program, your FAN1 output should activate, with a dark blue square inside.
This image is an example, double click on E02 input:

And this is the results, after F7 activation of force command:

Hope this help you
BR
Flavio
Source: Codesys Manual
Hello,
Just check the command for activating the second page is true.
You have 2 programs made in your project; PLC_PRG is the main program and others are subprograms and subprograms will be scanned only when it is called from the main program(PLC_PRG).
Just check whether you have called the other program from your main program. I am sure that once you didn't make the logic to call that program or its condition is false.
That's why it is not in blue color. Please check the calling function
Hope this helps you
Amal
Just check the command for activating the second page is true.
You have 2 programs made in your project; PLC_PRG is the main program and others are subprograms and subprograms will be scanned only when it is called from the main program(PLC_PRG).
Just check whether you have called the other program from your main program. I am sure that once you didn't make the logic to call that program or its condition is false.
That's why it is not in blue color. Please check the calling function
Hope this helps you
Amal
hii
just check did you call the sub_program like below picture.
just check did you call the sub_program like below picture.
by unicyclinghandyman Rank: 905 on 8/11/2020 7:02:01 AM | Like (0) | Report
Thanks all the answers have been very helpful!
Add new comment