Test and Measurement Forum

Writing application for PicoScope4424

Post any questions you may have about our current range of oscilloscopes

Writing application for PicoScope4424

Postby bwalpole » Wed Aug 11, 2010 2:44 pm

Hi,

I'm trying to use your SDK to write an application to work with a PicoScope4424. Everything was going well until i called ps4000GetTimebase which constantly returns error code 0x00000026 (PICO_SEGMENT_OUT_OF_RANGE).

The value I'm passing in for the segment is 0, which is what your example code does so I'm a bit stumped as to why that doesn't work?

Regards,

Ben
bwalpole
Newbie
 
Posts: 0
Joined: Wed Aug 11, 2010 2:39 pm

Re: Writing application for PicoScope4424

Postby Robin » Fri Aug 13, 2010 8:24 am

Hi Ben

I'm not sure why you are getting that error status. The driver checks that the segment index is in the range 0 to nSegments-1, which it obviously is. As you say, it works in the example.

Can you post your function call and any relevant definitions here?

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Writing application for PicoScope4424

Postby bwalpole » Fri Aug 13, 2010 8:32 am

Robin,

I've got round the problem.

I noticed your example program actually uses the static libary rather then the DLL, so I wrote a C++ wrapper to turn the static libary into a DLL that my C# application can use, this seem to be working.

I think the main problem seemed to be with my C# application passing arguments to the DLL since even in the above configuration I have to hard code the segment index into the C++ wrapper or it still doesn't work.

Regards,

Ben
bwalpole
Newbie
 
Posts: 0
Joined: Wed Aug 11, 2010 2:39 pm


Return to USB PC Oscilloscopes

Who is online

Users browsing this forum: No registered users and 0 guests