LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial for labview

Can you be more specific about use '\ codes display' for the new line character. 
The small example can help (:
Tnx any way
0 Kudos
Message 21 of 26
(799 Views)

When you create the string constant going into VISA write, right click the constant and select \codes.  A common mistake is to leave it in normal display and the \n is typed in as two separate characters a slash and an "n".  It needs to be a single character of new line or ASCII code 10.  It is a non-printing character and doesn't show up in normal display and isn't easy to enter in normal display.

But in \codes display, when you enter as a slash and "n", it becomes the single new line feed character you are looking for.

0 Kudos
Message 22 of 26
(782 Views)

Hi again

I have some difficolty witch reading from serial port. After i send command to Load (electronic load of Chroma) many time iread the answer of the load after new command that i send (new command is different from the first).

Before read VI i wait 500ms after writing the command , i traing bigger delays but no help.

I ask if the problem can be in the chroma device or i do something wrong.

I attach example of what i do/

Tnx for helping/

Download All
0 Kudos
Message 23 of 26
(742 Views)
You are waiting any time at all before checking the number of bytes. The wait happens in parallel. Think dataflow! That subVI also seems kind of silly.
0 Kudos
Message 24 of 26
(733 Views)
Dennis Knutson , i attach a pic of how i see the read serial , can you loock on this.
If you have better solution i will be very tnx. if you can post it here.
0 Kudos
Message 25 of 26
(721 Views)
That looks like it should work better.  Now the wait must execute before the VISA read occurs.  Are you still having problems?  If so, what are they now.
 
One possible problem you may have is the termination character you append to the string is a New Line character (ASCII10).  Are you sure this is correct for the instrument?  Perhaps is is carrriage return (ASCII 13) or CR/LV (13 & 10).
0 Kudos
Message 26 of 26
(711 Views)