NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Expression expansion

I am writing a custom step type in LabVIEW. I've created the step VI and an edit step VI. One of things I need to do is to specify a message to be displayed by the step when it runs. The message is TestStand expression. What I don't know is how and where the expression gets expanded/evaluated.

I'm using TestStand 2.0 and LabVIEW 6.0.2

Thanks in advance for any help.
0 Kudos
Message 1 of 3
(2,990 Views)
Hi Dennis,

Are you referring to the text displayed in the Description column that you see in the sequence editor?

This column is obtained from the Properties | General | Step Description Expression.

This expression is evaluated when the step is first inserted into the sequence. I guess the engine is handling this evaluation. If the engine can not evaluate the expression because for example the variable doesn't exist. a Message is displayed in the description column such 'The Step description step '' could not be evaluated. Unknown variable or property....'

There is an example in the Resource Library which demonstrates displaying the result or / and the limits during runtime.


As a general comment on creating cUstom steps, especially the edit step VI. Alt
hough you are required to have an error out cluster on the connector panel. Errors seem only to be reported via this connector for the actual step vi. The edit vi, the pre step and post step vi's have to have any errors written direct to the step error properties before terminating the VI.

Also have you tried using the Combined with Step Type. Very useful if you want to expand a base step type

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 3
(2,990 Views)
Actually what I was doing was creating a step similar to the message popup but was also capable of displaying a bit map. I needed to pass an expression for the window title. I used the TestStand method called GetValString. My problem was when I had an expression like "string " + Locals.StringVar. If I just passed Locals.StringVar, the method worked and if I just passed "string " the method worked but not together. I just found the problem though in that I needed to do the Evaluate method first. I just got lost and confused as I was trying to navigate the method and property tree. And actually, a method of the Engine property does evaluate an expression to see if it is correct but the Evaluate method is part of the PropertyObject.
0 Kudos
Message 3 of 3
(2,990 Views)