LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 communication question

Hi,

I try to get data from a voltmeter through the RS232 liaison but apparently
not datas are transfered so far.
I checked everything with another programm and the serial port and voltmeter
work fine.
I then download a self test from NI "loopback.vi" to test the port com.
No need to say that I don't get anything valuable from it.

I also have a rs232 min.-tester with leds and apparently nothing comes out
from any serial ports
It looks like to me that no ports are open


Is there anything I can do to solve this problem?

Thanks in avance for your suggestions?

Regards
Gérard


I use windows XP and LV7
0 Kudos
Message 1 of 5
(3,325 Views)
Hi Gérard,

Have you checked www.ni.com/idnet to make sure NI doesn't already have a driver for your voltmeter?

On the block diagram of loopback.vi, there should be serial port init.vi (or something similar). You may need to configure the baud rate, data bits, stop bits, flow control, etc. different than the default values.

You can also set these attributes in Measurement & Automation Explorer. These settings MUST match those on your RS-232 enabled instrument.

Lastly, you may want to look at the LV Instrument Driver Templates which include a good shell for communication with RS-232 devices. Available Here: http://www.ni.com/devzone/idnet/development.htm

Regards,
Matt
Message 2 of 5
(3,325 Views)
Matt,

Thank you for your answer
I did all you mentioned but unsuccessfully.
It's really weird, since even the test from NI called loopback.vi doesn't
work.
I did further test with windows hyperterminal and with a program I did
through VisualBasic, no problem.

As a matter of fact, the purpose of these tests are to widen my knowledge on
NI and I recently follow an introduction course on LabView
So, I'll ask the application engineer who gave this course about my problem.

Thanks again
Gérard



--
Gérard Férini
Switzerland
http://home.tiscalinet.ch/gferini
"AggieMatt" wrote in message
news:506500000005000000FF890100-1079395200000@exchange.ni.com...
Hi Gérard,

Have you checked www.ni.com/idnet to make sure NI doesn't already have
a driver for your
voltmeter?

On the block diagram of loopback.vi, there should be serial port
init.vi (or something similar). You may need to configure the baud
rate, data bits, stop bits, flow control, etc. different than the
default values.

You can also set these attributes in Measurement & Automation
Explorer. These settings MUST match those on your RS-232 enabled
instrument.

Lastly, you may want to look at the LV Instrument Driver Templates
which include a good shell for communication with RS-232 devices.
Available Here: http://www.ni.com/devzone/idnet/development.htm

Regards,
Matt
0 Kudos
Message 3 of 5
(3,325 Views)
The first thing that I would suggest is to make sure you have the latest VISA driver. Make sure you get the full version.

http://digital.ni.com/softlib.nsf/websearch/8E7D54CA3A1FDECF86256E4D007ED2E0?opendocument&node=132070_US

Then open up LabVIEW and run the Serial Communication.vi shipping example that can be found in the example finder. Connect pins 2 and 3 together on your serial port. Then run the example. You should be able to see the data being read back. If not, open the block diagram and set the handshaking so that it is set to none.

Another good utility is portmon. You can use it and compare what windows is seeing across the serial port. It's very useful and it allows you to monitor the serial calls when hyper terminal o
r LabVIEW is running and then compare the differences.

http://www.sysinternals.com/ntw2k/freeware/portmon.shtml

If the program still doesn't work you might want to create a service request and call in. It's possible your serial port doesn't support the standard serial features that VISA tries to configure. For example if you serial port does not support handshaking and you try to set the handshaking to none it could cause problems, because the port will not understand the handshaking attribute or the setting of none.

I hope this helps out.

JoshuaP
National Instruments
0 Kudos
Message 4 of 5
(3,325 Views)
Thank you all for your valuable replies.
Effectively for some unknown reason, the visa driver wasn't properly
installed on my PC

Thanks again

Gérard


--
Gérard Férini
Switzerland
http://home.tiscalinet.ch/gferini

"JoshuaP" wrote in message
news:506500000005000000A78A0100-1079395200000@exchange.ni.com...
> The first thing that I would suggest is to make sure you have the
> latest VISA driver. Make sure you get the full version.
>
>
http://digital.ni.com/softlib.nsf/websearch/8E7D54CA3A1FDECF86256E4D007ED2E0?opendocument&node=132070_US
>
> Then open up LabVIEW and run the Serial Communication.vi shipping
> example that can be found in the example finder. Connect pins 2 and 3
> together on your serial port. Then run the examp
le. You should be
> able to see the data being read back. If not, open the block diagram
> and set the handshaking so that it is set to none.
>
> Another good utility is portmon. You can use it and compare what
> windows is seeing across the serial port. It's very useful and it
> allows you to monitor the serial calls when hyper terminal or LabVIEW
> is running and then compare the differences.
>
> http://www.sysinternals.com/ntw2k/freeware/portmon.shtml
>
> If the program still doesn't work you might want to create a service
> request and call in. It's possible your serial port doesn't support
> the standard serial features that VISA tries to configure. For
> example if you serial port does not support handshaking and you try to
> set the handshaking to none it could cause problems, because the port
> will not understand the handshaking attribute or the setting of none.
>
> I hope this helps out.
>
> JoshuaP
> National Instruments
0 Kudos
Message 5 of 5
(3,325 Views)