C# example - false system triggers with 4424 device

Post your .Net discussions here
Post Reply
Nmalan
Newbie
Posts: 0
Joined: Mon Oct 11, 2010 9:49 am

C# example - false system triggers with 4424 device

Post by Nmalan »

Hi,
These comments have bearing on the 4424 device

I am trying to write an app using VB.NET 2010 and ran into this problem. The pico unit seems to fire the trigger (call back function gets called) the very first time it is armed after opening the driver. I thought it was my code but this also happens with the C# example supplied with the product.

Also,
It would be very helpfull if the programmers guide was accurate and complete. I am very sure there are 100's of customers out there using VB.NET. It would be very helpfull to publish a set of DLL function declarations for each of the .NET languages. This would save beginners a heck of a lot of time and frustration in trying to sort out the correct data type to use. Furthermore, the guide uses a lot of constants but do not declare what their values are. Are one to assume they are listed in numerical order starting at 0? The Trigger direction constants given in the programmers guide are different to the ones used in the C# example! Which is correct?

Your Excell example passes a structure (triggerConditions) to the ps4000SetTriggerChannelConditions function while the guide stipulates that an array (of structures) should be passed, which in fact is what is done in the C# example. Which is correct, or are both correct, or does passing an array only works when using C#? Does VB.NET pack the contents of its structures in memory in the same order as C# does?

Help would be greatly appreciated.

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

Re: C# example - false system triggers with 4424 device

Post by Chris »

Hello

Thank you for you feedback.

You are correct, the enumerated types all count up from 0.

The Excel example uses the ps4000wrap.dll SetTriggerProperties function to convert the triggerChannelPropertiesArray into an array of structures. (In the example, an array of 1 structure)

The settings in the Array get ORed together to provide the trigger conditions.

(Have a look at the ps4000wrap.c code)


I will look into the triggering issue you have raised.

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

Re: C# example - false system triggers with 4424 device

Post by Chris »

An updated SDK is now available from....

http://www.picotech.com/software.html

The dll's have fixed some triggering issues.

Post Reply