Test and Measurement Forum

Help with Get times and value of pico2204

Post your .Net discussions here

Help with Get times and value of pico2204

Postby Gerundio » Tue Mar 22, 2016 1:05 pm

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.
Gerundio
Newbie
 
Posts: 0
Joined: Tue Mar 22, 2016 12:58 pm

Re: Help with Get times and value of pico2204

Postby Hitesh » Wed Mar 23, 2016 3:13 pm

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.
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2058
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Help with Get times and value of pico2204

Postby Gerundio » Wed Mar 30, 2016 12:43 pm

But why the times Array is twice the buffer of measures??
Gerundio
Newbie
 
Posts: 0
Joined: Tue Mar 22, 2016 12:58 pm

Re: Help with Get times and value of pico2204

Postby Hitesh » Wed Mar 30, 2016 12:45 pm

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,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2058
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Help with Get times and value of pico2204

Postby Gerundio » Thu Mar 31, 2016 6:33 am

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
Gerundio
Newbie
 
Posts: 0
Joined: Tue Mar 22, 2016 12:58 pm

Re: Help with Get times and value of pico2204

Postby Hitesh » Thu Mar 31, 2016 10:22 am

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,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2058
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to .Net Languages (C#, VB.Net, .)

Who is online

Users browsing this forum: No registered users and 0 guests