LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with serial VISA under windows 2000, XP

I have been using serial compatibility VIs under all flavours of Windows to talk to RS232 instruments. These work fine for all older versions of Windows. However on XP and 2000 these do not appear to work (giving an error 37). I have therefore switched to the VISA serial comms VIs. I can open (and close) the VISA interface on the correct com port but cannot use the setup com port VI. Also although MAX allows me to check the COM port and enable/disable etc, it won't let me start a VISA session. This looks like something on my system is using the com port but it happens on the three machines I have tested (two XP and one 2000). Am I missing something? Or is there a way to agressively grab the com port?
Thanks,
Gavin

0 Kudos
Message 1 of 3
(3,048 Views)
Gavin:

What kind of error does the setup VI give? If you can open the port, then it sounds like you might be trying to set other fields inconsistently.

You say you cannot open the port from MAX. Do you mean you right-clicked and chose Open VISA Session, and it gave you an error? If so, what was it?

Only 1 software component can own/use a COM port at any given time. There is no way to grab it away from another component, nor is there a way to reserve it for a given component (such as LabVIEW or VISA).

You may also wish to run NI Spy to capture the offending calls. The resulting .spy file is something you can attach to an email to NI tech support.

There is one small W2K/WXP thing that comes to my mind. If you set hardware flow control and then
try to manually set the state of the corresponding output line (such as RTS or DTR) then the OS will generate an error. None of the earlier Windows OS's did this. But if you do not use flow control, then this is not the problem you are seeing.

Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments
0 Kudos
Message 2 of 3
(3,048 Views)
If you are using Labview DSC remember there is a bug on serial port no 1.


"Dan Mondrik" wrote in message
news:5065000000050000004BBB0000-1031838699000@exchange.ni.com...
> Gavin:
>
> What kind of error does the setup VI give? If you can open the port,
> then it sounds like you might be trying to set other fields
> inconsistently.
>
> You say you cannot open the port from MAX. Do you mean you
> right-clicked and chose Open VISA Session, and it gave you an error?
> If so, what was it?
>
> Only 1 software component can own/use a COM port at any given time.
> There is no way to grab it away from another component, nor is there a
> way to reserve it for a given component (such as LabVIEW or VISA).
>
> You may also wish to run NI Spy to c
apture the offending calls. The
> resulting .spy file is something you can attach to an email to NI tech
> support.
>
> There is one small W2K/WXP thing that comes to my mind. If you set
> hardware flow control and then try to manually set the state of the
> corresponding output line (such as RTS or DTR) then the OS will
> generate an error. None of the earlier Windows OS's did this. But if
> you do not use flow control, then this is not the problem you are
> seeing.
>
> Dan Mondrik
> Senior Software Engineer, NI-VISA
> National Instruments
0 Kudos
Message 3 of 3
(3,048 Views)