I am writing a program in c# that's supposed to activate the picoscope and start sampling it's data and save it in a class for analysis.
in the function get_time base I am not succeeding, also I would want to make my program managed as opposed to the unmanaged class I am currently writing because of the pointers the native C functions takes.
Here is my peace of code if you can guide threw what am I doing wrong that the function doesn't succeed in giving values to my variable
- Code: Select all
private short handle;
private short timebase;
private int no_of_samples = 1000;
private int time_interval_ns;
private short time_unit;
private short oversample = 2;
private int max_smaples;
public short GET_TIMEBASE()
fixed(int* TimeInterval = &time_interval_ns , MaxSamples = &max_smaples)
fixed (short* TimeUnit = &time_unit)
//short localTimeBase = timebase;
//int localNumSamples = Convert.ToInt32(no_of_samples);
//short localOversample = no_of_samples;
short finishStatus = ps3000_get_timebase(handle, timebase,no_of_samples, TimeInterval, TimeUnit, oversample, MaxSamples);
If you have any better way to suggest for writing a c# program to work with the picoscope for the my purpose please expose me to it.
Looking for a way to create a managed code