Api/fonction c++

Post your C and C++ discussions here
Post Reply
hanane
Newbie
Posts: 0
Joined: Thu Apr 08, 2021 9:28 am

Api/fonction c++

Post by hanane »

Hello,

I am doing a 3-month internship in which I have to drive a Picoscop via a test program and I am creating scripts with the different APIs in C ++ language. The picoscope I use is the 4824. On this site I found several examples but none correspond to this model with C ++. Do you have libraries, functions, code; API lists to be provided to me please.

Thank you so much,
Cordially,

bennog
Advanced User
Advanced User
Posts: 206
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: Api/fonction c++

Post by bennog »

You can get everything over here on github

https://github.com/picotech

I think you need the 4000A sdk samples for the 4824

https://github.com/picotech/picosdk-c-e ... er/ps4000a

Benno

hanane
Newbie
Posts: 0
Joined: Thu Apr 08, 2021 9:28 am

Re: Api/fonction c++

Post by hanane »

Hi Benno,
Thank you very much for the quick response!
But for this model to compare with the others there is hardly any example of card, like for example the evaluation of the rise time, the reading of the samples or the configuration of the channels. Do you have examples of this kind to send me please?

Thank you

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

Re: Api/fonction c++

Post by Martyn »

I would suggest you look specifically at https://github.com/picotech/picosdk-c-e ... 4000aCon.c as this file shows how to setup channels, triggers, and collect data in three different ways ( Block, RapidBlock, and Streaming )

What it doesn't provide is examples on what to do with the data once it has been collected, such as calculation of rise times etc, as this will be application and user specific.
Martyn
Technical Support Manager

hanane
Newbie
Posts: 0
Joined: Thu Apr 08, 2021 9:28 am

Re: Api/fonction c++

Post by hanane »

Yes thank you.

Indeed that's what I'm trying to do. Even if it remains different for each of the user's needs, do you have an example script for calculating the rise time or something else that I could adapt according to my needs?

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

Re: Api/fonction c++

Post by Martyn »

We don't have a script for this but what you need to do is :-

Find the steady state low level
Find the steady state high level
Subtract low from high to find the difference
Calculate the 10% and 90% values of the difference ( or 20/80 )
Then look at the data set and see how many samples there are between (steady state low value + 10% value) and (steady state low value + 90% value)
Using this number of samples and the sample interval used for the collection you can calculate the rise time
Martyn
Technical Support Manager

hanane
Newbie
Posts: 0
Joined: Thu Apr 08, 2021 9:28 am

API macro

Post by hanane »

Hello,

I come to you to find out if for APIs you only use low-level APIs or there is the possibility to use the one given by the software I will send you. In your user guide, I see that we can use macro, I wanted to know if you had a record with its content please.


Thank you

hanane
Newbie
Posts: 0
Joined: Thu Apr 08, 2021 9:28 am

Re: API macro

Post by hanane »

Code: Select all

