Test and Measurement Forum

ps3000_set_trigger() function, urgent!

Post general discussions on using our drivers to write your own software here

ps3000_set_trigger() function, urgent!

Postby PG74 » Mon Nov 22, 2004 1:58 pm

Hello!
have written my own software for picoscope 3206 in VB.NET, everytheing works fin but the ps3000_set_trigger() function.
Its the last assignment before my software degree, and I am gonna present it for the company that
gave me the assignment tomorrow, 23/11. I am therfore greatfull for a fast reply!!

calling like this:
ps3000_set_trigger(device, channelTr, niva, flank, nivaX, autoTrigger).
the arguments(all short) are set to:
device(eg. handle) = 1
channelTr = 0
niva = 0
flank = 1
nivaX = 0
autoatrigger = 0
the function returns 0, and the trigger doesnt work!! why?
please help!!

//Philip
PG74
User
User
 
Posts: 4
Joined: Tue Oct 05, 2004 6:36 pm

Postby markspencer » Fri Nov 26, 2004 9:43 am

Hi,

I beleive that I have answered this by email, but incase you did not recieve the email here is the solution.

In the visual basic example the .bas file declaration for the ps3000_set_trigger is incorrect. The last parameter (auto_trigger_ms) is being passed by reference where infact it should be passed by value. This means that the new declaration should look like this:

Code: Select all
Declare Function ps3000_set_trigger Lib "\ps3000.dll" (ByVal handle As Integer, ByVal source As Integer, ByVal threshold As Integer, ByVal direction As Integer, ByVal delay As Integer, ByVal auto_trigger_ms As Integer) As Integer


Best regards,
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am

ps3000_set_trigger vb6

Postby Staffan Ek » Fri Jul 08, 2005 12:13 pm

markspencer wrote:Hi,

I beleive that I have answered this by email, but incase you did not recieve the email here is the solution.

In the visual basic example the .bas file declaration for the ps3000_set_trigger is incorrect. The last parameter (auto_trigger_ms) is being passed by reference where infact it should be passed by value. This means that the new declaration should look like this:

Code: Select all
Declare Function ps3000_set_trigger Lib "\ps3000.dll" (ByVal handle As Integer, ByVal source As Integer, ByVal threshold As Integer, ByVal direction As Integer, ByVal delay As Integer, ByVal auto_trigger_ms As Integer) As Integer


Best regards,
:x :x



Hi!

Why haven't you correct this problem ????
I have working at least 6 hours to find out what the problem was ..
I bought a 3204 for 5 days ago .. If you have som problem correct them directly !!
/Staffan
Staffan Ek
 


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 4 guests