Test and Measurement Forum

External Trigger Problem

Post your LabVIEW discussions here

External Trigger Problem

Postby jmadsenee » Mon Jun 06, 2016 6:52 pm

Hi,

I have written a LabView VI to work with my 4000 series PicoScope. It works fine as long as I set my Trigger Source to Channel A or Channel B. I found in the "pico4262 trigger" post that the channel number for the external trigger is 4, so I added that to the Trigger Source control. Unfortunately, I keep getting an "Error 5016 occurred at ps4000SetSimpleTrigger," which seems to indicate an invalid channel, when I try to use the external trigger input.

I went into the PS4000 Settings VI and tried to enable the External trigger channel, similarly to the way the other channels were enabled, using 4 for the channel number, but got the same error number at ps4000SetChannel.

What am I doing wrong?

Thanks!

John
jmadsenee
Newbie
 
Posts: 0
Joined: Fri Jun 03, 2016 2:59 pm

Re: External Trigger Problem

Postby Hitesh » Thu Jun 09, 2016 8:00 am

Hi John,

It is possible to set one of two external input voltage ranges for the PicoScope 4262.

Please try calling the ps4000SetExtTriggerRange() function before setting the trigger (refer to the Programmer's Guide for the definition).

You may also wish to refer to this post for information on how to add a Call Function Library Node.

Regards,
Hitesh

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

Re: External Trigger Problem

Postby jmadsenee » Thu Jun 09, 2016 8:11 pm

Hi Hitesh,

I set up ps4000SetExtTriggerRange per the manual.
Function.PNG


I put it before SetSimpleTrigger.
VI.PNG


I get Error.
Error.PNG


I don't understand why the error says FE Raw Data Record...

I did Highlight Execution and confirmed that the error occurred coming out of my new node.

Any thoughts?

Thanks!
John
jmadsenee
Newbie
 
Posts: 0
Joined: Fri Jun 03, 2016 2:59 pm

Re: External Trigger Problem

Postby Hitesh » Fri Jun 10, 2016 8:48 am

Hi John,

Please change the Calling convention to 'stdcall (WINAPI)' as per the screenshot in the post that I linked to.

Setting it to 'C' tends to cause an error as I've found before.

Regards,
Hitesh

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

Re: External Trigger Problem

Postby jmadsenee » Fri Jun 10, 2016 5:10 pm

Hi Hitesh,

Sorry, that was a stupid mistake! Anyway, it now gets past that VI, but I have the original problem. The block diagram is still as shown above, but I am getting Error 5016 when I select EXT (4):
Error5016.PNG


John
jmadsenee
Newbie
 
Posts: 0
Joined: Fri Jun 03, 2016 2:59 pm

Re: External Trigger Problem

Postby jmadsenee » Fri Jun 10, 2016 5:31 pm

Hi Hitesh,

My apologies once again; I found the problem. While I added EXT (= 4) to the "Trigger Source" enum in my main VI, I did not add it to the "Trigger Source" enum in the Settings VI. Since the "Allow undefined values at run time" checkbox was not checked, the Settings VI changed EXT to Channel D, which was not supported, and therefore gave the error. :oops:

Thanks for your time!

Best Regards,

John
jmadsenee
Newbie
 
Posts: 0
Joined: Fri Jun 03, 2016 2:59 pm

Re: External Trigger Problem

Postby Hitesh » Mon Jun 13, 2016 10:21 am

Hi John,

Thank you for the update.

It's probably best to update the Settings vi and then add a new control having deleted the old one from the main vi as this will ensure that the settings are mapped across.

I will ask for our examples to be updated here.

Regards,
Hitesh

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


Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 1 guest