Writing application for PicoScope4424

Post any questions you may have about our current range of oscilloscopes including the PicoScope 2000, 3000, 4000, 5000, 6000 and 9000 Series.

Writing application for PicoScope4424

Postby bwalpole » Wed Aug 11, 2010 3: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 3:39 pm

Re: Writing application for PicoScope4424

Postby Robin » Fri Aug 13, 2010 9: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
Site Admin
Site Admin
 
Posts: 563
Joined: Fri Sep 19, 2008 11:17 am

Re: Writing application for PicoScope4424

Postby bwalpole » Fri Aug 13, 2010 9: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 3:39 pm


Return to USB PC Oscilloscopes

Who is online

Users browsing this forum: No registered users and 0 guests