LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

About the property indicator of cluster

Hello all,

   when press one button, I want to change the cluster from a control to a indicator during program running.

but it occur a error, and fail. please refer to the following content. please give some advice.

and provide more about indicator property.

 

Possible reason(s):

LabVIEW:  This property is writable only when the VI is in edit mode, or this method is available only when the VI is in edit mode.

Property Name: Indicator1.jpg

Amanda
0 Kudos
Message 1 of 6
(2,986 Views)

Well, as the error message says, you can't do this. The reason is pretty obvious when you change your control to an indicator, you break the code. How should this be allowed when the code is running?

 

Can you describe what is your desired behaviour (UI behaviour?), then we can give you some more advice on how to do it.

 

Felix

0 Kudos
Message 2 of 6
(2,980 Views)

Hi Felix,

  Thanks for your reply.

  I build a tool for chipset register debug. I use cluster(include seven strings), the register has read and write property.

 

so when i read the register value, I want to set the cluster as a indicator(read only),

when i write data to the register, i need set the cluster as a control.

 

I plan a boolen box on the UI, and add its event case. when it is off(true), the cluster should be a indicator, or it will be a control.

 

 

 

Amanda
0 Kudos
Message 3 of 6
(2,969 Views)

Use a control. To prevent the user from editing it, use the porperty 'disable'. To write data to it, use a local variable.

Alternatively, you can have a control and an indicator and use the property 'visible' to show/hide according to read/write mode.

 

Felix

0 Kudos
Message 4 of 6
(2,962 Views)

Hi Felix,

Thanks for your suggestion.

I use "disable" property to realize my expected function(switch indicator to control).

 

but for "indicator" property, i still can not catch it. when we can use it? and how to use it?

I donot find any reference about it from internet.

can you explain for me. thanks for your kindness.

Amanda
0 Kudos
Message 5 of 6
(2,943 Views)

You can read it. For example you might write some generic code that writes all settings into an ini file on exit and restores them on restart of the program. Then you might like to only restor control values and not indicator values. Of course, there are more convenient ways to make this (As you can get controls/indicators only on VIs).

The second option is that you can write it if your vi is in edit mode.

This allows to write tools that e.g. scan your vi's for ducumentation and list all the controls seperated by controls and indicators.

I'm not sure if you can write it in edit mode, but if, then this is a property you might use when doing 'VI scripting', so programatically alter or create code.

 

Felix

0 Kudos
Message 6 of 6
(2,903 Views)