Start/Stop data acquisition from another program?

Forum for discussing PicoScope version 6 (non-automotive version)
Post Reply
alice2011
Newbie
Posts: 0
Joined: Fri Mar 09, 2012 11:22 am

Start/Stop data acquisition from another program?

Post by alice2011 » Fri Mar 09, 2012 11:26 am

Hello,

I was wondering if there is a way to start/stop the data acquisition from the PicoScope 6 software from another program (like a command in matlab or something), so that it is synchronised with other events?

Thanks for your help in this regard.

Hitesh
Site Admin
Site Admin
Posts: 2827
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Start/Stop data acquisition from another program?

Post by Hitesh » Wed Mar 14, 2012 11:50 am

Hi alice2011,

It is possible to use automation commands through command line in order to control certain features in PicoScope 6.

If you could explain a little bit more about your application setup and why you are looking to start/stop acquisition through another application in relation to synchronising events that would be helpful.

Regards,
Hitesh

Technical Support Engineer

TinWhisker
Newbie
Posts: 0
Joined: Fri Dec 16, 2011 10:48 am

Re: Start/Stop data acquisition from another program?

Post by TinWhisker » Mon Apr 30, 2012 10:02 am

This is very easy with some coding (I did it in C#, but VB or anything that can access windows API's)!
A Google search says MatLab can use CALLLIB perhaps?

My method:

- Open as many PicoScopes as you need, stop sampling and configure each as needed. (I had 10 instances to test)

- Write a script in your capable programming language to:
-- List all processes with PicoScope as a name. (I used GetProcessByName)
-- For each returned process, grab the window handle from its MainWindowHandle [don't ask!] (I used FindWindowEx)
-- Send a PostMessage to that handle a space key command - you need a KeyUp event to trigger correctly.

Done!

PicoScope only toggles start/stop - you cannot (that I see) use separate keys for start and stop, so you
need to make sure all instances match.

Post Reply