NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Property Loader for status description

Solved!
Go to solution

Hello,

 

i want to use the Property Loader to change a TS variable.

I have a variable StationGlobals.Status. In this variable is the last failure status like "Test1".

Now i want to load a description of this failure from a .txt file like

"Test 1

- check connections

- check ...." and put it in the same variable.

And this for more Tests like "Test2", "Test3" ....

 

Can i use the Property Loader for this?

 

The .txt file should look like this:

 

Test1

Test 1

- check connections

- check ....

Test2

Test 2

....

.....

 

I use TS2010.

 

Hope somebody can help me.

 

regards

 

Schwede

 

0 Kudos
Message 1 of 12
(4,236 Views)

Schwede,

 

i am confident that, depending on the purpose of that text (dialog, report, ...), there are other, maybe more flexible ways to solve this.

 

Nevertheless, you can do this using Data Markers in the property file.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 12
(4,233 Views)

What is the better way...?

It should be from a text file because the user should edit it.

The status will be displayed in the error banner.

0 Kudos
Message 3 of 12
(4,231 Views)

A possible (imho 'better' way) would be a custom dialog module, loading the error message from an external *.ini or *error.txt file.

This will make the request obsolete and does not meddle with data stored in TS (execution).

 

just my 5 cents,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 12
(4,228 Views)

Hi,

 

Not all Step properties can be changed by use of the PropertyLoader, I not sure about the Status property.

 

 

Regards
Ray Farmer
0 Kudos
Message 5 of 12
(4,220 Views)

I think my configuration is wrong. It don`t work.

0 Kudos
Message 6 of 12
(4,217 Views)

Can you post an example.

Regards
Ray Farmer
0 Kudos
Message 7 of 12
(4,208 Views)

This are my settings:

 

see attachment

 

The step is in the PostUUT Sequence of the parallel model.

 

The .txt is like this:

 



// --------------------------------------------------
// Properties for "Pulsbreite"
// --------------------------------------------------
>
<StationGlobals>    Variable Value
Testplatz_1.Status    "Test Description"
<

 

 

The ">" is only for testing. It should be later the StationGlobals.Testplatz_1.Status variable.

 

Take the string of this variable and if it in the .txt file replace it with the string in the file.

 

I don't use the Property Loader before.

 

 

 

0 Kudos
Message 8 of 12
(4,198 Views)
Solution
Accepted by topic author Schwede

Its not wise to use < and > as the Start and Stop markers as these are used to indentify the different elements such as Step Name,

FileGlobals, StationGlobals.

 

Check out the Manual Appendix D

 

usual format is:

Start Marker

 

...

<StationGlobals> Variable Name

Testplatz_1.Status "Test Description"

 

End Marker

 

 

 

Regards
Ray Farmer
Message 9 of 12
(4,124 Views)

Attached you can find a small case study for your request. I hope this answers your question (nevertheless, i think another solution would be "easier" to maintain).

 

Please note that Ray's comment above exactly refers to one issue i had with my implementation first (found the markers, but did not import anything!). You have to have all parts of the variables in the marker-section as seen in my limit file. Refer to this link where i found the hint for this insight.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 10 of 12
(4,120 Views)