Quantcast
Channel: NI TestStand topics
Viewing all 6532 articles
Browse latest View live

Ignore Flow Control Steps Unless they have Additional Results?

$
0
0

Occassionally, I use ForEach loops to iterate through some given array, and will sometimes log a number of parameters from each element that gets indexed using the "Additional Results" section of the ForEach step.  However, in general, I don't want to log Flow Control steps, only if they have these additional results.

 

I know how to skip reporting Flow Control steps and I know how to get the number of Additional Results a step has using...

Step.AdditionalResults.<CustomResults | ParameterResults>.Count

...but I can't use this in the results filtering because I don't have access to the "Step" object as the "Results" object is the top one provided in the results filtering.

 

 

I tried getting the parent of "Results" which I thought might be its respective Step as well as using the property "Results.TS.StepId" to get the step using the GetStepByUniqueId method through something along the lines of...

<Client sequence>.GetStepByUniqueId(Results.TS.StepId).AdditionalResults.<CustomResults | ParameterResults>.Count

... however I was unable to get a reference to the top-level client sequence, I think partly due to the results processing occurring in the process model so perhaps my client sequence is no longer loaded by the time execution has progressed to this point?

 

Does anyone have any ideas on how I might filter steps based on whether or not they have additional results assigned?  Thanks.


Requirements Gateway Project summary not showing any requirements

$
0
0

Hi,

 

Newbie question.

 

I have created a basic Regular expression in the Types area. The test of this expression shows requirements are found but when I Update and check the Management view the Project summary does not update.

Probably something simple but it has stopped me getting any further.  Any tips?

 

Regular expression test.PNG

 

Management View.PNG

sequence file updatation

$
0
0

Hi all

 

We have source code developed in CVI, and the code is used to test various functionality of the product with the help of sequence file,

 

I have one issue any help greatly appreciated,

 

I would like to abort the test sometimes in between before completion of all the tests, whenever I abort the test , it has to perform one specific test.

 

Eg: there are 1-30 tests whenever I abort the test (Say test 5), it should perform 25th test and complete as 25th test has few type settings of the product , I am aware there are something to change in sequence file.

Teststand and Python:How to creat a sequencecontext obj

$
0
0
1,My code:<>import win32com.client<>import os<>cwd = os.getcwd()<>tsEngine = win32com.client.Dispatch("TestStand.Engine.1") <>print "TestStand %s.%s ready" % (tsEngine.MajorVersion, tsEngine.MinorVersion) <>sequencePath = os.path.join(cwd, 'MySequence.seq')<>seqFile = tsEngine.GetSequenceFileEx(sequencePath)<>tsPO = tsEngine.NewPropertyObject<>tsSequenceContext = tsEngine.NewEditContext(tsPO) 2,the code run then print error below: <>TypeError: The Python instance can not be converted to a COM object 3,I look up help file: <>NewEditContext Method<>Syntax<>--Engine.NewEditContext ( obj, [editArgsParam], [locationString])<>Return Value<>--SequenceContext<>obj As PropertyObject<>[In] Specifies the object to initialize the sequence context. You can pass a sequence file, sequence, step, variable, or array of object references to steps. This method sets the sequence context properties that correspond to the object you pass. 4,I pass the PropertyObject type(tsPO) as an obj,but why it prompt"TypeError: The Python instance can not be converted to a COM object ". What is the correct "obj" type?Pls help.

process model : Include PreUUT and PostUUT Step results in report

$
0
0

hallo Everyone,

Bit of background :

My test team has 4 developer writing code for 4 different components. For endurance tests, we have common requirements like variable input voltage and temperature. Rather than using common setup template we prefer using PreUUT process model element of TestStand. This helps each of us follow the strict coding style.

Problem:

There are lot of examples to log PreUUT and PostUUT results in the report. However, all these examples require client sequence file modification. How do I implement this feature in the Process model itself ? So that the developers do not have to Process ModelCallback or use templates in their code and still the modified voltage and temperature in ProcessModel would be logged to the report.

Ah yeah, I am using TestStand 2013 (4.1) 

Regards

Mitun

LabVIEW Variant Attributes get lost in TestStand?

$
0
0

Hello,

 

Example code attached.

 

I'm using a LabVIEW variant as a lookup table by using the attributes (see here: https://decibel.ni.com/content/docs/DOC-25371 (and others)).  It works well.  When I attempt to pass this variant from one TestStand step to another, I lose the attributes of the variant.  I've made a small example to demonstrate this.  Am I doing something wrong?  Why does the variant retain the value, but not the attributes?  Should I store this as another type in TestStand?  In the documentation for LabVIEW types in TestStand, it is claimed that a Variant in LabVIEW maps to "Anything" in TestStand.  When I tried to use a Boolean, however, I got an error and was instructed to use a Container.  Does that container need to have some specific suptype to retain the attributes?  Or does it have nothing to do with that?

 

