LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read values on serial port sent by ESP32 with Labview

Solved!
Go to solution

Hi everyone!

I'd like to read different values in Labview, sent by my ESP32 microcontroller via Serial communication. I've watched many tutorials and examples about this, but nothing worked for me. I'm using VISA inside labview, my code runs without any error messages, but nothing happens. I attached my labvies code. My esp32 code is very simple, it just generates random values between 1 and 100 and send it to Serial monitor with Serial.println().

0 Kudos
Message 1 of 3
(232 Views)

Hi,

 

In many cases a good start is to initialize your connection by using Visa Configure Serial Port.

This has to match the config from your microcontroller output.

 

Then you have an issue with your read function, it is linked to i from your while loop meaning it will grow each time and read one data more each time.

 

By using a termination char you can give, for example, a value of 1000 and as soon the termination char is read the function returns your data.

Message 2 of 3
(216 Views)
Solution
Accepted by topic author shroomy

Hi shroomy,

 

make sure you watch this and understand it!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO
Message 3 of 3
(164 Views)