I don't fully understand the issue, but if the encoding is a problem you can try testing with WSTRING datatype instead of STRING. https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_datatype_wstring.html
Not knowing exactly what you want to accomplish, you can try to use VAR_INPUT MyVar: POINTER TO BOOL; END_VAR MyVar contains the address of your referenced variable, and MyVar^ dereferences it allowing you to access the value. If this doesn't meet your needs, could you add more detail on what you are trying to accomplish?
Here, it seems to me that we are getting completely off track with the observed problem. If questions clarifying the details of the installation are problematic, it's best to include those details in the original question then... I had already written this elsewhere. The program before being brought into machines was exhaustively tested in SW emulation and the problem did not occur. Testing the full program in emulation is entirely different from creating a simplified program to isolate the function...
How are the servo drives controlled? EtherCAT, step/dir pulses, other? Another thought is that - if it's step/dir pulse based control - the pulses from the PLC to the drive are getting missed/lost at high frequencies? If that's the case then there would be multiple troubleshooting steps/corrections that could be investigated. You could try to create a simplified program, with all the same parameters, that only has an MC_SetPosition FB you manually trigger and see if you are still getting the same...
How are the servo drives controlled? EtherCAT, step/dir pulses, other? Another thought is that - if it's step/dir pulse based control - the pulses from the PLC to the drive are getting missed/lost at high frequencies? If that's the case then there would be multiple troubleshooting steps/corrections that could be investigated. You could try to create a simplified program, with all the same parameters, that only has an MC_SetPosition FB you manually trigger and see if you are still getting the same...
How are the servo drives controlled? EtherCAT, step/dir pulses, other? Another thought is that - if it's step/dir pulse based control - the pulses are getting missed/lost at high frequencies? If that's the case then there would be multiple troubleshooting steps/corrections that could be investigated. You could try to create a simplified program, with all the same parameters, that only has an MC_SetPosition FB you manually trigger and see if you are still getting the same results? Also, I just google...
How are the servo drives controlled? EtherCAT, step/dir pulses, other? Another thought is that - if it's step/dir pulse based control - the pulses are getting missed/lost at high frequencies? If that's the case then there would be multiple troubleshooting steps/corrections that could be investigated. You could try to create a simplified program, with all the same parameters, that only has an MC_SetPosition FB you manually trigger and see if you are still getting the same results?
How are the servo drives controlled? EtherCAT, step/dir pulses, other? Another thought it - if it's step/dir pulses - the pulses are getting missed/lost at high frequencies? If that's the case then there would be multiple troubleshooting steps/corrections that could be investigated. You could try to create a simplified program, with all the same parameters, that only has an MC_SetPosition FB you manually trigger and see if you are still getting the same results?