LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

please help me!! Serial communication!

Dear !
At first, thank you for reading this.

Now I want get the data from my instrument
(London Electronics Co.: Load Indicator)

This instrument have RJ11 port for serial communication
and I made the cable RJ11 to computer (9 pin).

I have test the Loopback.vi and can get (read) the data from serial port.

But Data is not regular.

My instrument displays only 100.0 continuously.

But in the graph and saved data show like this.

0
0
0
0
100.0
0
0
0
0
0
0
100.0
..
..
..
0(1024ea)


(irregular data: I think all the data must be displayed 100.0.)

In serial cable, I just connect Rx, Tx, and Ground.
(no parity, no flow control, Baud rate: 9600, data bit: 8,
stop bit: 1) This is matched between instrument and serial port
(com1)

What is the problem?

my vi file is not right and more need to modify my vi file??
Or my instrument cannot send the right data to serial port?

my program is just reading the data from serial port
(I'm using this function : VISA configure serial port, VISA read, VISA bytes
at Serial port)

----------------------------------------------------
Nam, Jin Ho (njh0105@korea.ac.kr)
----------------------------------------------------
No pains, No gains!
----------------------------------------------------
0 Kudos
Message 1 of 5
(3,021 Views)
Hi, Nam, Jin Ho

First if your instrument have serial communication, you must use Serial Compability VI's:

- Serial Port init.vi
- Bytes at serial port.vi
- Serial port read.vi
- Serial port write.vi
- Close serial driver.vi

You could try to use these VI's, and compare results.

Best regards,

Jorge.
0 Kudos
Message 2 of 5
(3,021 Views)
You do not need the serial compatability VIs. IMHO, the VISA functions work much better.
Message 3 of 5
(3,022 Views)

Hi guys, if i have the VISA serial read vi constantly polling for 19 bytes that occur once a minute, how can i manipulate my front panel stop button to end this vi and continue to close serial port properly.  Have managed with using abort but this will not close serial address.

Thanks

0 Kudos
Message 4 of 5
(2,851 Views)
Well, try wiring the front panel Boolean to your while loop's termination terminal.Smiley Wink
 
You're going to have to provide a few more details about your program. The VISA Read does not loop all by itself so it's impossible to say how to stop your VI if no one knows it's architecture. Are you using an event structure, state machine, producer/consumer desing, or something else? Posting the VI or an image would help.
 
p.s. This was a very old thread and not really pertinent to your question. It's probably best to start a new thread.
Message 5 of 5
(2,833 Views)