Quantcast
Channel: All NI TestStand posts
Viewing all 24502 articles
Browse latest View live

Why Teststand is printing new line as \r in Test Report

$
0
0

Hello,

i have a string variable created in teststand and i have assigned the below string to this variable.. 

 

"Data Value PASS

The Test data Passed"

 

When i am trying to print this string variable i am seeing something like below printed in the test report. it is adding \r at the end of the current line.

 

"Data Value PASS \r

The Test data Passed"

 

Any idea how to fix this?


Re: Why Teststand is printing new line as \r in Test Report

$
0
0

Hey Diana,

 

Can you post your steps to recreate this? 

Re: Deployment utility returns error 190000 The following path too long

Re: Why Teststand is printing new line as \r in Test Report

Re: Why Teststand is printing new line as \r in Test Report

Re: Get images of teststand steps

$
0
0

Hi bmdresodyn,

 

Thanks for posting. If I understand what you want to do -- you want to automate capturing screenshots of the TestStand UI as your sequence is running. If that's the case, then I'd recommend creating a LabVIEW VI that automates the steps you are currently performing manually - with the exception of selecting and running each step. I'd create the LabVIEW VI to call the Windows Clipping Tool and Word through automation. The VI would let the user specify the window to take a screenshot of and the open Word document to paste each image to. I would add this new VI to your test sequence, calling it in the SequenceFilePostStep callback. This way the code would execute after every step in your sequence to automatically take the screenshot and add it to the Word document. This solution would enable you to run your sequence normally; however, it would add several seconds after each step. So if you have timing-dependent steps it could be a problem. In any case, I believe that this solution would still be much faster than the manual process you are currently performing.

Re: Step failure in TestStand 2016

$
0
0

So is it a failure or an error that isn't going to cleanup?

Re: Python Step Types for TestStand Now Available!

$
0
0
per my user experience, you can first open one sample sequence located at ..\National Instruments\TestStand 2014 (32-bit)\Examples\Custom Step Types\Python Step Types\Passing Data to Python\Passing Data to Python.seq, select the python version you are using at pop up window. then you could take a look the python step properties in the sample step type. see the attached pictures for reference.

Re: Teststand Operator Interface and C++ MFC interface

$
0
0

Hi Norbert,

 

Thanks for the reply.

I have replaced 'mExecutionViewMgr' with 'mApplicationMgr' (again a pointer to ApplicationMgr). However I still don't get the date and time information.

 

About ShowAppropriateStatusBarPanes:

Below code snippet was available in the C++(MFC) example code for Operator Interface. It is used to show information like User, Model etc on the selected tab control.

 

void CTestExecDlg:Smiley FrustratedhowAppropriateStatusBarPanes()
{
  if (m_tabCtrl.GetCurSel() >= 0)
  {
  if (mListBar->GetCurrentPage() == SEQUENCE_FILES_PAGE_INDEX) // if only the files    tab is visible
  mStatusBar->ShowPanes(_T("User, EngineEnvironment, FileModel, FileSelectedSteps,   FileNumberOfSteps"));
  else
  if (m_tabCtrl.GetCurSel() == 0) // execution tab is selected
  mStatusBar->ShowPanes(_T("User, EngineEnvironment, ExecutionModel,     ExecutionSelectedSteps, ExecutionNumberOfSteps, ProgressText, ProgressPercent"));
 else // report tab is selected
  mStatusBar->ShowPanes(_T("User, EngineEnvironment, ExecutionModel,     ReportLocation, ReportModel, ProgressText, ProgressPercent"));
  }
}

 

In the above ShowAppropriateStatusBarPanes(), how can I include date and time information as GetCaptionText() does not have the 'uiObj' parameter.

PS: The parameters inside ShowPanes() in the above code snippet are the 'uiObj' for each connection established.

 

Appreciate any help!

Re: Teststand Operator Interface and C++ MFC interface

$
0
0

As mentioned, the panes are referred to by name.



  mStatusBar->ShowPanes(_T("User, EngineEnvironment, FileModel, FileSelectedSteps,   FileNumberOfSteps, <MyPaneName>"));
 

I hope above part points you to a working solution...

Re: Teststand Operator Interface and C++ MFC interface

$
0
0

Hi Norbert,

 

I understand that I should list <MyPaneName> in the parameters list of ShowPanes().

But, analyzing the current parameters of ShowPanes(), for example 'User', this is the uiObj parameter of the below code snippet. used for connection.

 

mApplicationMgr->ConnectCaption(panes->GetItem("User"), CaptionSource_UserName, false);

 

'uiObj' is the first parameter of the function ConnectCaption() which is used to connect this caption (i.e. 'User')

