02-13-2024 08:14 AM
I used this IP datastream object to change the program on the engraver.
I send the programno to the engraver and received it as well, but If I received the data from the engraver the Codesys showed this error:
Solved! Go to Solution.
02-13-2024 08:39 AM - edited 02-13-2024 08:44 AM
OpconBase is not causing this Page Fault Exception. It is caused by corrupted memory.
Check your source code regarding memory operations (MemCpy, MemSet, array operations, etc.).
For TwinCAT keep the PLC Change Guide in mind. For ctrlX probably the part regarding changed library parameters (or in general changed libraries) could be relevant, that means a clean is necessary.
Once this Page Fault Exception occurs in the OpconBase it can be difficult to get rid of it. See the remarks in this article.
02-13-2024 09:58 AM
Thank you, that was the problem.
The RecvD was a 80 string, and the RecvData was a ARRAY [1..255] OF BYTE;
02-14-2024 10:57 AM - edited 02-14-2024 10:58 AM
One tip for using OpconMemcpy.
The best if you give the size from the destination not from source.
Example:
OpconMemCpy(ADR(Destination),ADR(Source),SIZE_OF(Destination))
With this you have never a exception in OpconMemCpy.