LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino serial communication with labview for gui

hello everyone,

 

i have a question. i will build about detection for temperature with arduino then the result can display at the labview for gui. i try to communication arduino is done but the result is error. FYI i try the only arduino hardware not the sensors. Is it because I didn't install the sensor so it's like this? I saw the value on the Arduino serial monitor, it came out. 

 

thanks for advance

Download All
0 Kudos
Message 1 of 5
(1,214 Views)

My first thought is that you are trying to use the COM port in both applications (the Arduino monitor and your LabVIEW code).  Be sure to close the Arduino monitor before running your code.

 

Otherwise, you will want to get rid of that Bytes At Port and just tell the VISA Read to read more bytes than you ever expect in a message.  In this case, I would probably use 50 (no way should a single value be more than 50 characters).  This will allow the VISA Read to count on the Termination Character to know when to stop reading.  This will ensure you got a complete message.  With this, you can also get rid of the wait in the loop at the VISA Read will limit your loop rate based on how often your Arduino sends values back.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(1,202 Views)

connection in "com" mush be error but if i change to "ASLR" connection is ok. why its happen ? i check in port the installation in "com"

 

mamprat_0-1628134430657.png

 

then i have a question, i send serial dat from arduino to detection from 3 sensor ? what the function for devide for 3 sensor ? i use Match Pattern but the result can't display. thanks

 

mamprat_1-1628134857198.png

 

0 Kudos
Message 3 of 5
(1,163 Views)

@mamprat wrote:

i send serial dat from arduino to detection from 3 sensor ? what the function for devide for 3 sensor ?


I would use Spreadsheet String To Array to get an array of your values or Scan From String to get an output for each of your values.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(1,151 Views)

i will try, thanks for advance.

0 Kudos
Message 5 of 5
(1,139 Views)