However for date and time, I am using GetCaptionText() and this function does not have uiObj parameter. I tried using ConnectCaption() for date and time but when I launch my .exe, it says invalid pane probably because no such pane exists. Is GetCaptionText() the correct function to use?

If yes, what would be <MyPaneName> I should be passing to ShowPanes().

If No, what should be the function used instead of GetCaptionText() ?

Re: Teststand Operator Interface and C++ MFC interface

$
0
0

 wrote:
[...]

But, analyzing the current parameters of ShowPanes(), for example 'User', this is the uiObj

[...]


That part underlined in your text above is incorrect. ShowPanes works with the name.

That is why you need


 wrote:
[...]
mApplicationMgr->ConnectCaption(panes->GetItem("User"), CaptionSource_UserName, false);

[...]


This code connects the item with the name "User" to the application manager. You can see this because it calls the GetItem method.

When looking at the parameters of ShowPanes, you won't see the GetItem method call....

 

The name is whatever you provided as name for the pane in the ActiveX property dialog.

Re: Teststand Operator Interface and C++ MFC interface

$
0
0

It Worked! Thanks a lot Norbert.

 

I am pasting the code below for someone in need.

 

First insert two panes with names 'Date' and 'Time' as below.

panes->Insert("Date",4);
panes->Insert("Time", 5);

where 'panes' is of type StatusBarPanesPtr.

4 and 5 is the position of the panes.

 

Then connect these panes as below:

mApplicationMgr->ConnectCaption(panes->GetItem("Date"), CaptionSource_Date, false);
mApplicationMgr->ConnectCaption(panes->GetItem("Time"), CaptionSource_Time, false);

 

Upon passing 'Date' and 'Time' in ShowPanes() of ShowAppropriateStatusBarPanes() function. This brings both date and time information to the status bar.

Re: Teststand Operator Interface and C++ MFC interface

$
0
0

This is working fine and displaying the current date and time correctly. Now, how to give a label to them as 'Date:' and 'Time:' so that when they look like 'Date:dd/mm/yyyy' and 'Time: hh:mm:ss'? 

Now it is just 'dd/mm/yyyy' and 'hh:mm:ss'

Re: Teststand Operator Interface and C++ MFC interface

$
0
0

You have to extend your connection to allow custom formatting.

To do so, you can modify the connection command area to somthing like this (C#):

CaptionConnection TimeConn;

TimeConn = this.axApplicationMgr.ConnectCaption(panes["Time"], CaptionSources.CaptionSource_Time, false);

TimeConn.FormatExpression = "\"Time: %1\"";

 

%1 is replaced with the text of the caption source once an update is done.


Re: Why Teststand is printing new line as \r in Test Report

$
0
0

Hey Diana,

 

Thank you for the sequence. This is a known issue with TestStand currently being tracked with ID of 141627.

 

The current workaround depends on the report format. It is listed on that document. Please let me know if it does not work for you. 

 

Thanks!

Roxy

 

 

Set .NET Step Module properties via API from c#

$
0
0

Needing to create a sequence step from c# using the api

The step is a dot net adapter type

I've got the sequence created

I've got the step created

I've set the limits and the units

Can't seem to find how to set the items from the module tab

   - Assembly

   - Root class

   - ect

 

If someone can point me in the right direction, I'd appreciate it

 

Thanks

 

Re: Teststand Operator Interface and C++ MFC interface

Re: Teststand Operator Interface and C++ MFC interface

$
0
0

Okay, now this is the last issue I have hopefully.

The status bar is all set for displaying the necessary information. However the panes are very small and are unable to display full information. The screenshot is attached.

 

I know we have statusbarpane properties like 'Width', 'UseAvailableSpace' etc but I cannot find example anywhere to use it. Not even in TestStand Example folder. I tried different possible ways to somehow use these properties but in vain. An example code snippet to do this would be great or is there any other way to expand these panes so that they display full information?

 

Thanks!

 

Re: Teststand Operator Interface and C++ MFC interface

$
0
0

There is no snippet required.

The width you assign to each pane in the status bar property dialog is in pixels. I recommend to design for a minimum total width like 1024 (minus border which should be <10 pixel for both sides together).

That being said, you should assign a minimum width for each pane to display the whole information except that is too long (e.g. very long model name). You can use "UseAvailableSpace" for panes you want to be as wide as possible to fill the total width of the UI (depending on your screen resolution). I've not tested this but i assume that if you have multiple panes configure for UseAvailableSpace, the space left from static pane widths is equally divided between those flexible panes.

For date and time a width of ~200 should be sufficient.

Viewing all 24502 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>