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: 

serial port writing return different in MAX and Labview

Dear all,

 

I have a very strange problem here. I had a device connected to the serial port, which can be started by sending "start\n".

 

Firstly, I used the IO in MAX to send "start\n", like the first figure, and the device operated correctly.

 

Then, I initialized the device, and used the program in the second figure, to write the same "start\n", but this time the device operated wrong.

 

I think the serial port setting are the same, and the device is not failed (after the second step, I repeated using MAX and still it's OK).

 

Could anyone to check what's wrong here?

 

Many thanks!

a1.JPG

a2.JPG

0 Kudos
Message 1 of 3
(2,599 Views)

Hi pound,

 

Try out in your VI to not use carriage return. It should works fine.

Another thing i am sure you did before : OPEN the com !

 

BR,
Vincent

0 Kudos
Message 2 of 3
(2,566 Views)

In your LabVIEW code, how do you know that it did not work?

 

Did you receive and error on the error indicator?  You don't have any VISA Read going on, so you aren't trying to read the response.

0 Kudos
Message 3 of 3
(2,550 Views)