04-19-2023 03:17 PM
Brand new to labview.
I want to hook my picoscope oscilloscope up to my labtop and measure from currents and voltages. I attached my code. It's just the example code for the picoscope with my measurements tossed in on the lower left corner.
But it runs like a dog.
Is there some way to optimize this or do I just need to order a supercomputer.
Thanks
04-19-2023 03:27 PM
Can you open your VI then choose "Save for Previous Version" and choose, say, LabVIEW 2021? Many veteran LabVIEW users don't upgrade every year (nor do I ...).
04-19-2023 03:37 PM
I gave it my best shot
04-19-2023 03:55 PM
A lot of us won't have this PicoScope so we'll need some help understanding which part specifically is slow and what you consider slow. Some immediate things I would probably check are:
1. You can monitor the iteration terminals of each while loop to see how often each is executing. I would be interested to see if the outer most while loop is executing more often than you expect. Changing settings and creating large buffers for scopes can take a while so if that is happening between every measurement then it will definitely slow things down.
2. What is your sampling rate and how many samples are you waiting for? If you have to wait for the scope to finish acquiring all of it's data, it doesn't matter how good of a computer you have.
04-19-2023 03:56 PM
We cannot really analyze your code much because we don't have any of your drivers. Which part is the example code that came with the instrument? (There is nothing interesting in the lower left corner!)
Do you know which part is slow? For example, what is the typical value of the orange wire going into that innermost stalling loop? Why do you have a pyramid of stacked loops instead of a clean state machine?
All these express VIs and dynamic data don't really help either. How many points are in each graph?
04-19-2023 04:03 PM
Can you open your VI then choose "Save for Previous Version" and choose, say, LabVIEW 2021? Many veteran LabVIEW users don't upgrade every year (nor do I ...).
Are you using the software that Pico provides to link with LabVIEW?
Bob Schor
04-19-2023 04:12 PM
Sorry, lower right corner, it was a long day and I got my left and right mixed up.
I attached the original example file so you can see the difference. It ran fine, but after I added my stuff it really bogged down
04-19-2023 07:08 PM
>1. You can monitor the iteration terminals of each while loop to see how often each is executing.
How do I do that?
04-19-2023 07:14 PM
@ELentz wrote:
>1. You can monitor the iteration terminals of each while loop to see how often each is executing.
How do I do that?
Connect an indicator to it!
04-20-2023 01:16 AM
I've used a picoscope and slow/fast is depending of lot of things:
- The numbers of samples you are querying ==> until they are all available the dll is waiting and your VI is in a waiting state as well
- The timebase for the acquisition
In fact like every acquisition instrument you are depending of the data avaibility. Try with less samples and a smaller timebase, it should update quicker ( but then if you have a signal processing to do you will have less time to operate before the next batch of data is coming).