No LED flashing on 4227

Post your .Net discussions here
Post Reply
AlXCo

No LED flashing on 4227

Post by AlXCo »

Hi,
I am using the PS 4227 and explored the SDK (PS4000sdk_r10_1_0_8) in Visual Studio 2010.

The C application starts just fine and the signal generator works out of the box.
But LED flashing is not possible. Can anybody tell me why?
--
I also took a look at the C# example from the SDK. I recognized that there are a lot of functions missing in the DllImports (why?) , so I added the LED function just like this:

[DllImport(_DRIVER_FILENAME, EntryPoint = "ps4000FlashLed")]
public static extern short FlashLed(
short handle,
short start);

In the main program I first initialize the device (!) and then i call the LED function in the C# project like this:

PicoScope4000.FlashLed(picoHandle, (short)trackBar1.Value);

but nothing happens. :shock:
I already checked the programmer's guide to verify my arguments are valid.

What could be the reason for this in C and in C#?
Is there an error in the ps4000.dll?

Chris
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: No LED flashing on 4227

Post by Chris »

Thank you for reporting this error.

The FlashLed function not working on the ps4227 has been logged as a bug.

Although the C# application only has a subset of available functions, is does serve as an example of how to get started writing your own C# code.

AlXCo

Re: No LED flashing on 4227

Post by AlXCo »

So in general there is no problem to import missing dll-Functions in C#, if I use the right EntryPoint in the import directive?

Chris
Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: No LED flashing on 4227

Post by Chris »

That's correct. You can add whichever of the other function entry points you need.

Post Reply