Hi! I thought to hear what you guys think is the best way to test the program in my scenario.
I have some PLC programs that have been made and deployed on different PLC's. The program has added the specific devices and IO that is applicable. I have made a test environment for everything outside of the PLC, ie. the same SCADA system that is talking to the PLC, and a program running locally is simulating the plant (level regulation of different tanks).
Pr. now I have had to manually change the variables that are reading/writing values from the IO so they read/write via OPC instead. I also have to change the device tree from the specific PLC rack, to the soft PLC. So I kind of end up with two different programs that I have to maintain.
I was just wondering if you believe there is an easier way to do this. So I can have the exactly same program and kind of switch between the soft mode, and the "real" mode.
Last edit: ofey 2023-12-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a simulation function that toggle xSimActive.
I map all IO variables to "IO GVLs" when xSimActive=0.
I map IO corresponding SimIO GVL to "IO GVLs" when xSimActive=1.
Then I write code for the simulation program that runs when xSimActive=1.
Typically increase flow corresponding to pump speed, simulate tankfilling corresponding to flow and so on.
I made a FC that require a correct code to activate simulation to avoid unintended activation by service dept.
When comissioned remove any possibility to activate simulation.
Super when officetesting and supporting service dept.
+ cheap as it requires no additional equipment, and it is easier to support customer later on in the life cycle as you can test proposed changes without setting up a testlab.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a simulation function that toggle xSimActive.
I map all IO variables to "IO GVLs" when xSimActive=0.
I map IO corresponding SimIO GVL to "IO GVLs" when xSimActive=1.
Then I write code for the simulation program that runs when xSimActive=1.
Typically increase flow corresponding to pump speed, simulate tankfilling corresponding to flow and so on.
I made a FC that require a correct code to activate simulation to avoid unintended activation by service dept.
When comissioned remove any possibility to activate simulation.
Super when officetesting and supporting service dept.
+ cheap as it requires no additional equipment, and it is easier to support customer later on in the life cycle as you can test proposed changes without setting up a testlab.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a tool called test manager that is part of the Professional Developer's Edition of CODESYS. I would take a look at this tool for your testing purposes. There is a free 30-day trial so you can evaluate if the tool will meet your needs before investing in the license.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi! I thought to hear what you guys think is the best way to test the program in my scenario.
I have some PLC programs that have been made and deployed on different PLC's. The program has added the specific devices and IO that is applicable. I have made a test environment for everything outside of the PLC, ie. the same SCADA system that is talking to the PLC, and a program running locally is simulating the plant (level regulation of different tanks).
Pr. now I have had to manually change the variables that are reading/writing values from the IO so they read/write via OPC instead. I also have to change the device tree from the specific PLC rack, to the soft PLC. So I kind of end up with two different programs that I have to maintain.
I was just wondering if you believe there is an easier way to do this. So I can have the exactly same program and kind of switch between the soft mode, and the "real" mode.
Last edit: ofey 2023-12-07
I have a simulation function that toggle xSimActive.
I map all IO variables to "IO GVLs" when xSimActive=0.
I map IO corresponding SimIO GVL to "IO GVLs" when xSimActive=1.
Then I write code for the simulation program that runs when xSimActive=1.
Typically increase flow corresponding to pump speed, simulate tankfilling corresponding to flow and so on.
I made a FC that require a correct code to activate simulation to avoid unintended activation by service dept.
When comissioned remove any possibility to activate simulation.
Super when officetesting and supporting service dept.
+ cheap as it requires no additional equipment, and it is easier to support customer later on in the life cycle as you can test proposed changes without setting up a testlab.
I have a simulation function that toggle xSimActive.
I map all IO variables to "IO GVLs" when xSimActive=0.
I map IO corresponding SimIO GVL to "IO GVLs" when xSimActive=1.
Then I write code for the simulation program that runs when xSimActive=1.
Typically increase flow corresponding to pump speed, simulate tankfilling corresponding to flow and so on.
I made a FC that require a correct code to activate simulation to avoid unintended activation by service dept.
When comissioned remove any possibility to activate simulation.
Super when officetesting and supporting service dept.
+ cheap as it requires no additional equipment, and it is easier to support customer later on in the life cycle as you can test proposed changes without setting up a testlab.
There is a tool called test manager that is part of the Professional Developer's Edition of CODESYS. I would take a look at this tool for your testing purposes. There is a free 30-day trial so you can evaluate if the tool will meet your needs before investing in the license.