FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
03-01-2023 11:21 AM
Hello,
i'd like to read out axis status with CtrlX.
Therefore parameter Diagnose S-0-0095 of the drive is read. Everything is working fine but:
The text which is read and shown has an bad annex.
This is shown in my own WebVisu-application:
In CtrlX it looks that way:
The declaration is:
fbStringAxisStatus_ECATRead: IL_ECATSoeRead;
strAxisStatusStatus: IL_ST_SOE_STRING;
The same with another text:
Text in ctrlX DRIVE is shown as it should be, correctly.
Even if status.text is cleared after/before reading within ctrlX:
Is there an issue with EtherCat settings or any other idea?
Thanks
Solved! Go to Solution.
03-02-2023 04:08 PM
Codesys uses null-terminated strings, the string is missing the null at the end. You can use the IL_BufferToString function to get a properly terminated string.
03-03-2023 09:18 AM
@joeG Thanks a lot
Did it that way:
Take the ActLength of the recived data which is than used for the length to read out.