Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
Hey I'm a beginner with Codesys and I want to simulate a WAGO PLC. I have only experience with Siemens Step 7 and I have used their PLCSIM as simulator, I have a good experience with it.
I have found sim programs as SP PLCWinNT and and SP RTE, but I don't know how to use them and how I can manipulate the I/O. Also I can go online without selecting these programs as targets, that confuses me.
I tried to search for it by myself, but I'm thinking in the wrong direction maybe.
Thank you for your effort.
Vision
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
under windows you will find simulation, put a mark in front of it, by clicking.
in resources you can define the i/o of the target (wago)
when running simulation click on a input and it will be set to ON.
when running a simulation be aware of you can set a variable with by double clicking, when it gets red you can not force it, so the values on screen are not correct.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The simulation is working fine. But I need to simulate an OPC server (build-in WAGO plc), I suppose I need to fix an software PLC to download the OPC config on it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
programs and libs can be target specific, for example a PC can not have direct I/O so when you specify them it will give compile errors, the choice of target is therefore important before starting a project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But it must be possible to simulate the program without changing the PLC config I suppose? Is that not the whole matter of a software PLC to simulate the I/O?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
no sorry, the codesys software can run on a PC to have remote I/O, however you can simulate I/O even when remote, but not a driver as communication is very hard to simulate, you can however use a visualisation to simulate communication by sending commands via the vis to the program, and later on replace it with proper drivers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, great to hear that it's possible with PLCWinNT.
Problem right now is that I can't load the program. When I select PLCWinNT as target and want to login it gives me an communication error.
I changed the communication parameters to 'localhost' and gateway connection to local, like I found in this guide: https://www.yumpu.com/en/document/view/ ... idactic/11 m
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay I think my OPC server is running. Now I want to communicate from LabView, but I'm wondering what the OPC url is. opc://localhost/"CoDeSys"/PLC1 it's probably something like this, but I want to change "CodeSys" in it, I have no idea where I can change this (I don't want to change every OPC-link in LabView).
Thank you for every help already!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can access my OPC tags via opcda:///CoDeSys.OPC.02/{key} with Softing OPC client application. But Labview uses the opc://localhost/CoDeSys.OPC.02/PLC1:tag path and doesn't have a connection with the OPC server at the moment. I really don't know where to look.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey I'm a beginner with Codesys and I want to simulate a WAGO PLC. I have only experience with Siemens Step 7 and I have used their PLCSIM as simulator, I have a good experience with it.
I have found sim programs as SP PLCWinNT and and SP RTE, but I don't know how to use them and how I can manipulate the I/O. Also I can go online without selecting these programs as targets, that confuses me.
I tried to search for it by myself, but I'm thinking in the wrong direction maybe.
Thank you for your effort.
Vision
SP etc are not simprograms, but is a software PLC.
under windows you will find simulation, put a mark in front of it, by clicking.
in resources you can define the i/o of the target (wago)
when running simulation click on a input and it will be set to ON.
when running a simulation be aware of you can set a variable with by double clicking, when it gets red you can not force it, so the values on screen are not correct.
Hey again! Thank you for your help.
The simulation is working fine. But I need to simulate an OPC server (build-in WAGO plc), I suppose I need to fix an software PLC to download the OPC config on it?
opc in PC is impossible to simulate however it is possible to run the software for 2 hours in online mode.
Are you talking about PLCWinNT software plc then?
Problem at the moment with PLCWinNT is when I select the target my PLC config is lost, thereby my program gives error so I can't go online anymore.
programs and libs can be target specific, for example a PC can not have direct I/O so when you specify them it will give compile errors, the choice of target is therefore important before starting a project.
But it must be possible to simulate the program without changing the PLC config I suppose? Is that not the whole matter of a software PLC to simulate the I/O?
no sorry, the codesys software can run on a PC to have remote I/O, however you can simulate I/O even when remote, but not a driver as communication is very hard to simulate, you can however use a visualisation to simulate communication by sending commands via the vis to the program, and later on replace it with proper drivers.
I added variables for the PLC I/O so I don't work with the PLC driver anymore.
Now I want to get the OPC server start working, it's not clear for me if it will work in Simulation mode (Codesys) or maybe with PLCWinNT soft PLC.
Vision
if you run winnt then just start your program without using simulation. in demo it will run for 2 hours.
Ok, great to hear that it's possible with PLCWinNT.
Problem right now is that I can't load the program. When I select PLCWinNT as target and want to login it gives me an communication error.
I changed the communication parameters to 'localhost' and gateway connection to local, like I found in this guide: https://www.yumpu.com/en/document/view/ ... idactic/11 m
Nevermind, it's working right now. I needed to change to another TCP/IP configuration.
Okay I think my OPC server is running. Now I want to communicate from LabView, but I'm wondering what the OPC url is.
opc://localhost/"CoDeSys"/PLC1 it's probably something like this, but I want to change "CodeSys" in it, I have no idea where I can change this (I don't want to change every OPC-link in LabView).
Thank you for every help already!
I can access my OPC tags via opcda:///CoDeSys.OPC.02/{key} with Softing OPC client application. But Labview uses the opc://localhost/CoDeSys.OPC.02/PLC1:tag path and doesn't have a connection with the OPC server at the moment. I really don't know where to look.