From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect Labview to a USB sensor without existing driver software?

Solved!
Go to solution

You need to append an End Of Line to the message you send.  The instrument is expecting that at the end of the messages.


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 11 of 13
(1,632 Views)

I've tried a bunch of commands, including ones with \r and \n endings, and it returns either a "command unsupported" output or a time-out error (code -1073807339). The "command unsupported" error must mean that the device is being read and interpreted, which is good, but I'm failing to find a command that actually gives me a proper output. I've attached my VI in this post, to make my situation a little bit clearer. 

0 Kudos
Message 12 of 13
(1,622 Views)

Hi malsko,

 

do you know the meaning of "\n"-codes (slash-codes), hexadecimal notation (like 0x0A), byte/U8 values (like "10"), ASCII chars (like LF) and how they all play together with serial port communication?

 

Your device expects a string with an EOL character at the end. This "termination char" is just one byte, most often with a decimal value of 10 or 13, corresponding to ASCII chars LF or CR, respectively.

This is COMPLETELY different to a string containg the TWO chars "\" and "n" at the end!

Hint: Use a string control and set it's display mode to "\-codes". That will make your life a lot easier…

 

When all those abbrevations are unfamiliar to you I recommend to read the Wikipedia articles about them…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 13 of 13
(1,616 Views)