However, Matlab is crashing everytime i run this (when executing the ps6000GetValuesTriggerTimeOffsetBulk64 function). It executes when the size of times is only 2 (2 waveforms), andthe times array contains only two zeros (I expect a non-zero offset in fento-seconds).

I am attaching the crash log as a text file.
Please let me know how to fix this, as it is very important for me to get it running.

times, an array of integers.
On exit, this will hold the time offset for each requested segment index. times[0] will hold the time offset for fromSegmentIndex, and the last times index will hold the time offset for toSegmentIndex. The array must be long enough to hold the number of times requested.

Depending upon your trigger set up and the signal you are measuring the values returned will often be 0, meaning that the trigger event actually occured at the sample point.

Thank you both for the reply. I really need to make this function work, since my application relies mostly on the 'relative' timing of signals (I am post processing, doing averaging and delay & sum).

1) Cappandy: Regarding the size of timesUnits, the documentation says it is a single uint32 value, instead of an array. I will try defining it as an array as well (as large as the acquired number of acquired segments).
2) Martyn: I am actually aware of this, but the issue is that with proper function calling, Matlab is still crashing every time I run the function.

Thank you for your advice, it helps. The documentation for PS6000 shows timesUnits as a single value, however as you said using it as an array solves the problem (documentation should be modified).

Regarding the 0 values, I was getting all 0 values when triggering on the AUX channel. However, when triggering on chA (or B, C, D), the data is non zero and makes sense (shows the drift in the clocks).

Unfortunately, this means that we will lose a data channel out of the 4 to be able to compensate for the trigger offset which is not ideal.

It would be great if anyone from the PicoTechnology engineering team can clarify this for us? At least to me, this is a very important feature to have in any oscilloscope and I was hoping not having to sacrifice a data channel to compensate clock drifts.

This function will only give values back if you use one of the standard channels as it requires that the data is captured to fit to where exactly the trigger threshold occurred in relation to the trigger point and as the EXT channel uses a comparator circuit rather than an ADC it doesn't capture any data itself so this API function doesn't return any meaningful values.

I know I am working through this on a support ticket gerardtouma but i thought I would also put this information here as well.