ps3000_set_trigger() function, urgent!

Post general discussions on using our drivers to write your own software here
Post Reply
PG74
User
User
Posts: 4
Joined: Tue Oct 05, 2004 6:36 pm

ps3000_set_trigger() function, urgent!

Post by PG74 »

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

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

Post by markspencer »

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

Staffan Ek

ps3000_set_trigger vb6

Post by Staffan Ek »

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

Post Reply