I own a PicoScope 6404D. I would like to use it in order to collect data while program execution.
More precisely, I would like to configure the trigger manually (i.e. using the PicoScope software) and to view the traces while collecting it.
Previously, I did the same using an oscilloscope from Teledyne Lecroy. All I had to do, once my configuration is OK, is to connect to the oscilloscope and to call the function (using Matlab)
where DSO refers to the oscilloscope, C1 refers to the collected channel, and 175000 is the number of points to collect. Then, every time the trigger was activated, the trace was collected.
My first question is: is there any equivalent function for PicoScopes? (Ideally in MatLab or Python)
Second, I was able to configure Matlab in order to connect to PicoScope. Unfortunately, when I run the program example 'PS6000_IC_Generic_Driver_Block' it does not end. I get stuck at 'runBlock: Waiting for device to become ready...'
Here is the corresponding output:
Error using icdevice/connect (line 112)
An error occurred while executing the driver connect code.
No unit found, please check connections.
If this error is not an instrument error, use MIDEDIT to inspect the driver.
Error in PS6000_IC_Generic_Driver_Block (line 40)
connect(ps6000DeviceObj);
In the same way, I did install the package for Python but when I try to connect to the PicoScope while using the software it returns:
I have run into exactly same problem. This is common to all RTS PicoScopes because software is common. Currently only fast way to do it is via SDK (look up USB transfer speed PS6 vs SDK). However I also do not wish do deal with setting up working environment with SDK, only to access wfm and do my business with it.
What you might try is run from Windows CLI
...which will copy current buffer to Windows Clipboard. Make sure you are in right viewport and only needed wmf is enabled. Also this will stop ack. So after that run this
Of course this is all quite slow process and may be not suitable for large datasets. Also you need run some text processing on it to remove unneeded stuff.
If you have PicoScope setup to collect data, you can make use of the alrams feature to save data files once each capture is complete. Take a look at the Alarms Video on our YouTube channel for more information, and use the SaveCurrentBuffer and RestartCapture options in the alarms.
A colleague will provide information on the Matlab question.
How to work around issue with alarms - on each capture/save it will force focus on PS6 window, even if working in some other Windows program? With some hit and miss clicking can minimize PS6 - but Windows (7 in my case) GUI in general will still be very twitchy, especially Explorer.
I can imagine that someone thought that if watching some seldom occurring process it would be helpful that PS6 window pops up? If that is the case please include some "background mode" option to suppress focusing and displaying "saving file" dialog at all for real time multitasking type tasks.
My goal is to work with Pico main window while some other process feeds on data in background and does additional processing in separate window so I get semi-realtime display from both PS6 and my custom app.
For your first question, have you got a signal on channel A that would trigger the device? In the example script, runBlock will wait indefinitely for a trigger event before returning any data. Can I just check as well whether you have the most up-to-date version of the Picoscope Support Toolbox and ps6000 instrument driver add-ons as well as the latest version of the SDK?
For the second, picoscopes can only be controlled by a single piece of software at one time, so if your scope is being used by PicoScope 6 you can't open it in Matlab and vice versa.