I have a Picoscope 5242A device connected to my PC, and I would like to read the data from two channels in block mode (and later maybe streaming mode) using python.
My question is: how to do that? With one channel it is no problem, but when I have two I cannot tell the ps5000aGetValues command which channel to read, it does not have an argument for that. Even though I have activated both channels, when I read the data, I get a series of data points which seem to come from Ch1.
You need to specify buffers using ps5000aSetDataBuffer or ps5000aSetDataBuffers for all of the enabled channels. The driver will then populate these buffers with the correct data when requested by ps5000aGetValues.
I have segmented the memory into two and assigned a buffer to each segment, and I am trying to invoke ps5000aGetValues for each of them, but I receive PICO_NO_SAMPLES_AVAILABLE error. This should mean that the run has not been completed which I don't understand, I wait sufficiently long before moving to the next command.
I have a similar problem, I configured channesl A,B & C to capture data and set an simple trigger to A. Afterwards I divide the buffer in 3 segments and try to collect them after an trigger event (see code below). I want to capture data on all channels after one trigger event, but it seems that the device is waiting for a trigger event to collect each segment, so the total collection takes 3 seconds with an input signal of 1 Hz at channel A. (Tried with only 2 Channels -> 2 seconds).
How do I capture and collect data on 3 Channels simultaneously? I played around with overlapping segments but it resulted in the same behaviour.
You don't need to segment the memory to collect data from multiple channels, all channels are contained within a single segment.
You just need to use ps5000aSetDataBuffer or ps5000aSetDataBuffers three times, once for each channel, and then ps5000aGetValues which will read the channel data from the scope into these buffers.