AutoSetup.AutoSetup
        Buffer.Filter
        Buffer.Filtered.First
        Buffer.Filtered.Last
        Buffer.Filtered.Next
        Buffer.Filtered.Previous
        Buffer.Next
        Buffer.Previous
        Channel.#0.AnalogOffset
        Channel.#0.Coupling
        Channel.#0.Enabled
        Channel.#0.LowPass.Enable
        Channel.#0.LowPassCutoff
        Channel.#0.Offset
        Channel.#0.Range
        Channel.#0.Zoom
        Channel.#1.AnalogOffset
        Channel.#1.Coupling
        Channel.#1.Enabled
        Channel.#1.LowPass.Enable
        Channel.#1.LowPassCutoff
        Channel.#1.Offset
        Channel.#1.Range
        Channel.#1.Zoom
        Channel.#2.AnalogOffset
        Channel.#2.Coupling
        Channel.#2.Enabled
        Channel.#2.LowPass.Enable
        Channel.#2.LowPassCutoff
        Channel.#2.Offset
        Channel.#2.Range
        Channel.#2.Zoom
        Channel.#3.AnalogOffset
        Channel.#3.Coupling
        Channel.#3.Enabled
        Channel.#3.LowPass.Enable
        Channel.#3.LowPassCutoff
        Channel.#3.Offset
        Channel.#3.Range
        Channel.#3.Zoom
        Channel.#4.AnalogOffset
        Channel.#4.Coupling
        Channel.#4.Enabled
        Channel.#4.LowPass.Enable
        Channel.#4.LowPassCutoff
        Channel.#4.Offset
        Channel.#4.Range
        Channel.#4.Zoom
        Channel.#5.AnalogOffset
        Channel.#5.Coupling
        Channel.#5.Enabled
        Channel.#5.LowPass.Enable
        Channel.#5.LowPassCutoff
        Channel.#5.Offset
        Channel.#5.Range
        Channel.#5.Zoom
        Channel.#6.AnalogOffset
        Channel.#6.Coupling
        Channel.#6.Enabled
        Channel.#6.LowPass.Enable
        Channel.#6.LowPassCutoff
        Channel.#6.Offset
        Channel.#6.Range
        Channel.#6.Zoom
        Channel.#7.AnalogOffset
        Channel.#7.Coupling
        Channel.#7.Enabled
        Channel.#7.LowPass.Enable
        Channel.#7.LowPassCutoff
        Channel.#7.Offset
        Channel.#7.Range
        Channel.#7.Zoom
        CollectionTime
        Config.Channel
        Copy.AsImage
        Copy.AsText
        Copy.WindowAsImage
        File.Exit
        File.Open
        File.Save
        File.SaveAs
        Instruments.Persistence
        Instruments.Scope
        Instruments.Spectrum
        LoadFile
        Measurement.Add
        Measurement.Delete
        Measurement.Edit
        Measurements
        Menu.Edit
        Menu.File
        Menu.Help
        Menu.Measurements
        Menu.Tools
        Menu.View
        Notes
        NumberOfSamples
        Persistence.Advanced.BackgroundColor
        Persistence.Advanced.ColorScheme
        Persistence.Advanced.DataHold
        Persistence.Advanced.LineDrawing
        Persistence.Advanced.Mode
        Persistence.DecayTime
        Persistence.MinimumIntensity
        Persistence.Mode
        Persistence.Saturation
        Print.Preview
        Print.Print
        Properties.Channel.#0
        Properties.Channel.#1
        Properties.Channel.#10
        Properties.Channel.#11
        Properties.Channel.#12
        Properties.Channel.#13
        Properties.Channel.#14
        Properties.Channel.#15
        Properties.Channel.#2
        Properties.Channel.#3
        Properties.Channel.#4
        Properties.Channel.#5
        Properties.Channel.#6
        Properties.Channel.#7
        Properties.Channel.#8
        Properties.Channel.#9
        Properties.CollectionInfo
        Properties.Scope
        Properties.Siggen
        Resolution
        Run
        Settings.LoadDefaults
        Settings.LoadFactorySettings
        Settings.LoadLastSession
        Settings.ResetDefaults
        Settings.RestoreLastSessionOnStartup
        Settings.RestoreUserSettingsOnStartup
        Settings.SaveDefaults
        Settings.SaveSettingsToFile
        Siggen.Amplitude
        Siggen.Enabled
        Siggen.Frequency
        Siggen.Offset
        Siggen.Sweep.Enabled
        Siggen.Sweep.IncrementFrequency
        Siggen.Sweep.IncrementInterval
        Siggen.Sweep.StopFrequency
        Siggen.Sweep.Type
        Siggen.Triggers.On
        Siggen.Triggers.Shots
        Siggen.Triggers.SoftwareTrigger
        Siggen.Triggers.Source
        Siggen.Triggers.Threshold
        Siggen.Triggers.Type
        Siggen.WaveType
        Spectrum.DisplayMode
        Spectrum.Scale
        Spectrum.ScaleType
        Spectrum.SpectrumBins
        Spectrum.WindowFunction
        Spectrum.XScale
        Tools.Home
        Tools.Marquee
        Tools.Pan
        Tools.Select
        Tools.Zoom.FullSize
        Tools.Zoom.Horizontal
        Tools.Zoom.Undo
        Tools.Zoom.Vertical
        Tools.ZoomIn
        Tools.ZoomOut
        Trigger.Direction
        Trigger.Edge
        Trigger.Edge.Falling
        Trigger.Edge.Rising
        Trigger.Hysteresis
        Trigger.PreTrigger
        Trigger.PWQtype
        Trigger.RapidBuffers
        Trigger.Threshold
        Trigger.Threshold2
        Trigger.Time
        Trigger.Time2
        Trigger.TimeDelayEnable
        Trigger.TriggerDelay
        Trigger.TriggerMode
        Trigger.TriggerSource
        Trigger.Type
        View.Add.Scope
        View.Add.Spectrum
        View.Add.XY
        View.ArrangeAxes
        View.ArrangeViewports
        View.Close
        View.GridLayout.1 view
        View.GridLayout.2 views
        View.GridLayout.3 views
        View.GridLayout.4 views
        View.GridLayout.6 views
        View.GridLayout.9 views
        View.GridLayout.Auto
        View.GridLayout.Custom
        View.Properties
        View.Rename
        View.ResetLayout
        View.ResetSizes
        View.Ruler
        WindowLayout
not being able to transfer screenshot I copy the list directly.

Post Reply