Test and Measurement Forum

Frequency and Duty cycle measurement from C# code

Post your .Net discussions here

Frequency and Duty cycle measurement from C# code

Postby Pradeep » Tue Apr 12, 2016 1:56 pm

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
measure from code.PNG
Screenshot
Pradeep
Newbie
 
Posts: 1
Joined: Mon Apr 04, 2016 10:21 am

Re: Frequency and Duty cycle measurement from C# code

Postby Hitesh » Fri Apr 15, 2016 9:52 am

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,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2203
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Frequency and Duty cycle measurement from C# code

Postby dominik » Wed Feb 08, 2017 3:04 pm

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/manuals/picoscope-9200-series-programmers-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

Postby dominik » Fri Feb 10, 2017 8:18 am

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
dominik
Newbie
 
Posts: 0
Joined: Wed Feb 08, 2017 2:04 pm

Re: Frequency and Duty cycle measurement from C# code

Postby Martyn » Fri Feb 10, 2017 12:41 pm

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2526
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Frequency and Duty cycle measurement from C# code

Postby dominik » Fri Feb 10, 2017 6:11 pm

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
dominik
Newbie
 
Posts: 0
Joined: Wed Feb 08, 2017 2:04 pm


Return to .Net Languages (C#, VB.Net, .)

Who is online

Users browsing this forum: No registered users and 0 guests