Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Device is responding to serial port

Hi!

I am new in this field... I am using LabVIEW to read data from a device(Spectral Analyzer) to the computer using RS232 serial port....

getting Error-1073807339 timeout expired before operation completed..

I am using VISA VIs... VISA-IC is also giving the same error, performed loop back test; it was successful.

Now I need to know:

1> do I will neccesarily require Device Driver for a the particular device??

2> Do  I  will need any Communication Bus in between serial port of device and PC to acquire data?? currently, I am using Connectors only to connect them.

Plz reply soon... It very Urgent.   TIA..

Bye

Brij

0 Kudos
Message 1 of 4
(3,666 Views)
Brij,

your posting is a little confusing. I might not have got your point...
The error message you refer to means that either there was no connection to the device or your reading got exactly the number of bytes you have been requested. Check if there is data availabel after VISAread. If so and the data is plausible than you may just ignore that error. Otherwise try to connect to the device using hyperterminal or so, just to confirm that the physical and logical connection between the PC and the device is OK.

To you Qs:
1. No you dont, but it will help you a lot. If you do not use a driver, you have to perform all necessary actions to control the device and interprete its communication protocol yourself. Might be simple, but as well very complicated. Depends on the device.
2. A simple serial connection should be sufficient. This might be a serial cable, but as well some serial adapters (like LAN-RS232, W
LAN-RS232, USB-RS232 etc).

HTH   and
Greetings from Germany!<br>-- <br>Uwe
Message 2 of 4
(3,665 Views)
Hi Lul,
 
Thanks a lot for your reply... I admit my posting was bit confusing.. I am sorry for that.
 
Actually the thing is,  I am not getting any data after VISAread... it waits till timeout reaches and pops up the error msg and read count = 0.
I tried to read data from the device; using hyperterminal, VISA-IC and instrument I/O analyzer also..  but not getting any data from there also.
 
I don't have any device driver. I am using a simple serial cable to connect PC and the device (spectral analyzer). Currently using LabVIEW 7.0...
 
Now, my question is:  Do we have to configure the device and/or PC for proper establishment of logical connection??
 
In my opinion if a device is connected with PC via serial port, generating some data..  then we should get that data on PC via some API, since OS has its own device driver for serial port.. am I right??
 
plz don't laugh at me if u get these questions silly... actually it's first time I am doing this kind of work..
 
Please reply soon,
TIA
 
Brij
 
0 Kudos
Message 3 of 4
(3,654 Views)
If you're not getting any data from the device using Hyperterminal, then you have either a problem with the communication settings or your're using the wrong type of cable. Double check baud rate, parity, etc. that the device is expecting and make sure it matches exactly what you've set for Hyperterminal. Most serial devices require a 'null modem' cable connection. With this type of cable, the transmit and receive lines are swapped. If you have a DB9 connector on both ends, that means that pin 2 at the pc end should connect to pin 3 at the device end and pin 3 at the pc end should connect to pin 2 at the device end. If the device requires hardware handshaking, then the cabling gets a little more complex. The manufacturer of the serial device should specify cabling and com settings in a manual that they provide. If they don't, then you need to bug them for that kind of information. It's next to impossible to try and communicate without that information since there's so many variables and no standardization. If you have an electronic version of the manual, you can post that or a link to it. Don't even try to do anything in LabVIEW until you can get Hyperterminal to work.
 
Also, the driver Uwe was talking about was not a device driver but a LabVIEW instrument driver. An instrument driver is a set of LabVIEW VIs that control an instrument. With a driver, you don't need to know the details of the communication protocol. For example, the might be a single VI called Read Data that issues several commands, formats returned data, and plots it. You can go to the Instrument Driver Network and search for your device.

Message Edited by Dennis Knutson on 08-18-2005 11:02 AM

0 Kudos
Message 4 of 4
(3,651 Views)