Help with Get times and value of pico2204

Post your .Net discussions here
Post Reply
Gerundio
Newbie
Posts: 0
Joined: Tue Mar 22, 2016 12:58 pm

Help with Get times and value of pico2204

Post by Gerundio »

Hi all.
I have a problem to understand some values of the instruction on Subject.

When i call it i get back a array called from wrapper Times:

[DllImport(_DRIVER_FILENAME, EntryPoint = "ps2000_get_times_and_values")]
public static extern short GetTimesAndValues(
short handle,
short[] Times, <------- this one
short[] buffer_a,
short[] buffer_b,
short[] buffer_c,
short[] buffer_d,
out short overflow,
short TimeUnits,
int no_of_values);

I dont understand what are this values.........
I am triggering a signal on Channel A with runblock function,using before the Get_timebase function and everything does what i want.

The array Times how exactly i can traduce it in nanoseconds value??

Thanks ALL.

Hitesh

Re: Help with Get times and value of pico2204

Post by Hitesh »

Hi Gerundio,

Referring to section 6.7 (ps2000_get_times_and_values) in the Programmer's Guide, you will need to specify the correct value for the TimeUnits parameter (2, which corresponds to PS2000_NS).

Unless a trigger delay has been setup, the first value in the Times array should be 0, the next value should be at one sample interval from 0 and so on.

Hope this helps.

Gerundio
Newbie
Posts: 0
Joined: Tue Mar 22, 2016 12:58 pm

Re: Help with Get times and value of pico2204

Post by Gerundio »

But why the times Array is twice the buffer of measures??

Hitesh

Re: Help with Get times and value of pico2204

Post by Hitesh »

Hi Gerundio,

Could you please clarify what you are seeing in the Times buffer?

When you say 'twice the buffer of measures' are you seeing twice as many values as you are collecting into the channel buffers?

Regards,

Gerundio
Newbie
Posts: 0
Joined: Tue Mar 22, 2016 12:58 pm

Re: Help with Get times and value of pico2204

Post by Gerundio »

I mean that if i collect 100 samples, the times array is 200 .
Here a example with Only channel A active....

ARRAY OF MEASURED, 10 sample elements in adc values(triggered):
1642 475 -1859 475 767 -108 -691 183 475 -108

TIMES ARRAY
-12849 -2 1614 0 16078 1 30542 2 -20530 3 -6066 4 8398 6 22862 7 -28210 8 -13746 9

Hitesh

Re: Help with Get times and value of pico2204

Post by Hitesh »

Hi Gerundio,

Could you please post your code so I can see how your arrays are being set up and passed to the function call?

Thanks,

Post Reply