VXI and VME

cancel
Showing results for 
Search instead for 
Did you mean: 

How to open/close a channel of an RFX HP1472

I used: status = WSwrt(la, "C-0-4-41", 8, 1, &rtn) to close module 0-bank 0-channel 41. The returned status is negative indicating the command error. If my HP1472 is a register-based, how do I do it? What HP1472 driver do I need?
0 Kudos
Message 1 of 5
(6,912 Views)
Because the HP 1472 is a register based device, it is not possible to use word serial commands like WSwrt() to access the device. There are two alternatives you can look at:

First, I recommend that you consider using an instrument driver to access your device. I looked on our instrument driver network at www.ni.com/idnet and found instrument drivers for the HP 1472 for both LabVIEW and CVI (you can use the CVI driver with other C environments as well).

The alternative is to use register level commands directly. For example, if you are using VISA functions, you could use viIn() or viOut(). This is not as easy as using an instrument driver, but if you need to use register level commands, Agilent should provide a regist
er map for their device that details what registers you would need to write to and read from to use your HP 1472 properly.

NI-VISA Programmer Reference Manual
NI-VISA User Manual

Best of luck! -Josh H.
Message 2 of 5
(6,912 Views)
Thanks Josh. I had problem when I used cvi.lib with MC++ windows application: LNK2005 (duplicate function definition). This time I will try to use the driver itself without using cvi.lib. Many thanks again.
0 Kudos
Message 3 of 5
(6,912 Views)
I am using Register-based programming. The problem is bit 0 of the status register is stuck at 1 (reset), and according the user's manual, this bit has to be set to 0 to be able to operate the switches. I wrote to this register to set this bit 0 to 0, but when I read it back, it's still 1. I can set/reset other bits of this register but not bit 0. I don't know why. Your comments would be profoundly appreciated.
0 Kudos
Message 4 of 5
(6,912 Views)
Phuongtran,

Bit 0 of the Status/Control register is defined to be "Device Dependent" for reading and "Reset" for writing. This means that effectively, you cannot "check" the value of the reset bit (Bit 0, offset 4). If you read back Bit 0, you are reading back a device dependent bit that is most likely unrelated to the reset bit.

Therefore, if you are believe Bit 0 of the Status/Control register of the instrument is not being properly set by the device after initialization, then it might be best to contact the instrument's manufacturer or review your instrument manual to see if there is a device dependent method of checking the state of the instrument.

Regards, Josh H.
0 Kudos
Message 5 of 5
(6,912 Views)