Frequency and Duty cycle measurement from C# code

Post your .Net discussions here
Post Reply
Pradeep
Newbie
Posts: 1
Joined: Mon Apr 04, 2016 10:21 am

Frequency and Duty cycle measurement from C# code

Post by Pradeep »

Hi,
We are using PicoScope 3406D MSO device with our C# .Net application. The sample C# code provided in SDK has only getting block and stream of data from device. We require to get additional data like AC RMS value, Frequency, DutyCycle etc. From the Picoscope 6 application, we are able read it by Adding desired Measurements. But we need it to be read from our C# code.
Please guide us to achieve the same. Thanks.
Attachments
Screenshot
Screenshot

Hitesh

Re: Frequency and Duty cycle measurement from C# code

Post by Hitesh »

Hello Pradeep,

The driver API functions provides the User with the ability to configure the device and retrieve raw data from the oscilloscope (and control the signal generator where available).

To make measurements on the data, you will need to implement your own algorithms or there are third party libraries which you might be able to use.

If you wish to use the PicoScope 6 software instead you can do so and use the automation commands to export the Measurement table data out using the command:

Code: Select all

picoscope.com /a Measurements.CSV?
You can also pipe the output to a file e.g.

Code: Select all

picoscope.com /a Measurements.CSV? measurements.csv
Hope this helps,

dominik
Newbie
Posts: 0
Joined: Wed Feb 08, 2017 2:04 pm

Re: Frequency and Duty cycle measurement from C# code

Post by dominik »

Hello Hitesh

Following up your response I have another question. Where to find manual with all of automation commands?
Executing picoscope /a ? is just displaying list of some commands with no description. I can't make i.e. picoscope /a Measurements.Add working because I have no idea what sort of arguments does it use.

Alternatively is there another way to automate Picoscope 4000 series than automation commands/SDK? I saw some sort of GPIB-looking commands for 9000 series scope https://www.picotech.com/download/manua ... -guide.pdf. Is there something like that for 4k series?
BR, Dominik

dominik
Newbie
Posts: 0
Joined: Wed Feb 08, 2017 2:04 pm

Re: Frequency and Duty cycle measurement from C# code

Post by dominik »

Answering myself up until now there is no description document of automation commands. Also adding/removing measurements can't be automated via automation commands.
BR, Dominik

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Frequency and Duty cycle measurement from C# code

Post by Martyn »

If you open up the Macro Recorder, Tools->MacroRecorder, the window will show the required commands to use through the Automation interface for a given action. Just click on the PicoScope operation buttons, and the commands will start to appear in the list.

If nothing appears in the recorder window for a given operation, then there is currently no automation control available for that feature, this includes the Measurements even though they appear in the picoscope /a ? list.
Martyn
Technical Support Manager

dominik
Newbie
Posts: 0
Joined: Wed Feb 08, 2017 2:04 pm

Re: Frequency and Duty cycle measurement from C# code

Post by dominik »

Yes, this is method I'm using right now, but correct me if I'm wrong, you can't click anything to get i.e. Measurements.CSV?, it's also not listed in picoscope help, yet it's there and working. This is why manual on those commands would be handy.
BR, Dominik

Post Reply