LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

loop on agilent 34970 measurement

My objective is to read a switch to determine if it's open or closed and branch on that. I'm trying to set up a resistance measurement (set up 1 time only) then read data in a loop, maybe every 1 sec or so, and branch based on the value of resistance. My first attempt was looping on the EZ Resistance vi, but it chatters the relays every measurement. I want to set up the path (relays) 1 time only, then read data repeatedly w/o additional relay closings. Attached is my attempt to modify the Advanced Scan vi but it doesn't work. It executes but no data appears, and I don't hear even 1 relay closure setting up the scan. What am I doing wrong?
0 Kudos
Message 1 of 19
(3,868 Views)

Are you monitoring a single switch? If so, there is no need to do a scan. If you are reading multiple points, then obviously a scan will be performed and the relays will open/close each scan.

 

For operating a single relay, try the Switch function and then just do a read.

 

p.s. Why are you using the old driver for the instrument and not the 8.x project style driver?

0 Kudos
Message 2 of 19
(3,860 Views)

Dennis, yes I'm monitoring a single switch. I thought a scan was required because a "scan" directs the 34970A to connect a given channel in a scanlist, which in this case, contains only 1 entry, channel 107, which I want to configure for resistance measurment. I thought ANY measurement required a scan of at least 1 channel.

You say try the switch function. The only switch function I know of has to do with the switching matrix, which I'm not using.

I don't understand your question about "old driver" and 8.x project style driver. These are the only Agilent vi's I have.

0 Kudos
Message 3 of 19
(3,851 Views)

No, you do not need to do a scan. You can just use the Switch function to close 107. NONE of the measurements require a scan. It's pretty basic. Close the relay, take as many readings as you want, opne the relay.

 

As shown here, there are three types of drivers available. You chose the middle one. I would have recomended the project style driver since you are using 8.x. A project style driver can only be used with 8.x or higher.

0 Kudos
Message 4 of 19
(3,831 Views)
Dennis I think we're on different wavelengths. Yes I can run the switch.vi and connect the multimeter to the external switch whose resistance I'm trying to measure, but I still need to CONFIGURE the DMM to make a resistance measurement, which requires the HP34970A EZ Resistance.vi, or HP34970A Config Resistance.vi to set up the DMM for a resistance measurement. These vi's require a scanlist input, which is where I tell it which DMM channel to use for the resistance measurement, and it closes the switch to connect channel 107 to the DMM and makes 1 resistance measurement. Sounds like what your suggesting is I use the HP34970A Switch.vi to connect DMM channel 107 to my external circuit, and somehow, I don't know how, tell it to measure resistance in a loop. If there's a vi that does nothing but configure for resistance on a given range and outputs a value, then that's what I need in my loop. Where do I find such a vi?
0 Kudos
Message 5 of 19
(3,820 Views)

wb2nvy wrote:
Dennis I think we're on different wavelengths. Yes I can run the switch.vi and connect the multimeter to the external switch whose resistance I'm trying to measure, but I still need to CONFIGURE the DMM to make a resistance measurement, which requires the HP34970A EZ Resistance.vi, or HP34970A Config Resistance.vi to set up the DMM for a resistance measurement. These vi's require a scanlist input, which is where I tell it which DMM channel to use for the resistance measurement, and it closes the switch to connect channel 107 to the DMM and makes 1 resistance measurement. Sounds like what your suggesting is I use the HP34970A Switch.vi to connect DMM channel 107 to my external circuit, and somehow, I don't know how, tell it to measure resistance in a loop. If there's a vi that does nothing but configure for resistance on a given range and outputs a value, then that's what I need in my loop. Where do I find such a vi?

This is where you have to stop using the pre-fab VIs and start making your own.  Check out the DMM quick reference guide for a list of SCPI commands, then check out NIs tutorials on VISA communications (if you need it).  I always liked to make my own "drivers" so I could make them do what I wanted, how I wanted it.  🙂

 

Bill

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 19
(3,818 Views)

I believe that all you need is the Conf Resistance. Check the manual but I'm not sure there are any relays actually closed after the function. All that you need in the loop is the read. The Conf Resistance does not perform a measurement. I would avoid any VI called 'EZ'. I had to use the 34970 for several years and never did a 'scan'. Just close the relays I wanted, when I wanted, and did a measurement.

 

Also double check the manual to see whether the channel list is even required for those commands to configure the DMM. I seem to recall that it was optional so the modification to the VI would be minor.

0 Kudos
Message 7 of 19
(3,812 Views)
Dennis, what you say makes sense. I put together a vi that ought to do what you suggest, but it outputs no data and gives an error message 'timeout expired before operation completed'. I want to see it make 1 resistance measurement before complicating it with a loop. By the way, the configure vi DOES require a channel list input.
0 Kudos
Message 8 of 19
(3,804 Views)

Yes, I would expect it to return a timeout. You are not issuing the read command to the instrument. There is a Read.vi that you should be calling. I should have been clearer that it is a distinct driver function and not the VISA Read function. Look at the example and see how it is used.

 

I did not say (or at least it was not my intention to say) that the Conf Resistance did not require a channel as an input. The 34970 probably does not need a channel to configure resistance and if it does not, the LabVIEW function can be easily modified.

0 Kudos
Message 9 of 19
(3,797 Views)
OK I replaced the VISA read with the Agilent Read, and sure enough, the timeout went away, but still no data.
0 Kudos
Message 10 of 19
(3,791 Views)