LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SR844 GPIB real time measurements

Solved!
Go to solution

Hello everyone,

I just started using Labview and I have downloaded the Instruments driver for the sr844 lockin amplifier.

I would like to read of the measurements of the channels and save them in a csv format for post processing.

 

My main issue is that I cannot figure out how to accuire the data in real time.

If i setup the instruments and continusly use the measure function of the sr844 library in a loop, the update rate is higher than the sample rate. As a results I get "points" than the measured ones.

 

Anyone has any idea about how to do this?

Sorry it might be quite obvius.

 

Yiangos

0 Kudos
Message 1 of 7
(3,518 Views)

Hi Yiangos,

 

when there is a problem with your VI you shoul dattach your VI.

(And like others will say too: don't post images of code, post real code!)

 

update rate is higher than the sample rate

Any hard numbers on this?

Do you get any error messages?

 

I just started using Labview

You surely took the free online courses? (From your spelling of LabVIEW I fear you didn't so far… :D)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,500 Views)

Hello GerdW,

I have done some LabVIEW tutorials from youtube but I will have a look at the free cources as well:)

 

The issue I think is that I am calling measure too fast and therefor I get back "dummy" data.

 

Attached is my VI, I used the SR844 drivers which can be found here. http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=04731A85006B078FE0440003BA7CCD...

 

Yiangos

0 Kudos
Message 3 of 7
(3,460 Views)

Hi Yiangos,

 

this is what the ReadMeasurement looks like:

check.png

So there is a request send to your SR844 and the following answer of the device is read.

When the device answers with a stale value: read the device user manual and ask the SR844 manufacturers support team!

 

Why do you try to read the values that often? Why not put a small wait in your DAQ loop?

Does your device allow buffered data fetch? (I don't bother to read the manual of YOUR device!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,453 Views)

Oh now I see.

 

I did specify the sample rate of the device to be 512 Hz so I imagine I could use a 1.95ms delay.

 

Also it does allow for buffered data fetch. I imagine I would have to wait for all the data to be collected and then be transfered.

 

If I would like to plot this data with a chart with the X axis being time, I could devide the X axis by (sample rate * number of sumples) right?

 

Yiangos

0 Kudos
Message 5 of 7
(3,451 Views)
Solution
Accepted by topic author yiancar

Hi Yiangos,

 

If I would like to plot this data with a chart with the X axis being time

You could set a multiplier (=sample interval) for the X axis to mimic a "time scale"…

 

I imagine I would have to wait for all the data to be collected and then be transfered.

I "imagine" you can read all this in the user manual! Did I mention you should read the f***ing manual? 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(3,449 Views)

Thank you GergW 🙂

0 Kudos
Message 7 of 7
(3,446 Views)