LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication Labwindows and hp34970a via RS-232

First of all I have to say that I am beginner with Labwindows. Until now i used GPIB interface for the communication between labwindows and DMM hp34970. Now, i want to use serial interface. I read many posts about the serial interface but everything refers to labVIEW and not to labwindows. Can i use the same drivers of the intrument (hp35970a.c), as i used to with CVI? How will the DMM be initialized and how i'll take the control of the instrument via the serial port?I have to use the RS-232 command of CVI? If somebody has worked with something similar to that, i would appreciate his help (or an example of his work). Thank you very much.

Message Edited by gkots on 05-03-2007 07:27 AM

0 Kudos
Message 1 of 5
(3,754 Views)
Attached is something in the way of a driver for the 34970A using the serial port.  It also uses the 34901 relay mux.  It's trying to take a set of voltage measurements and calculate power - you can fix this up to make the measurement type you need.  It also uses the registry to hold config values for the com port being used - you may or may not want this either.

Serial just isn't as good as GPIB - you have to make some compromises since you don't have the 488.1 uniline commands (SRQ, EOI, ATN for example) - just a serial data stream.  I think we wound up with some waits in the code (no NRFD holdoff available on serial!).

Menchar


Download All
0 Kudos
Message 2 of 5
(3,734 Views)
Did you allready try to replace the resource name in hp34970a_init()  from something like "GPIB::9::INSTR" to something like "ASLR1::INSTR" ?
And then use the driver just like when using GPIB.
To get the exact VISA resource name for your serial interface, have a look into the   "Measurement and Automation Explorer" under My System ->Devices and Interfaces-> Ports.
0 Kudos
Message 3 of 5
(3,722 Views)
Thank you for your replies. I solved the problem with the easy way: I replaced the resource name in hp34970a_init() with "ASRL1::INSTR"  and works fine (with the same drivers)! In this case, how can I change the baudrate of the serial interface? I must only set the COM port configuration (using the CVI commands for RS-232) or I have to configure (somehow!) the hp34970a  additionally? Until now, i didn't use the RS-232 commands at all, so i dont really know what happens with the baudrate.
 
0 Kudos
Message 4 of 5
(3,717 Views)
Check the Measurement and Automation Explorer for setting up the serial line. At least MAX 4.1 has a "port settings" option for ASLR1. Older verion may lack that option.  
0 Kudos
Message 5 of 5
(3,709 Views)