LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing Issue - Waveform/XY Graph Data from Keithley 2100 Multimeter

Hi all, I'm working on a VI to record resistance/time data from a Keithley 2100 multimeter. Not a lot of examples for that device, and I'm new to LABVIEW so please bare with me! 

 

Overall process: click start, countdown 5 s, record resistance data and time

 

I tried both:

-Waveform (issue is that multimeter data does not contain time, so I was trying to generate time values through the waveform - don't think it works)

-XY graph (creating timestamps and plotting with corresponding resistance data from the multimeter, however I keep getting a timeout issue and it stops recording after about 10s). time data is not reliable

 

In either case, time data does not increment at the specified rate, likely because I have set it up poorly!  

 

Any help would be appreciated!

 

0 Kudos
Message 1 of 11
(3,563 Views)

Hi Megan,

 

however I keep getting a timeout issue and it stops recording after about 10s).

Where do you get that TimeOut error?

Why does it stop recording data? (You should get atleast "0" values in case of an error!)

Why don't you handle such errors? You don't even stop the loop on error…

 

time data is not reliable

Of course not!

You create your timestamp in parallel to your DMM reading, so it will be very likely unrelated (= "not in sync") to the DMM reading…

Best regards,
GerdW


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

Thank you for your response GerdW! 

 

I have attached a screenshot of the error and output. The code for XY graph is same as the waveform, and the timeout error was only happening with the XY graph version. I suppose I will need to handle the error through the loop. 

 

For the time - I'll work on adding the timestamp in the loop in parallel with the DMM reading.

 

To you, does it seem better to use the Waveform or XY graph version with this data? 

 

All the best,

Megan

0 Kudos
Message 3 of 11
(3,524 Views)

Hi Megan,

 

on that error: it's a message of your Keithley device - read your manual to learn about its meaning...

Best regards,
GerdW


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

There are two ways to do this, and it depends on how much instant feedback you want or how accuarate the timing needs to be.

 

Method #1 - Most accurate.  Allow the K2100 to do the measurements using a trigger at a timed interval.  All data is buffered internal to the instrument and sent to PC at the end of the measurement.  (i.e. no feedback, but highly accurate timing of each measurement).  See attached: K2100_Nsamples_triggered.vi

K2100_Nsamples_triggered.png

 

 

Method #2 - Less accurate, but instant feedback.  Make a measurement inside a loop and approximate time record the time measurement was taken.  Plot the measured point immediately, take the next point, repeat.  If timing to ms isn't critical then this is a decent solution.  I see you are working on this variation so I won't provide code.  (I hate to ruin anyone's fun!)  Post what you have if you need help.

 

Craig

Message 5 of 11
(3,509 Views)

Thanks so much Craig - very helpful!

 

When I run the VI you sent - I get the following error:

"Error -1073807339 occurred at VISA Clear in Keithley 2100 Series.lvlib:Initialize.vi->K2100_Nsamples_triggered.vi"

Possible reason(s): VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.

 

I'm hoping to collect resistance and time data at 100 Hz (every 10ms) for an extended period of time (until I stop it manually - based on mechanical testing running simultaneously - could take up to 5 mins). Accurate time is more important than instant feedback. 

 

I attached the updated version with the timing in the loop - still not collecting at a reliable rate and getting timeout errors when I collect at higher frequencies. 

 

All the best,

Megan

 

 

 

 

0 Kudos
Message 6 of 11
(3,498 Views)

I don't have a K2100 so I can't test, but I am using the same VI that you are showing in your picture.  Perhaps your VI was still running and communicating with the instrument when you tried my code?  

 

If you want help with your code, then attach it to a post.  Attach the VI or a Snippet and not plain image.  But I have to say that 10ms is probably not enough time for the DMM to receive commands, auto-zero, auto-scale, measure and transfer data to PC.

 

Craig

0 Kudos
Message 7 of 11
(3,478 Views)

on that error: it's a message of your Keithley device - read your manual to learn about its meaning...

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO 
0 Kudos
Message 8 of 11
(3,461 Views)

Hi Craig,

 

Thanks again for your help before, and apologies for the late response.

 

While a frequency of 2000 rdgs/s is shown on the spec sheet for the Keithley 2100, I am not sure how to achieve this on labview. My target is 100 Hz, or 100 readings/sec. I suspect I will have to rearrange my VI so that I am using multiple samples/trigger and use trigger delay for my timing? However, I want to be able to validate the time intervals are accurate (ideally with timestamps) but not sure that is possible. 

 

I am still unable to run your code, I get timeout errors immediately, even after increasing the timeout. 

 

All the best,

Megan

0 Kudos
Message 9 of 11
(3,432 Views)

Hi Megan,

 

Are you specifying the right GPIB address or VISA resource?  A timeout should not occur in my code, if your code is running without error.

 

I'll try things your way and get back to you tomorrow.

 

Craig

0 Kudos
Message 10 of 11
(3,424 Views)