01-29-2016 02:12 AM
sorry, just noticed it's on the Time axis. Scratch that...!
01-29-2016 02:30 AM
can you try a quick test for me:
1) disable all the code you have in there to handle the data being read in from the Keithly - just read the data in and don't do anything with it
2) in the 'enable' section of the 'disable' box, put in an LED, wired to a True/False input - use a shift registor on the While loop to change the state of the wire so that the LED turns on and off each time you go around in the loop.
3) does the LED (on the front panel) blink? If so, fast or as slow as you've been seeing it run?
Why?
I'm wondering if the time it's taking you to handle the data you've read in is slowing down the while loop (time until the next iteration). If so, you may need to switch over to a producer/consumer option.
02-09-2016 08:09 AM
I can't work out how to do what you are describing but I have changed the code to only enable the reading in data part and there are loop times visible.
If I set the number of points to save in the keithley buffer to just 2 (fastest option) then the loop time is 59ms or so. Does that seem slow? If you could explain the LED thing or post some code that would be helpful too.
Code is attached.
02-09-2016 09:51 AM
Hi flb,
If I set the number of points to save in the keithley buffer to just 2 (fastest option) then the loop time is 59ms or so.
Don't forget the overhead needed to send commands to the Keithley, do the actual measurement and transfer the data back to your PC!
It doesn't make sense to use the buffer for just 2 samples. The buffer is used to acquire data at higher sample speed at block sizes of 100-1000 samples…
02-09-2016 10:23 AM
I usually use 100 buffer points I was just using 2 as an example. The more buffer points I use the slower the loop runs. It can take ~1s when using a lot of buffer points. Why is this? It just seems all seems very slow.
What do you mean by 'overhead' and why I am forgetting about it?
02-09-2016 11:32 AM - edited 02-09-2016 11:39 AM
Hi flb,
What do you mean by 'overhead' and why I am forgetting about it?
As I wrote before: communication with the device and execution times of the device…
The more buffer points I use the slower the loop runs.
Sure. The more samples the more data to acquire (samplerate!) and to transfer…
Comparing your VI with the datasheet offered by Keithley I spot some differences. Keithley notes to use "PLC 0.01" for fastest reading, while you are using ":NPLC 1".
They also mention "binary transfer mode" to speed up data transfer to PC.
Did you read the manual for your device? It's all explained in there - IMHO Keithley used to write very good manuals, when I was working with their devices!