LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

trouble with serial communication (serial port init.vi)

hi,

I have a little problem with the usage of the 'serial port init' vi.

I want to talk to a serial device who wants the following settings:
baudrate 9600
1 stopbit
no parity
8 databits.
buffersize 1024

The serial device gets its power from the serial port of the PC. (-3 to -12V
from the DTS line and +3 to +12V from the RTS line). The problem with
labview is that it initialises these two lines bouth to the negative voltage
(-3 to -12V). When I measure the DTS and RTS line (pin 4 and 7), both lines
are -11V

What can I do to make one of these lines +3 to +12V (+11V) so that the
serial device has -11 and +11V?
The communication is OK in visual basic. There i have +11V and -11V but I
want to do this in a labview pr
ogram.

thank u

greetings...

Marino
0 Kudos
Message 1 of 5
(3,511 Views)
Those pins are for hankshaking. Did you configure the flow control correctly?
0 Kudos
Message 2 of 5
(3,511 Views)
You can assert DTS and RTS with LabVIEW. With VISA use a property node; the settings are under Modem Line Settings. For standard serial driver use the VI vi.lib\platform\_sersup.llb\serial line ctrl.vi

Jean-Pierre Drolet


LabVIEW, C'est LabVIEW

0 Kudos
Message 3 of 5
(3,511 Views)
Thank you for your answer.
I tried to do as you told (i used the serial line ctrl vi) and I measure correct voltages but i still have no serial communiction with the device (wich is a fluke 89 IV multimeter).How can I combine this vi with te serial comport init vi (where i can set the baudrate, parity, ect...)? Because when i run this serial init vi, the voltages on the serial port are wrong again.
the Fluke multimeter needs following settings:
9600 baud
no parity
8 bits
1 stop bit
and the IR adapter (which enables you to read out the measured result though the serial port) gets its power from the DTR and RTS line.

thank you,

greetings,
Marino
0 Kudos
Message 4 of 5
(3,511 Views)
First you initialyze the port and after you call "serial ctrl line.vi" to set the controls lines. Serial VIs lack the error in/out clusters to chain the VIs in the right order so use a sequence structure or wrap serial VIs in caller VIs with errors clusters.

Jean-Pierre


LabVIEW, C'est LabVIEW

0 Kudos
Message 5 of 5
(3,511 Views)