Test and Measurement Forum

C# example - false system triggers with 4424 device

Post your .Net discussions here

C# example - false system triggers with 4424 device

Postby Nmalan » Mon Oct 11, 2010 10:31 am

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.
Nmalan
Newbie
 
Posts: 0
Joined: Mon Oct 11, 2010 9:49 am

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

Postby Chris » Wed Oct 13, 2010 3:10 pm

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

Postby Chris » Thu Nov 04, 2010 10:59 am

An updated SDK is now available from....

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

The dll's have fixed some triggering issues.
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 1 guest