Example for Datalogging with 2205A MSO

Post your VB and VBA discussions here
Post Reply
kamePeter
Newbie
Posts: 0
Joined: Fri Mar 02, 2018 4:54 pm

Example for Datalogging with 2205A MSO

Post by kamePeter »

Hi,
I bought a new 2205A MSO unit and was a bit disappointed when I had to learn, that this unit is not supported by PicoLog anymore. With my former old 2204 this was no problem and I used it a lot for datalogging.
But since I need this function I tried to modify the Excel VBA example program 'ps2000a.xls', so that it can measure the average of streaming data and continue to collect data in the order of once per second.
Unfortunately I did not succeed and I'm really struggeling with programming of this simple task.
Could you please provide an example-code for Excel, that shows how to collect data once a second and continue until e.g. a stop-button is pressed? I would really appreciate that!

If someone from the community has an example-script, I surely would also love to see that.

Many thanks in advance,

Peter

Hitesh

Re: Example for Datalogging with 2205A MSO

Post by Hitesh »

Hi Peter,

Unfortunately, the PicoScope 2205A MSO and its predecessor, the PicoScope 2205 MSO are not supported by the PicoLog software as it uses a different driver model.

I will add information onto a new feature request to support PicoScopes for basic streaming data collection.

If you need to capture samples at 1 second intervals, you can try setting the ps2000aRunStreaming() function with a 1000 millisecond sampling interval (use the enumeration value from the ps2000aApi.h header file to specify milliseconds).

How long do you need to capture data for?

Regards,

kamePeter
Newbie
Posts: 0
Joined: Fri Mar 02, 2018 4:54 pm

Re: Example for Datalogging with 2205A MSO

Post by kamePeter »

Hi Hitesh,

thanks for your reply! Usually I measure something like a temperature value of a thermocouple over night or so.

Thus a short example which can cover that, would be very helpful!

I already tried to do a repeat measurement of the example VBA script for Excel (e.g. with averaging of the measured values to only 10 or even 1 value(s)), but after the first measurement, Excel freezes. When the time of the measurement is over (let's say after a 'for i = 1 to 10' loop), excel awakes and shows the data, but the application should be able to react for a stop signal.

Regards,

Peter

Hitesh

Re: Example for Datalogging with 2205A MSO

Post by Hitesh »

Hi Peter,

Are you using the PicoScope 2205A MSO with a thermocouple?

Regarding the code, the 'freeze' is due to the for loop which polls the GetStreamingLatestValues function. You could try increasing the sleep in there.

It might be useful to see your code - you can post it here or e-mail to support@picotech.com

Regards,

Post Reply