pl1000SetTrigger - Any examples?

Post your VB and VBA discussions here
Post Reply
Beaker
Newbie
Posts: 0
Joined: Tue Jul 19, 2016 7:14 am

pl1000SetTrigger - Any examples?

Post by Beaker »

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

Hitesh

Re: pl1000SetTrigger - Any examples?

Post by Hitesh »

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,

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

Re: pl1000SetTrigger - Any examples?

Post by Beaker »

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

Hitesh

Re: pl1000SetTrigger - Any examples?

Post by Hitesh »

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 842 times
Regards,

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

Re: pl1000SetTrigger - Any examples?

Post by Beaker »

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

Hitesh

Re: pl1000SetTrigger - Any examples?

Post by Hitesh »

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,

Post Reply