AnsweredAssumed Answered

Auxiliary Trigger Outputs on N5224A (DCOM) - SOLVED

Question asked by mr_matt on Apr 28, 2014
Latest reply on May 1, 2014 by Dr_joel
First off:  I am talking to the PNA thru DCOM (functions have been wrappered by NI LabWindows CVI).   

I have a N5224A PNA.  I've successfully written software to control it and pull data off of it.  Now I'm trying to add additional functionality using the Auxiliary Trigger Outputs. 

I need to assign an output pulse from either Aux Trig 1 or Aux Trig 2 to specific channels depending on user inputs within my software.   

I've used the settings within the PNA application (Stimulus->Trigger->Trigger...->Aux Trig 1 and 2) to test the outputs.  Going thru the menus works fine.  I can arbitrarily assign the outputs to individual channels.  The purpose is to latch or unlatch a switch depending on user inputs, so I made the pulse width wide enough to account for switch bounce, and it seems to work well. 

But I've had problems when I try to code this up. 

Within the PNA help file, I see a section labeled "Auxiliary Trigger Object."  It looks to do what I would like.  However the best equivalent I can find within the wrappered functions is ITriggerSetup2SetExternalTriggerConnectionBehavior(caObj, ERROR Info, Trigger Connection, Trigger Connection Behavior). 

When I try to call this, I get an error on the PNA display saying, "The trigger connection argument was not recognized as valid by the firmware."  I've tried each of the choices in the "trigger connection" enumeration and I always get the same messages. 

The only place I can find to generate a "Trigger Object" for the previous function is IApplication9GetTriggerSetup(caObj, ERROR Info, *Trigger Object).  So even if I got the previous step working, I'm not sure if I could assign the trigger outputs per channel (opposed to per Application).   

Also, I don't see any way to control the pulse duration (like the setup screen has) - and this is important to my application to allow for switch transition time. 

Has anyone else done something similar to this? 

Thanks in advance for all responses!

Edited by: mr_matt on Apr 29, 2014 11:01 AM