Test and Measurement Forum

No LED flashing on 4227

Post your .Net discussions here

No LED flashing on 4227

Postby AlXCo » Wed Mar 23, 2011 4:38 pm

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?
AlXCo
 

Re: No LED flashing on 4227

Postby Chris » Fri Mar 25, 2011 2:14 pm

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.
Chris
Site Admin
Site Admin
 
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: No LED flashing on 4227

Postby AlXCo » Mon Mar 28, 2011 1:06 pm

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

Re: No LED flashing on 4227

Postby Chris » Mon Mar 28, 2011 4:22 pm

That's correct. You can add whichever of the other function entry points you need.
Chris
Site Admin
Site Admin
 
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots


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

Who is online

Users browsing this forum: No registered users and 0 guests