I'm getting an access violation exception related to the struct "WHEEL_VELOCITIES". This DUT is used in the definition of a new struct, which is used in a function block. The struct "WHEEL_VELOCITIES" is also used as the return type of a method from that same function block.
What I find odd is that if I download the program to the Control Win Soft PLC, everything works well. It is only when I try to download to the beaglebone black (after updating the device) that I get this error. Also, if I remove the struct "WHEEL_VELOCITIES" from my code, Codesys still gives me the same error but regarding a different struct.
I have not defined any FB_INIT method for any function block and, from what I understand, DUTs don't have a FB_INIT or any other method associated with them, right? Is codesys interpreting my struct as a function block?
UPDATE:
Got it working. I believe it had something to do with having set the attribute "{attribute 'pack_mode' := '0'}" in the struct and not in the sub struct. However that was not enough to correct the issue. I also had to remove the modbus slave I had associated with those variables, download and undo the removal.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey, there!
I'm getting an access violation exception related to the struct "WHEEL_VELOCITIES". This DUT is used in the definition of a new struct, which is used in a function block. The struct "WHEEL_VELOCITIES" is also used as the return type of a method from that same function block.
What I find odd is that if I download the program to the Control Win Soft PLC, everything works well. It is only when I try to download to the beaglebone black (after updating the device) that I get this error. Also, if I remove the struct "WHEEL_VELOCITIES" from my code, Codesys still gives me the same error but regarding a different struct.
I have not defined any FB_INIT method for any function block and, from what I understand, DUTs don't have a FB_INIT or any other method associated with them, right? Is codesys interpreting my struct as a function block?
The error:
https://drive.google.com/drive/folders/1y5AFK2EZCUrh1scnktNZJvLMgSWup03P
Thank you for your time,
Paulo
UPDATE:
Got it working. I believe it had something to do with having set the attribute "{attribute 'pack_mode' := '0'}" in the struct and not in the sub struct. However that was not enough to correct the issue. I also had to remove the modbus slave I had associated with those variables, download and undo the removal.