09-09-2016 12:06 PM
I have LabVIEW 2013 installed on a Mac OS 10.11 computer, and I have a cryocooler controller I want to control through LabVIEW. The device interfaces via RS-232, which I've connected to the computer using an RS-232 to usb adapter.
I can communicate with the device using the computer terminal. /dev/tty.* shows the address, and by using the terminal screen command I can send and receive information to the controller. However, the device does not show up in NI MAX, and so I can't communicate with it via VISA commands. I can continue controlling it via terminal commands, but I would much prefer to have a LabVIEW controller.
The LabVIEW help I've found simply suggests reinstalling MAX. The IT setup we have makes installing anything a long process, so I would prefer not to go that route unless I was certain a bad install is the problem. I can successfully communicate with the instruments we have on the GPIB bus via LabVIEW, so I'm inclined to believe NI MAX is operating correcly.
Is there any way to provide LabVIEW with the correct address so that it can communicate? Alternately, is there any way to search for the device on MAX given that I know the usb terminal it is connected to?
09-09-2016 12:10 PM
A device that you communicate with using RS-232 won't show up in MAX. The serial com port will show up in MAX.
If you can use a terminal program to communicate with it, then you can certainly use VISA commands to communicate with it.
Look in the example finder for Serial Port examples. They aren't the best as the most basic example uses the "Bytes at Port" method which is the wrong one to use in about 95% of the cases. But it should get you started.
09-09-2016 12:33 PM - edited 09-09-2016 12:40 PM
Thank you for the quick response.
I've looked through the serial examples, but all of them have the visa address input at the front panel via a drop down menu. The issue I'm running into is that the device doesn't appear on that menu. What I see is:
ASRL7 is not the device I'm trying to connect to. Edit: I may have misspoke. The resouce dissapears when I disconnect the device. However, trying to communicate with it gives the error
The number also increments every time I hit refresh, so ASRL7 becomes ASRL8 when I refresh.
Maybe I'm not finding the correct example. These are the ones I've found:
09-09-2016 12:47 PM
Are you 100% sure ASRL7 isn't your serial port? Did you try using it and get no reply?
http://www.ni.com/tutorial/4049/en/
Port Referencing: In LabVIEW, ports are numbered starting at zero. Therefore, port 0 in LabVIEW is COM 1 on a PC.
[PC: 0 = COM1, 1= COM2,... Mac: 0 = Modem, 1 = Printer,... Sun: 0 = ttya, 1 = ttyb,...]
And irritatingly enough, ASRL is what serial ports show up as, and the number following them (7, in your case) isn't always the number you see anywhere else.
09-09-2016 12:56 PM - edited 09-09-2016 12:59 PM
I apologize, it looks like you are correct; the ASRL7 does dissappear when I disconnect the device. However, trying to communicate with it gives me the error
Oddly, the resource name doesn't stay the same. Whenever I hit refresh the number increments, so ASRL7 becomes ASRL8.
I also don't see it in NI MAX. These are the resources NI MAX displays whether or not the device is connected to the computer:
I can look through the link you included more closely. I'll update the reply if I find the solution.
09-09-2016 03:36 PM
Something else you might take a look at is the versions of LabVIEW and VISA you're running.
You mentioned you're running 2013 on a machine with El Capitan. The first supported version of LabVIEW on that OS is 2015 SP1. If you have a version of VISA that works with 2013, I wouldn't be entirely surprised if it isn't written in a way that works well with El Capitan and we might want to take a look at that version to see if there's something that will work better with your specific setup.
09-09-2016 04:04 PM
The NI Visa Configuration application I have is version 15.5.0. Is that what you mean?
09-09-2016 04:16 PM
I'd assume that comes along with NI VISA 15.5 ( http://www.ni.com/download/ni-visa-15.5/5849/en/ )
The readme for that says it supports both LV 2013 as well as OS X 10.11.x
I haven't tried using VISA on Mac before. Are there test panels on Mac as well? In MAX, open up the Devices and Interfaces menu and click on the Serial interface in question. On a Windows machine, there's an option to "Open VISA Test Panel" when you click on the interface you're interested in. From this, you should be able to send it specific commands and get replies. This pulls one variable out of the equation (LV) so you can see if the drivers are able to communicate. Once that is successful, you can bring LV back in to see if the issue is with the comms as a whole or the LV component.
09-12-2016 07:33 AM
I believe the interface is more limited, but the test panel is there:
The problem is I only seem to be able to use it for items that already appear on the list. The only USB interface that MAX finds is for a USB bluetooth controller, which I'm certain is not my device as it appears regardless of whether the instrument is plugged in. If there is a way to point the test panel to a certain usb address I could certainly try that.
09-12-2016 10:09 AM
Are you sure it is RS232 that you are using, and not GPIB?
What is the GPIB-USB used for?