From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parrallel vi's with Visa

I'm trying to create a parrallel vi with two DMMs (Digital Multimeters) making voltage and current measurments using a Visa example provided by Agilent.  I thought the vi was parrallel that I wrote but when it executes it sets ups both DMM's then proceeds to gather measurments from the first DMM, then the second DMM.  Is there a way to get readings from both DMM's in parrarel?  I was initally using one DMM but the setup from going to current and voltage was taking too much time.  I suspect I have a dependancy that I'm not aware of between the two portions of code.

 

Regards,

 

-L4Y

0 Kudos
Message 1 of 5
(2,323 Views)

 

The VI from the AG34401 driver are Non-reentrant so they will only run one at a time.

You could open the AG34401 driver VI and set them reentrant. Mainly the Fetch VI.

 

But your DMM are on the same GPIB Bus and the SCIP Fetch command will send the :FETC? with a VISA write then the VISA Read will wait until all of the points are read from one dmm before freeing the GPIB bus to alow it to talk to the other DMM.

So you can't read them at the same time over the same GPIB bus.

 

What is it that you are trying to do because there are couple of things you could do

Use the GPIB group trigger command for the DMM to take their reads and then collect the reads when they are done.

 

Alternate reading one measuement at a time from each DMM

 

I would forget about the AG34401 driver and send the SCIP commands directly giving you complete control over how and when you need to take reading.

Omar
Message 2 of 5
(2,301 Views)

The Read VI is setup to be non-reentrant.  That means only one instance of it can be executed at time.  The other instances are forced to wait until the first instance is done.  I'm not sure how easy that would be to change since it seems like the subVI's are also non-reentrant.

 

But since both devices are using GPIB bus 0, I don't know how you could event try to make them executed at the same time.  They have to share the bus.

Message 3 of 5
(2,298 Views)

Hi Omar_II,

 

Thank you for the quick response.  I'm trying to take accurate current and voltage measurements to figure out battery discharging using this DMM.

 

Currents can be in the uA and change within 10ms to 100mA.  I think I have to integrate the current and voltage curves to get the power over time, if I remember correctly.

 

Regards,

 

-L4Y

0 Kudos
Message 4 of 5
(2,282 Views)

I assume one DMM will measure voltage and the other DMM current (directly or across a shut).

You wish to instantaneously or simultaneously measure both voltage and current to get a good power calculation.

But you wish to do this over time with readings at a rate around 100 samples a second (200 per second counting both volts and current)

 

That going to be tight, but you might get close but you will have to take complete control of the DMMs bypassing the driver VI that you are using.

You could setup the dmm to take all the readings and store them in it’s internal buffer and then collect the readings at the end.  But the internal buffer has a limited size.

 

Look at bus trigger to get the two dmm to take their read at the same instance

Turn off the front display to speed up readings

Adjust your resolution to speed up reading

Turn off auto ranging to speed up reading

The manual has a section on what effects the 34401 reading speed.

Get the manual and read up on SCPI commands

 

You could use the GPIB 488.2 commands from the pre VISA days. Look at communicating to your dmms using the commands in the GPIB 488.2 pallet. There you can broadcast your commands to more than one device (see SendList) at the same time. But you still have to read back from each one at a time.

 

Using a power meter might be your best option.

 

Lunch break is over and I have to get be to my job, but might look for some old code where I had to take fast readings using a dmm.

Omar
0 Kudos
Message 5 of 5
(2,262 Views)