I'm trying to write a support driver for the Pico6000E series (PS6000A API, because it's only a few letters away, right?). However, I can't find the programmers guide anywhere. Can somebody help me?
I assume that you mean, you want to write an API for the PicoScope 6000E using the PS6000A Driver. As mentioned on your other post, unfortunately the Programmers Guide is not yet available, but as soon as we know when it will be I will let you know.
Is there any guidance you can provide on specific functions? My customers are expecting a functioning device driver. Provided that the entire 6000 series has been marked end-of-life, they are not happy buying an old model.
I'm currently getting stuck on the following functions (64 bit mode):
no longer requires a standard range, but a PICO_CONNECT_PROBE_RANGE, which is a giant enum for which I don't understand the values, and I can't seem to fetch them from the device. Either way, this function will cause a PicoStatus.PICO_WARNING_PROBE_CHANNEL_OUT_OF_SYNC.
Finally, provided I ignore all the previous problems, I end up at
Most of the arguments I've seen before, but I have no clue what the 'waveform' parameter is supposed to do, and I can't find it in any of the other SDK documentation either.
Which programming language are you using?
We have some examples for the ps6000a driver in C#, Python and Labview available on our github page which show how to call functions for using the new 6000E devices https://github.com/picotech
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct PicoScalingFactors {
public Channel Channel;
public PicoConnectProbeRange Range;
public short Offset;
public double ScalingFactor;
public PicoScalingFactors(Channel channel, PicoConnectProbeRange range, short offset, double scalingFactor) {
Channel = channel;
Range = range;
Offset = offset;
ScalingFactor = scalingFactor;
}
}
[DllImport(DriverName, EntryPoint = "ps6000aGetScalingValues")]
public static extern StandardDriverStatusCode GetScalingValues(
short handle,
PicoScalingFactors[] scalingFactors,
short numScalingFactors);
Now that we have added the functions as specified in the header file, we should be able to call it. So, I added the following code:
var scalingFactor = new PicoScalingFactors();
var scalingFactors = new List() { scalingFactor };
status = DriverImports.PS6000a.GetScalingValues(handle, scalingFactors.ToArray(), 1);
This code is more or less a copy-paste from the first few lines of SetTrigger, since that function has a very similar footprint. However, again, as with my Java and C++ attempts, this results in a MemoryAccessViolation. At this point I feel like I've tried everything from giving it a single struct as an argument to giving it a giant empty memory section, giving it memory with some pointers, you can go on.
Currently, it feels like the function call is not correctly interpreting the provided pointer values as a 64 bit value, but somehow using 32-bit values, which then results in an access violation.