ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Virtual Serial Port Problem

Hi,

I just got LabVIEW 8.2 for OS X. I had the evaluation copy for Windows previously, and I had a working VI for controlling a serial device. Since I don't have any open PCI slots on the Mac, I got a USB to serial adaptor (http://serialio.com/products/adaptors/usb_serial.php). It seems to be working correctly. I see the virtual serial port in both the Mac hardware viewer and the NI_VISA configuration utility.

 I copied the VI over and fired it up and it worked great... but only once. There is no error message or anything, the command just doesn't send and I don't get a response from the device. After some fiddling around I determined that if I unplug the USB adaptor, it will work again exactly once. Exiting LabVIEW does help read again without unplugging the adaptor.

I think I'm closing the port correctly. Could this be a problem with the adaptor?

Thank you,
Mike
0 Kudos
Message 1 of 6
(4,263 Views)

Mike,

Based on what you have tried, it sure sounds like a problem with the adapter.  I personally have had no luck trying to use the cheaper USB-RS232 adapters.  ( windowsXP on PC )I seems that not all adapters/drivers are fully compatable with the serial spec. 

I personally stick with either a NI or Blackbox adapter.  If you search the forum posts you will find other adapters that have been sucessfully used with NI.

0 Kudos
Message 2 of 6
(4,246 Views)
Thanks for your reply.

The main problem with getting a different adaptor is that neither one you mentioned is compatible with Mac.

I plugged the adaptor into my Windows machine and it works fine. Would that point more towards a problem with the Mac drivers?

Thank you,
Mike
0 Kudos
Message 3 of 6
(4,234 Views)

Sounds like the mac driver is a strong candidate.

Some of the higher end Black Box adapters are mac compatable.  I know that B&B electronics http://bb-elec.com/product.asp?SKU=UC232A&Trail=45&TrailType=Main makes one that is mac compatable.  I've never tried it though.

Would an ethernet serial port work for your application?

0 Kudos
Message 4 of 6
(4,229 Views)
I removed everything from my VI and started adding things one at a time. The problem seems to be with closing the VI session. If I don't do a VISA Close at the end, everything seems to work. I'll let you know if I figure out what's going on exactly.

Mike
0 Kudos
Message 5 of 6
(4,223 Views)

Mike,

Your troubleshooting instincts are right on the money.  Does the VISA close return any errors or warnings?

0 Kudos
Message 6 of 6
(4,219 Views)