05-19-2009 03:01 PM
I'm trying to use the Instrument I/O Assistant as a 1st step towards creating a driver for the Panametrics 400MHz Computer Controlled Pulsr Receiver, Model 5910PR, but am having difficulties. The device is connected via my COM1 port, and according to NI's Measurement and Automation Explorer, the device is enabled (confirmed by pressing the "Validate" and the Open VISA connection with device buttons).
After closing out of measurement and automation explorer, I then moved into LabView 8.6 and started working with the I/O Assistant. I chose COM1 for my instrument, set a nice long time-out of 5000ms. When I click "Add Step" and choose to "Query and Parse", I then enter in a query command such as "EY?" Or any other from the list of commands the device comes with. But I always get a timeout error and can't seem to get a response from my device. So I can't figure out if I'm querying incorrectly, or what the isue is...
05-19-2009 03:39 PM
The 'Validate' and VISA Open do absolutely nothing to verify that you have an instrument connected. You will get the same results with nothing connected. All that you have do is verify that your pc has a com port. The 'device' you have validated is the UART.
Before you start messing around with writing some code, try using Hyperterminal to communicate to the instrument (or open a VISA test panel). You need to match the com settings of the pc to the instrument and you have to verify that you are using the correct type of serial cable. The manual also says that you need XON/XOFF handshaking and each command must be terminated with a carriage return.
05-20-2009 10:09 AM
05-20-2009 10:34 AM
I'm not sure if Hyperterminal is installed on VISTA but in XP or lower, go to Start>Programs>Accessories>Communication>Hyperterminal. You'll be prompted for a name, port to use, port settings, etc. It has it's own help.
Once the terminal window is open, type a basic command such as *IDN? and the enter key. If you don't get anything back, then perhaps your com settings or cable are incorrect. Are you aware that there are two basic kinds of RS-232 cable? There are null modem and straight through. If you are using one type, try the other. I can't find anything in the manual you posted. That's something every vendor should provide and you should ask them for the information.
05-21-2009 07:56 AM
Thanks, Dennis! I'm sloooowly getting there. I've attached the 1st part of the manual; my previous PDF was just the commands section of it. According to the manual, it looks like my Hyperterminal settings should be the following:
9600 baud rate
8 data bits
2 stop bits
no parity
xon/xoff
There are 2 COM ports on my computer; using COM1 with the above settings doesn't let me type anything into the terminal window, but using COM2 does, so I'm assuming this is the one my pulser-receiver is hooked into.
I'm still having trouble getting a response from the device. I either get no response, or I get "*UNDEFINED LABEL ?". I still have to look around the labs to find the other cable type and try that out, but by looking at the commands I was trying, do you think the only problem might be the cable?
My attempts at Hyperterminal using COM2 and settings above:
*IDN?
> *IDN?
> IDN?;
*UNDEFINED LABEL
? IDN?
*UNDEFINED LABEL
?
> GA?;
*UNDEFINED LABEL
?
> GA?
*UNDEFINED LABEL
?
> *GA;
> *GA?;
> GA?;
*UNDEFINED LABEL
?
>
*IDN?;
> *IDN?;
> *IDN?;
> *IDN?
> IDN?;
*UNDEFINED LABEL
?
> IDN?
*UNDEFINED LABEL
?
> GA?;
*UNDEFINED LABEL
?
> GA?
*UNDEFINED LABEL
?
> *GA?
> *GA?;
>
*IDN?
> *IDN?
> *IDN?;
> IDN?
*UNDEFINED LABEL
?
> IDN?;
*UNDEFINED LABEL
?
> GA?
*UNDEFINED LABEL
?
> GA?;
*UNDEFINED LABEL
?
> *GA?
> *GA?;
05-21-2009 09:55 AM
I don't think the problem is the cable. The instrument is seeing something you are sending and you are getting a readable response. With a completely wrong cable, you would not read anything.
I only gave the manual a quick read and the *IDN (note no '?') and GA? are listed as valid commands. I saw that there was a front panel menu to clear all errors. Try doing that and resend a command. Verify that the communication options are set for RS-232 and not GPIB. Check with the instrument vendor about the problem and the message you are getting