05-18-2018 02:57 AM
Helllo!
I got a problem with my code.
It works fine. But sometimes if i change the voltage i get the error 74 in String derserialize... (Memory or Data Structure is corrupted).
So i get 3 Bytes. The first byte is the start byte and the second + third are the data bytes.
Kind Regards,
Sascha
Solved! Go to Solution.
05-18-2018 03:09 AM - edited 05-18-2018 03:09 AM
Hallo Sportpfeife,
why do you use StringDeserialize anyway?
Why not use StringToU8Array and pick the bytes as needed using IndexArray?
But sometimes … i get the error 74 in String derserialize... (Memory or Data Structure is corrupted).
This probably is due to your TermChar handling!
You enable the TermChar at SerialPortInit function, but you read "binary" data that could contain the TermChar (LF or 0x0A by default). When the TermChar is in the data VISARead terminates and you get this "data structure corrupt" error…
Solution: disable the TermChar!
Btw. you also forgot to use AutoCleanup…
05-18-2018 03:51 AM
Hello!
I have to say that im new in the LabView.
Anyways, your solutions sounds good to me!
But how can i disable the TermChar?
Kind Regards!
05-18-2018 03:54 AM
Hi Sportpfeife,
please read the help for the ConfigurePort function and wire a FALSE to the "Enable TermChar" input…
Einfach das TermChar disablen! Und die Hilfe zu jeder LabVIEW-Funktion lesen… 😄
Wenn du deutschsprachige Hilfe haben willst, kann ich dir das www.labviewforum.de empfehlen!
05-18-2018 04:00 AM
Hello GerdW,
i made it! Thank you very much! It works.
Danke! 🙂
Viele Grüße,
Sascha