Thanks in advance

 

Batch model, callbacks, and statements

$
0
0

I have a quick question about using the batch model.

 

I'm converting a sequence from sequential to batch. Do steps in callbacks like PreUUT, SequenceFileLoad, and SequenceFileUnload get executed once for each socket? How about statement steps?

 

If so, what's the best way to make a block run for just one socket? Select the steps and make a change under Properties.Synchronization -> One thread only.

 

Stephen

Development settings not transferring to deployment.

$
0
0

Hi all,

 

I am using TestStand with the parallel process model to test 16 UUTs. After much head banging I found out that I needed to include TestExec.ini to force the deployment to use the parallel model.  What other files to I need to include for settings to transfer to the deployment? These settings specifically being:

 

  • Disabled report generation
  • Number of Test Sockets
  • Other settings that I cant think of at the moment...

I should note that this is my first TestStand deployment. 

 

Thanks!


Access violation (0xC0000005) at EIP=0x00496F5C

$
0
0

I am getting the following error while I try to run a script from Teststand.

 

 

Capture.PNG

 

I am attaching the error log too . I am not sure what the problem is . 

Read number of steps & step names in LabVIEW

$
0
0
Hi, I want to read number of steps and respective names in LabVIEW. I have attached code which I have done so far. Please help.

Transferring Requirements Gateway Projects

$
0
0

We are updating the hardware Requirement Gateway is running on.  I am transferring the Requirement Gateway Files to the new PC.  I have found transferring the NI Requirement Gateway Project files and the .TYPES files seems to allow me to see most of the data on the new PC, but are there any other important files I should move?

Agilent 34980 + TestStand

$
0
0

I am currently running my teststand sequences on a control board which is basically a bunch of relays and other signals that are read over a serial port. Since the board is getting old we might replace it with a 34980 we have laying around. Can I control the 34980 through TS? The documentation I've found seems sparse on this.

 

 

Thanks in advance

Deployment: Internal error -21

$
0
0

When I try to build an installer, I get:

**************
*** Error: An internal tool or library returned an error. (Error code -21)
**************
Error Details:
Error in MDF API function: _MDFBuildDevPart_Close
Error in MDF::BuildDeveloperPart::Close.
nmdkClose returned error code 26251
*** End Error Report
**************

 

And there is an .msi file in the Teststand Deployment/Installer/Temp/dp diectory but no setup.exe and  other files.

Any hint whats going wrong and how to fix it ?

Sequence File will not unlock for editing

$
0
0

A password was set on a sequence file.  This password was copied from an instruction on how to create a deployment for a set of test.  The sequence  file will not unlock for editing.  How can I unlock the sequence file?  I am using Test Stand 2014.  This file was last edited in Test Stand 2014.

deploying test stand 2012

$
0
0

Hi, I am currently using TestStand version 2012. I would like to deploy my sequence files which contain call to LV2012, MATLAB script node, and C++ DLL. Please provide step-by-step procedure. Thanks.


Import table in Excel into TestStand array variables?

$
0
0

I'm trying to use the property loader to read in an Excel file and create a number of local variables.  The tables that I maintain in Excel are of the following format:

RangeSetpointHigh LimitLow Limit
5-4.5-4.49395-4.50605
500.0011-0.0011
54.54.506054.49395
250-225-224.6975-225.3025
25000.055-0.055
250225225.3025224.6975

 

 From this table I want to create 4 local variable arrays in TestStand, all 6 elements deep: Range, Setpoint, HighLimit, and LowLimit.  Is there an elegant way to do this without having to use all the formatting syntax that would be in a generic export of these locals from TestStand to an Excel file (i.e. using the method of export Excel file, fill in your own values, then import the Excel file)?

DaqMX parallel executions error -50103

$
0
0

Hi all,

 

I am working on a system with 16 test sockets. I am using a PXI system with PXIe-4357 RTD cards, each station has 2 RTD's. If I run 1 or 2 stations it works well, if I try to run 3-4 stations simultaneously, I get error -50103. I have set my VI's to be non-reentrant and I have used the Task Done VI and I unreserve and clear the task. This VI is called by another VI which is in a TS loop. The loop runs pretty slowly, and I have implemented a 0.5s delay.

 

Does anyone know how to solve this issue? Please see my VI attached.

 

Thanks!!

How to set the numeric format through the API

$
0
0

Hi,

 

