Test and Measurement Forum

Collecting traces while using PicoScope software

Forum for discussing PicoScope version 6 (non-automotive version)

Collecting traces while using PicoScope software

Postby zerzer » Tue Nov 07, 2017 8:47 am

Hi all,

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)
Code: Select all

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:
Code: Select all
>> PS6000_IC_Generic_Driver_Block

Copyright (C) Pico Technology Ltd. 2014

PicoScope 6000 Series MATLAB Instrument Driver

Number of units found: 1

Serial number(s): DV027/015

Opening PicoScope 6000 Series device...

   Instrument Device Object Using Driver : picotech_ps6000_generic.mdd

   Instrument Information
      Type:               Oscilloscope
      Manufacturer:       Pico Technology Ltd.
      Model:              PicoScope 6000 Series

   Driver Information
      DriverType:         MATLAB generic
      DriverName:         picotech_ps6000_generic.mdd
      DriverVersion:      1.2.3

   Communication State
      Status:             open

Setting Device Parameters...

Default Channel Setup:-

   Enabled: True
   Coupling: DC
   Analogue Offset: 0.0V
   Bandwidth: Full

   Enabled: True
   Coupling: DC
   Analogue Offset: 0.0V
   Bandwidth: Full

   Enabled: True
   Coupling: DC
   Analogue Offset: 0.0V
   Bandwidth: Full

   Enabled: True
   Coupling: DC
   Analogue Offset: 0.0V
   Bandwidth: Full

Turning off trigger...

Default Block mode parameters:-

               Timebase index : 161
                 Time Interval: 1004.8 ns
Number of pre-trigger samples: 0
Number of post-trigger samples: 1000000
       Total number of samples: 1000000

Default Streaming mode parameters:-

Streaming interval: 1.00e-06 s
Streaming auto stop: 1

Default Signal generator parameters:-

      Start frequency: 1000 Hz
       Stop frequency: 1000 Hz
       Offset voltage: 0 mV
Peak to Peak voltage: 2000 mV

Initialisation complete.

Connected to PicoScope 6000 Series device:-

      Instrument Model: 6404D
   Batch/Serial Number: DV027/015
     Analogue Channels: 4
             Bandwidth: 500 MHz
         Buffer memory: 2048 MS
Maximum sampling rate: 5 GS/s
Signal Generator Type: Arbitrary Waveform Generator

runBlock:- Collecting block of data:
   Timebase: 161
   Pre-trigger samples: 0
   Post-trigger samples: 2000000
runBlock: Waiting for device to become ready...

Is it normal?
Moreover, when I run the PicoScope software using my PicoScope, I cannot connect to it using Matlab, I get the following error:
Code: Select all
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)

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:
Code: Select all
IOError: Error calling _lowLevelOpenUnit: PICO_NOT_FOUND (No PicoScope XXXX could be found.)

So my second question is: Is it possible to automatically collect traces while using the PicoScope software? If yes how to proceed?

Thanks in advance for your help.
Last edited by zerzer on Tue Nov 07, 2017 1:19 pm, edited 1 time in total.
Posts: 0
Joined: Tue Nov 07, 2017 7:29 am

Re: Collecting traces automatically while

Postby lab!fyi » Tue Nov 07, 2017 1:09 pm

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

Code: Select all
picoscope /a Copy.AsText

...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

Code: Select all
picoscope /a Run

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.
Active User
Active User
Posts: 21
Joined: Mon Dec 12, 2016 6:58 pm

Re: Collecting traces while using PicoScope software

Postby Martyn » Wed Nov 08, 2017 9:37 am

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.
Technical Support Manager
Site Admin
Site Admin
Posts: 3102
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Collecting traces while using PicoScope software

Postby lab!fyi » Wed Nov 08, 2017 10:53 am

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.
Active User
Active User
Posts: 21
Joined: Mon Dec 12, 2016 6:58 pm

Re: Collecting traces while using PicoScope software

Postby NeilH » Wed Nov 08, 2017 12:31 pm

Hi zerzer

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.

Technical Support Engineer
Posts: 30
Joined: Tue Jul 18, 2017 8:28 am

Return to PicoScope 6 for Windows

Who is online

Users browsing this forum: No registered users and 0 guests