From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to edit expression - read-only

Solved!
Go to solution

I am having a problem that some of the steps in my sequence the expression has become read only. This has occured on and off for some time on multiple machines the work around is to create a new step copy the expression and delete the old step. I did once see a message about something is set "read only" but I have been unable to find where to unset it. 

I can still edit other part of the step, in the Properties->Expressions  the pre and status windows are white and I can edit them, the post-expression window is grey and can not be edited. The expression tab is the same, grey and read only.

Teststand 2012, the step in question now is a f(x) function, not sure if this is always the case.

I have searched here and find only very old posts that sugest the problem is fixed in 2012.

0 Kudos
Message 1 of 11
(5,061 Views)

The configuration which expression edit field can be edited by the sequence developer is done in the step type.

It sounds to me that there were changes in your custom step type definition which now do prevent you from editing that field.

 

For standard (NI) step types, these options should not change.

 

Are you using a custom UI?

 

Norbert

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

No this is a standard Teststand step type - f(x) statement.

Can I access these parameters for a standard step?

0 Kudos
Message 3 of 11
(5,050 Views)

Can you attach an example sequence file which includes such a step where the issue occurs and some screenshots showing the issue?

 

Norbert

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

Here is a sequence with the problem on the two f(x) steps.

0 Kudos
Message 5 of 11
(5,036 Views)

For some reasons, the flag "Not Editable" was set for the Post Expression of these step instances.

You can modify that by selecting the PostExpr property in the Property Browser of the step, right-click and select Advanced >> Edit Flags....

 

Please verify that you are admitted to change that expression as the flag should have been set on purpose!

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 6 of 11
(5,032 Views)

.... but what purpose?

 

I have found the edit flags, and can see the flag value is 0x1 and the Not Editable box is ticked, but all are grey and can not be changed.

The reason I want to edit the expression is the StationGlobal.LogData does not exist, and I need to remove reference to it. So this is showing as an error. I tried recreating this variable, but no change.

 

0 Kudos
Message 7 of 11
(5,030 Views)

Having the Not Editable flag enabled grays out the remaining flags, but you should still be able to uncheck the Not Editable flag (unless your User doesn't have permission to edit). 

 

This flag needs to be set manually, so I think what Norbert is saying is that there must have been a reason for the developer to set the flag. This might have been to prevent accidentally changing the expression, or for any number of other reasons. The point is that it shouldn't be the default behavior of the step type, which implies some intention behind changing it.

 

If you add a new Statement step, is the Expression still grayed out?

Steven Gloor
Staff Customer Engineer - CTA, CLD
0 Kudos
Message 8 of 11
(5,024 Views)

I can add new steps and edit them with no problem.

The 'Not Editable' checkbox is itself greyed out and  can not be changed. I am the same user as all my editing, in the user manager Grant All is true.

 

We have seen this problem several times over a long period, I am asking for help today because this is a sequence I was successfully editing recently  and no one else has been near it. It has been copied from one machine to another, possibly via a zip file. In this case all the f(x) steps in the sequence have developed the same problem. (The full sequence is not much larger and has 6 f(x) steps). In the past I have seen the odd one or two steps suddenly become read only, without affecting others in the sequence.

I have juust noticed on another machine the Property Browser does not have the TS entry for this step. As far as I know identical version of teststand, OS is XP where original system is Win7.

0 Kudos
Message 9 of 11
(5,022 Views)
Solution
Accepted by topic author David_Stevenson

TS is considered to be a Hidden Property. You can enable Show Hidden Properties in the Preferences tab of the Station Options.

 

Looks like your sequence files are in INI format, so you might be able to fix it in a text editor. Open the sequence file in a text editor and locate the step(s) in question. They are listed in order of their index location (e.g. "[SF.Seq[0].Main[2].TS]"), or you can use their Step Names or IDs to find them. For the steps that you want to edit, delete the line "%FLG: PostExpr = 1" to reset the property flags to 0.

 

You could try generating checksums before and after copying the sequence file to check if the file is actually changing. You could also try saving the sequence file in binary or XML format instead of INI.

Steven Gloor
Staff Customer Engineer - CTA, CLD
Message 10 of 11
(5,011 Views)