I have an utility that imports limits from external resources and in that utility (C#) I would need to modify the numeric representation  so that what is defined as hexa in the external resource to be displayed as hexa after importing to TS as well.

Can U help me out if this is possible with the API and if so, what is the right methods for it?

 

Thanks in advance.

Problem with function "DBConnect" in TestStand/LabWindows

$
0
0

Hello, good day.

I'm having some problems with the function DBConnect that I'm using in a personal function inside a DLL.

 

I have made a function called GetSensor which I know it works because I have used it and tested it in the LabWindows enviroment.

His function is return the value of some element in my database according of his input parameter, just that.

Program.png

My problem comes out when I tried to use that same function in TestStand, it seems that the DBConnect cannot work as in the same way of when it is used from LabWindows because always show a warning message, which is display only when the values of iHdbc are iHdbc==-11 or  iHdbc==-10.

 

Test.png

 

 

Error.png

 

The softwares that I'm using are:

Software.png

 

I know TestStand is opening the function from my DLL becasuse it always get in, but did not pass the part when try to connect to the database.

 

I think this could be a compatibility issue between LabWindows and TestStand, but I do not find where can I modify some options to fix this problem.

 

Thanks in advance. Any help you could give will be welcomed.

Programatically closing an execution fails unless I select Auto close

$
0
0

Hello there!

Im trying to execute a sequence using TestStand API and then close all references, but the End Execution event does not seem to be thrown.

 

I had the same issue as the thread called " Programatically closing an execution" from 2009.

My code is the following

 

_axAppMgr.EndExecution += new NationalInstruments.TestStand.Interop.UI.Ax._ApplicationMgrEvents_EndExecutionEventHandler(_axAppMgr_EndExecution);
_axAppMgr.ExecutionClosed += new NationalInstruments.TestStand.Interop.UI.Ax._ApplicationMgrEvents_ExecutionClosedEventHandler(_axAppMgr_ExecutionClosed);

 

void _axAppMgr_QueryCloseExecution(object sender, _ApplicationMgrEvents_QueryCloseExecutionEvent e)
{
e.opt = QueryCloseExecutionOptions.QueryCloseExecution_AutoCloseWhenDone;
}

 

void _axAppMgr_EndExecution(object sender, _ApplicationMgrEvents_EndExecutionEvent e)
{
ExecutionRunStates runState;
ExecutionTerminationStates termState;

e.exec.GetStates(out runState, out termState);

if (termState != ExecutionTerminationStates.ExecTermState_Normal)
Trace.WriteLine(DateTime.Now + " -----EXECUTION " + e.exec.DisplayName + "Aborted ---------");
else
Trace.WriteLine(DateTime.Now + " -----EXECUTION " + e.exec.DisplayName + " Terminated ---------");

ExecutionEnd = true;
}

 

public bool Run(string UUTName, string sequencePath )
{
bool output = false;
int TimeOut = -1;
string name = "";


ExecutionRunStates runState;
ExecutionTerminationStates TerminationState;


try
{
name = DateTime.Now.ToString("yyyy-MM-dd") + " Test " + UUTName;

if (!_axAppMgr.IsStarted)
_axAppMgr.Start();


seqFile = _axAppMgr.GetEngine().GetSequenceFileEx(sequencePath);

 

Main = seqFile.GetSequenceByName("MainSequence");
Main.OptimizeNonReentrantCalls = true;
Main.Type = SequenceTypes.SeqType_ExeEntryPoint;

 

execution = _axAppMgr.GetEngine().NewExecution(seqFile, "MainSequence",null, false, ExecutionTypeMask.ExecTypeMask_CloseWindowWhenDone);

 


execution.TracingDisabled = true;
execution.RTEOptionForThisExecution = RTEOptions.RTEOption_Ignore;
execution.ClearTemporaryBreakpoints();
execution.DisableResults = true;

bool isExecuting = seqFile.IsExecuting;

bool wait = execution.WaitForEndEx(TimeOut, true, null, null);

execution.GetStates(out runState,out TerminationState );
execution.Terminate();
_axAppMgr.SetAutoCloseExecution(execution, true);
_axAppMgr.CloseExecution(execution);

execution.GetStates(out runState, out TerminationState);

 

while (!ExecutionEnd)
System.Threading.Thread.Sleep(1000);
Terminate();

execution.GetStates(out runState, out TerminationState);

}

catch (COMException ex)
{
Trace.WriteLine(ex.StackTrace + " " + ex.Message);
}
finally
{
TSHelper.DoSynchronousGCForCOMObjectDestruction();


Quit();

}
return output;

 

 

The problem is, when I deactivate the 

 

e.opt = QueryCloseExecutionOptions.QueryCloseExecution_AutoCloseWhenDone;

 

command the execution fails to close.

 

If I set the option to 

  e.opt = QueryCloseExecutionOptions.QueryCloseExecution_ShowDialog;

 

and manually select auto close , then the Execution Close event is thrown.

 

Could anyone help me finding out what's wrong with my code?

Thank you in advance for your time

Viewing all 6532 articles
Browse latest View live