gfcian - 2022-11-18

Hello,

Hopefully someone can give some advice here--the short version is that our PLC is an OPC client using the datasources manager, and it cannot handle floats or doubles from the server.

We have a python OPC server running on a linux PC, and a Codesys PLC running on a RevPi. On the PLC, there is a Data Sources Manager set up with one source from the OPC server. The PLC can connect to the server and run just fine, provided the PLC is not trying to access any floating point type variables (either they are not in the server at all, or the PLC is not looking at those variables according to the configuration of the datasource).

However, as soon as we add any OPC floats or doubles to the server, the PLC no longer functions. In the "Datasource" editor, it is able to "update variables" and insert items structured in the "DataSources_Objects" folder, and it correctly applies the REAL or LREAL type mapping to floats and doubles, respectively. The program compiles fine. But when we try to switch the PLC to "run" mode, it encounters a program exception and halts.

We only need STRING, LINT, BOOL, and LREAL types available. Only the LREAL type is causing trouble.

There is nothing in the call stack, and there are no messages in the Messages area. The PLC log gives two pieces of information:
" EXCEPTION [AccessViolation] occurred: App=[Application], Task=[OPCUAClient388] "
" SOURCEPOSITION* App=[Application] area=3, offset=1158772 "
The Component for both these exceptions is "CmpIecTask"

Further, a UAexpert client is able to browse and edit all nodes in our server, no matter the type.