Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-Scope Trigger Mode, VS

I am using VS2019 and Measurement studio 2019 to try to control PXIe5172 Oscilloscope.  As in any physical scope, there is two option for trigger: Normal and Auto (normally there is a Single option too)- these options also shows on the NI instrument SFP GUI as shown below.  I am trying to find how to set these trigger modes in my code but am unable to find anything. after setting the TriggerType and TriggerSource.  Why does NI make this so hard to find the information or I am missing something? 

Son_La_0-1677191278570.png

Thank you very much in advance 

 

0 Kudos
Message 1 of 2
(891 Views)

I eventually figure this out.  It is not that clear so I have the solution here incase someone has the same question as I did.

I can't believe they hide it behind the "ScopeTriggerModifier" while everything else related to trigger is clearly identifiable by name such as slope, source and so on.

 

/// <summary>
/// Set trigger mode to either auto or normal
/// </summary>
/// <param name="triggerMode"></param>
/// <returns></returns>
public int SetTriggerMode(TriggerMode triggerMode)
{
switch (triggerMode)
{
case TriggerMode.Auto:
Pxie5172Scope.Trigger.Modifier = ScopeTriggerModifier.Auto;
break;
case TriggerMode.Normal:
Pxie5172Scope.Trigger.Modifier = ScopeTriggerModifier.None;
break;
}

return GetErrorCode();
}

0 Kudos
Message 2 of 2
(842 Views)