And sometimes i haven't access to connect to PLC.
So, i have to use Simulation (check visualization or debug).
But i got this error.
I've already read thread about same problem. But i didn't find any solution there.
And in my situation i just need a opportunity to work in Simulation.
it seems that you are on a 64bit plc - so the steps are:
(if this error is caused by a lib you need to change the library)
in order for it to run at 64 bits, you have to:
- set everything to at least 3.5.5.0
- Interface lib use CmpError2, SysTypes2 and Systypes2 interfaces instead of CmpError and SysTypes, namespaces are the same but: RTS_INVALID_HANDLE is now in SysTypes and no longer in CmpErrors! There may be other interface libs that need to be raised.
Replace 32 bit pointer variables with 64 bit (__XWORD or alias XWORD)
π
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Simulation mode to me is for quick tests. When you use 64bit IDE, Simulation mode gets its runtime from a CODESYS Control Win V3 x64, with the same runtime version as the IDE version. When you use 32bit IDE, Simulation mode gets its runtime from a CODESYS Control Win V3. There are other differences between a Control Win V3 and whichever runtime you are using. So for tests I try to get as similar to the PLC as I can. For example for Linux based controllers, I try to keep a raspberry Pi. Or better yet, a spare of the actual PLC.
If I was getting your error and wanted to use simulation mode, I would dual install the 32-bit IDE, using the steps under "for advanced users" at this FAQ page, and simulate it using that. Install FAQ
π
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Installation of 32-bit version of Codesys helps me.
Also i tried to reinstall "cmperrors interfaces" library. But it can't be done, because i use local libraries of vender of my PLC.
And these libraries already have "cmperrors interfaces" inside.
And vender's libraries is essential. And i can't remove them or reinstall with "cmperrors interfaces2" instead.
So, the only one solution is using of 32-bit version of Codesys.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
yes, in that case this is the solution, but would recommend to report this to the plc manufaturer.
They should provide libraries which are 32 and 64bit capabale ( even for this simulation problem)
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, community.
I have a project.
And sometimes i haven't access to connect to PLC.
So, i have to use Simulation (check visualization or debug).
But i got this error.
I've already read thread about same problem. But i didn't find any solution there.
And in my situation i just need a opportunity to work in Simulation.
Can anybody help me, please?
more posts ...
You have installed the 32 or 64Bit development system and which device you are programming?
it seems that you are on a 64bit plc - so the steps are:
(if this error is caused by a lib you need to change the library)
in order for it to run at 64 bits, you have to:
- set everything to at least 3.5.5.0
- Interface lib use CmpError2, SysTypes2 and Systypes2 interfaces instead of CmpError and SysTypes, namespaces are the same but: RTS_INVALID_HANDLE is now in SysTypes and no longer in CmpErrors! There may be other interface libs that need to be raised.
Replace 32 bit pointer variables with 64 bit (__XWORD or alias XWORD)
Simulation mode to me is for quick tests. When you use 64bit IDE, Simulation mode gets its runtime from a CODESYS Control Win V3 x64, with the same runtime version as the IDE version. When you use 32bit IDE, Simulation mode gets its runtime from a CODESYS Control Win V3. There are other differences between a Control Win V3 and whichever runtime you are using. So for tests I try to get as similar to the PLC as I can. For example for Linux based controllers, I try to keep a raspberry Pi. Or better yet, a spare of the actual PLC.
If I was getting your error and wanted to use simulation mode, I would dual install the 32-bit IDE, using the steps under "for advanced users" at this FAQ page, and simulate it using that. Install FAQ
Thank you all for your help and feedback.
Installation of 32-bit version of Codesys helps me.
Also i tried to reinstall "cmperrors interfaces" library. But it can't be done, because i use local libraries of vender of my PLC.
And these libraries already have "cmperrors interfaces" inside.
And vender's libraries is essential. And i can't remove them or reinstall with "cmperrors interfaces2" instead.
So, the only one solution is using of 32-bit version of Codesys.
yes, in that case this is the solution, but would recommend to report this to the plc manufaturer.
They should provide libraries which are 32 and 64bit capabale ( even for this simulation problem)
BR
Edwin