LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 Voltage read Error 74

Solved!
Go to solution

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

 

0 Kudos
Message 1 of 5
(2,124 Views)
Solution
Accepted by topic author Sportpfeife

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(2,122 Views)

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!

0 Kudos
Message 3 of 5
(2,104 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(2,102 Views)

Hello GerdW,

 

i made it! Thank you very much! It works.

 

Danke! 🙂

 

Viele Grüße,

Sascha

0 Kudos
Message 5 of 5
(2,095 Views)