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: 

Problem with Agilent 34970a driver in Labview, cannot perform advanced measurements

I have direct current signal 4 - 20 mA connected to Agilent 34970A data aquisition/switch
unit and I am Labview beginner.
34970a is connected with serial to computer and performing simple measurements
like in the Simple.vi works just fine.
But I want to acquire measurements with 10Hz sampling frekvency during 5 min,
that is 3000 samples and I made Scan.vi similarly like the: "HP34970A Advanced Scan Example.vi"
in the hp34970a.llb - examples for this instrument.
But when program starts nothing happens it just stops after a fragment of time like it is finished.
No errors reported by the Labview nor by 34970A. Just the channel 121 on 34970a is reset.
I tried two drivers for 34970 found on ni.com... nothing helps. Could anyone help me with
this please I tried all combinations of parameters offered by the icons for 34970a, file
is in the attachment: Scan.vi

Darko

Download All
0 Kudos
Message 1 of 23
(4,504 Views)

Darko01,

 

It looks like in the example code, the trigger configuration VI sets "immediate" as the trigger source, while in your VI the trigger source input is not  configured at all. Make sure you're connecting that correctly so that your program knows when to start acquisition. Also, don't forget to put your instrument into "wait for trigger" mode. 

Hope this helps. 

Misha
0 Kudos
Message 2 of 23
(4,478 Views)

Misha thanks for reply. I want instrument to start scaning immediately after I pres start button in Labview I do not need it to wait for any other triggers that is why I selected "immediate". There are these options: immediate, bus, External, Alarm1... Alarm4, Timer. I tried immediate and Bus but nothing worked? ... no errors reported by the Labview nor Agilent 34970a? program starts and stops immediately and the channel 121 is reset.  

 

Darko

Faculty of mechanical engineering

Zagreb - Croatia

0 Kudos
Message 3 of 23
(4,470 Views)

Good Afternoon Darko,

 

I also think that immediate is the option that you want.  Have you tried running it with highlight execution and/or breakpoints?  My intention is that you might be able to determine which VI is causing the reset.

0 Kudos
Message 4 of 23
(4,444 Views)

Well seems that TIMER is the option for me, but realy this driver has some errors. It is just not working. I found some errors but resolving this issue would take me a long time because I am not the expert in this. It is just not usable.... and it has NI signature. I am dissapointed...

 

Darko

Faculty of mechanical engineering

Zagreb - Croatia

0 Kudos
Message 5 of 23
(4,420 Views)

I used the 34970 for years and never had a problem any of the versions of the drivers.

 

You are setting the OPC bit instead of reading and waiting for it? Is that on purpose and if so, why?

 

Have you run the example unmodified? Even if you don't have anything connected to a channel and you don't care about a voltage or resistance reading, if that runs, then you know you have some problem with how you are configuring the instrument.

0 Kudos
Message 6 of 23
(4,418 Views)

Hello Dennis thanks for trying to help.

Maybe problem is in OPC bit as You say, but I have tried all the options that are offered:        and nothing worked. I selected complete bit option because in “Advanced scan example.vi” OPC bit is selected and this note is written: “Wait for scan to finish by waiting for Operation Complete Bit to be set.  This is important because the read VI will not wait for the scan to finish. “

There are these two options under “Check parameter”: 1. Enable register, 2. Operation complete bit

And under “Set parameter” there are: 1. Event register , 2. Enable register, 3. Operation complete bit. I tried all combinations of these nothing worked. What do you think I should select?

 

It does not report any errors it just starts after I press run, immediately stops like it is finished, instrument make a click sound but does not start scanning and does not report errors, channel 121 that I am trying to use for measurement is reset (instrument displays “channel off’)  and that is it. After this I notice that some parameters given from Labview program-driver are set on instrument like number of scans (called number of triggers in agilent command). So there is some communication but scanning does not start at all.

I have run example unmodified like you suggested and it works!!! But that example is for voltage measurement. I have direct current. It is similar but mine is not working and I cannot figure out why.

I read Agilent user manual but it is not completely clear to me. I just want to perform measurements with 3000 scans and 0.1 second interval between scans. To start when I pres run in Labview and retrieve measurements and that is it. Do you have another idea?

0 Kudos
Message 7 of 23
(4,400 Views)

I too am facing similar problem.I am trying to temperatures at the fastest possible rate as per the capability.

THe capabiltyis 60HZ as per the manual.But I am not able to go anything beyond 5-7 HZ.

I am using EZtemp vi's for reading thermocouple temperature.continously in awhile loop.

 

Any suggestions?

0 Kudos
Message 8 of 23
(4,388 Views)

Well, setting the OPC is definitely wrong.

 

Instead of creating your own VI, why dind't you simply modify the example. All you had to do was right click on one of the other VIs and select Replace. Browse to the Conf Current VI and add front panel controls for that. Now, run that with the defaults. If that works, you know you've done something incorrect in the triggering in your original VI.

0 Kudos
Message 9 of 23
(4,384 Views)

siva0182,

 

Your problem is not all that similar. Your problem is using the VI in a while loop. That is not the correct way to obtain the fastes data rate. You need to do a scan. You should also post your VI. Even if you use a while loop, you may have unnecessary code in there that causes such a slow rate.

0 Kudos
Message 10 of 23
(4,383 Views)