Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Agilent 34903A Swtich code

Hello, 

 

I am relatively new to coding and data acquisition system, but I would like to automate the switches for the Agilent 34903A to the point where, two switches will work together being turned on and off. For example, switch 1-2 will be in a cycle with time. So, if switch 1 is turned on (100hrs), switch 2 will be closed and when switch 2 is turned on (50 hrs), switch 1 is closed. This will be on a on-going cycle. 

 

I have downloaded the driver for non-NI instruments and from my understanding, the codes for the actuator is built for turning switches on without automation. 

 

With that being said, I was wondering if anyone can suggest how I can edit that code, or is it better to make a code from scratch?

 

Best Regards, 

 

Saad Azam

0 Kudos
Message 1 of 2
(3,900 Views)

I downloaded the drivers for the Agilent 34970 from here:

 

http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=014F4CD7EF78136AE0440003BA7CCD...

 

I then located the example I think you are referring to in example finder as 'Agilent 34970 Switch.vi'

 

This code appears to be doing what you wish. If a Boolean in the Boolean matrix on the front panel is 'on', the channel is added to the closed channel list. From this code, you can modify the program to perform the functionality you require. You will want to make this program run continuously (i.e. put it in a while loop) and then add some comparison statements somewhere so you switch channel A off if Channel B is on and vice versa. If you are new to LabVIEW and programming in general, this may pose a few challenges for you. Some helpful resources for you:

 

I would definitely recommend modify the existing example provided by Agilent as opposed to doing this from scratch with NI-VISA, the examples are there for a reason. If you need any more help, you may get a nice forum poster to help you modify the code or you can power through it yourself and post questions along the way.Smiley Happy  

CH
Applications Engineering
National Instruments
http://www.ni.com/en-us/support.html
0 Kudos
Message 2 of 2
(3,872 Views)