Test and Measurement Forum

pl1000SetTrigger - Any examples?

Post your VB and VBA discussions here

pl1000SetTrigger - Any examples?

Postby Beaker » Tue Jul 19, 2016 7:23 am

Hi

I have been trying to get the trigger working on my PL1216 but with no success.

I have the excel vba example from the 64bit SDK. In the example the trigger is not enabled. When I enable it, and run the previously working software, excel hangs and becomes unresponsive. The auto trigger function doesn't seem to kick in after the specified time either...

Is there/does anyone have an example with the trigger set up and working that I can take a look at?

Thanks

B
Beaker
Newbie
 
Posts: 0
Joined: Tue Jul 19, 2016 7:14 am

Re: pl1000SetTrigger - Any examples?

Postby Hitesh » Tue Jul 19, 2016 1:18 pm

Hi B,

What parameter values are you passing to the pl1000SetTrigger() function?

The output status value for the function definition should be defined as a Long data type.

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2058
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: pl1000SetTrigger - Any examples?

Postby Beaker » Tue Jul 19, 2016 2:47 pm

Hi Hitesh

The function definition was defined as an Integer so I have changed this to long. However I still have the same issue.

These are the parameters I am passing to the function:

Call pl1000SetTrigger(handle, 1, 0, 0, 3, 0, 2000, 1, 0)

Regards

B
Beaker
Newbie
 
Posts: 0
Joined: Tue Jul 19, 2016 7:14 am

Re: pl1000SetTrigger - Any examples?

Postby Hitesh » Thu Jul 21, 2016 11:38 am

Hi B,

Please find below an example that you can adapt for your application.

I suspect the issue may occur if the number of channels and the array of channels to be used is not set correctly in the call to pl1000SetInterval().

PL1000_3ch.xls
Updated example for 3 channels
(58 KiB) Downloaded 58 times

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2058
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: pl1000SetTrigger - Any examples?

Postby Beaker » Thu Jul 21, 2016 3:29 pm

Hi Hitesh

I've got it working now. It was an issue with the number of channels as you suggested.

Thanks for your help, Appreciated

B
Beaker
Newbie
 
Posts: 0
Joined: Tue Jul 19, 2016 7:14 am

Re: pl1000SetTrigger - Any examples?

Postby Hitesh » Tue Jul 26, 2016 1:13 pm

Hi B,

No problem :D

You should have seen an error code of 44 (0x2C) which in the PicoStatus.h header file is 'PICO_TRIGGER_ERROR'.

You may have found that the device would then not become ready.

Regards,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2058
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to VB and VBA (Excel, Access)

Who is online

Users browsing this forum: No registered users and 0 guests