NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Set Sequence Call Trace Setting for a SequenceCall Step

Solved!
Go to solution

Hi there.  I need to edit a sequence file automatically with a LabVIEW program.  We have a program the is successful in editing and saving a sequence file automatically which goes in and does a few things.  However I also need to be able to go in and change a setting in Run Options for the top level SequenceCall steps in Main of MainSequence.  I want to be able to change the Sequence Call Trace Setting for the steps from Disable Tracing in Sequence to Enable Tracing in Sequence.  However I do not seem to be able to find this in the API call chin anywhere.  At this point I am certain that it IS in there somewhere, but probably hidden under an option mask for something.  Anyone know where I might find it?

 

This is NOT something I want to do at execution time.  This is something I want to do by launching TestStand in edit mode from LabVIEW to automatically edit and save a new version of the sequence file.

 

Thanks!

 

Greg

Gregory Osenbach
0 Kudos
Message 1 of 9
(5,602 Views)

Use

RunState.Execution.TracingDisabled =True

In the Pre-Expression of the SequenceCall Step

 

and use

RunState.Execution.TracingDisabled =False

In the Post-Expression.

 

(If you are actually inserting steps into a sequence then you probably can setup the Adapter for the SequenceCall Trace Setting as you can manually)

 

 

Regards
Ray Farmer
Message 2 of 9
(5,599 Views)
Solution
Accepted by gosenbach

 

Yes you can!!

 

TraceSetting Property

Syntax

SequenceCallModule.TraceSetting

Data Type

SeqCallTraceSettings

Use the following constants with this data type:

  • SeqCallTrace_Disable–(Value: 3) Specifies to disable tracing for calls to the subsequence and restores the original tracing state when the subsequence returns. However, if you enable the Allow Tracing into Sequence Calls Marked with Tracing Off option in the Station Options dialog box, TestStand ignores this setting and does not alter the tracing state.
  • SeqCallTrace_Enable–(Value: 2) Specifies to enable tracing for calls to the subsequence and restores the original tracing state when the subsequence returns.
  • SeqCallTrace_UseCurrent–(Value: 1) Specifies to maintain the current tracing state when calling the subsequence. This is the default value for the SequenceCallModule.TraceSettingproperty. Usually, only process model files use other values for this option.
  • SeqCallTrace_UseExecutionSetting–(Value: 4) Specifies to enable the tracing state unless the execution was created with tracing disabled. Typically, a process model uses this setting to control the tracing state when the model calls the main sequence in the client sequence file.

Purpose

Controls enabling and disabling tracing for calls to the subsequence.

Remarks

This property corresponds to the Sequence Call Trace Setting control on the Run Options tab of the Step Properties dialog box.

Regards
Ray Farmer
Message 3 of 9
(5,596 Views)

Edit: OOPS Didn't see that Ray had posted.

 

You can look in the TS help for each of these but in TS it would be:

 

Step.Module.AsSequenceCallModule.TraceSetting = 3 to disable.

 

I'm assuming in LabVIEW you would already have a handle to the Step however you are doing it in your current program.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 4 of 9
(5,595 Views)

Fantastic guys!  Thanks agian!

Gregory Osenbach
0 Kudos
Message 5 of 9
(5,589 Views)

Ok, perhaps I jumped the gun on my previous reply. 

 

I just am not seeing SequenceCallModule as an available option under Step.Module.  It is not listed under either the available properities or methods for Module.

 

I am woring on a reference to the stop from

 

IApplicationMgr.IEngine.GetSequenceFileEx.GetSequence.Sequence.GetStep

 

The available options I have for Module are:

Properities:

Adaptor

CanCreateCode

CanEditCode

IsPrototypeIncompatable

Step

UnmappedArgumentValues

 

Methods:

AsProperityObject

CreateCode

EditCode

GetDescription

Load

LoadPrototype

Specify

Unload

 

Thanks.

 

 

Gregory Osenbach
0 Kudos
Message 6 of 9
(5,586 Views)

 

Not sure if this will work.  I'm kinda bummed the To More Specific Class function wouldn't work.

 

The Automation Refnum going into the top of the TypeCast is using the NI TestStand Adapter API 4.1.1 Version 1.0 as the type library and SequenceCallModule as the Object.

 

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 7 of 9
(5,581 Views)

I'll try that right now and let you know.  Thanks.

 

Greg

Gregory Osenbach
0 Kudos
Message 8 of 9
(5,578 Views)

Hi,

 

The TypeCast doesn't run (-1073741819 error...). I use Variant to Data.vi instead

 

Regards

Xa

 

 

 

0 Kudos
Message 9 of 9
(5,288 Views)