Writing application for PicoScope4424

Post any questions you may have about our current range of oscilloscopes
Post Reply
bwalpole
Newbie
Posts: 0
Joined: Wed Aug 11, 2010 2:39 pm

Writing application for PicoScope4424

Post by bwalpole »

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

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Writing application for PicoScope4424

Post by Robin »

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

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

Re: Writing application for PicoScope4424

Post by bwalpole »

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

Post Reply