LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RE: Problem with Changing the string indicator's text and color

 Hi All,

I can't figure out what I am missing here:

I have a state machine with idle > test > report > idle flow. I need to set the front panel string as blank(empty text + gray) when the start button is pressed in the idle state and either (pass + green) or (Fail + red) in the report state. For some reason assigning a color to "text.BGColor" doesn't work, see attachments (sorry can't post the code, it's work). What am I doing wrong?

 

Thanks

HN

0 Kudos
Message 1 of 8
(3,103 Views)

@H7N wrote:

 

What am I doing wrong?  

 


You are wiring into the wrong thing.  You need to wire into the Text.TextColors Property.  (sorry can't post the code, it's work).

Colored String.png

Bob Schor 

0 Kudos
Message 2 of 8
(3,075 Views)

H7N a écrit :

What am I doing wrong?

 


Not posting enough code for anybody to be able to help you efficiently. The only thing that can be said is that the false case is probably not executed.

 

Ben64

0 Kudos
Message 3 of 8
(3,073 Views)

Bob,

Maybe I wasn't clear enough, for the Fail case I need to display "fail" and the whole indicator to turn red. In the same way for the Pass, I need the to display "pass" and the whole indicator to turn green. What confuses me is that the code works outside of my state machine. See the test vi attached

0 Kudos
Message 4 of 8
(3,061 Views)

@ben64 wrote:

H7N a écrit :

What am I doing wrong?

 


Not posting enough code for anybody to be able to help you efficiently. The only thing that can be said is that the false case is probably not executed.

 

Ben64


 I may have confused you by mixing the screenshots: All cases are executed correctly and I get the right text in my indicator: pass, fail and empty(for control). But the indicator colors don't change correctly, for example for the pass case, instead of the whole indicator turning green, only a narrow border turns green. The behavior is the same for all three, only that narrow border changes to the color that I write to the text.BGColor. See below screen shots:fail.JPGinitialize.JPGpass.JPG

0 Kudos
Message 5 of 8
(3,055 Views)

Hi H7N,

 

as Bob already told you: you need to choose the correct property:

check.png

In your example VI I switched the properties to show "long property names". The left property will NOT work as intended, while the right one will… (Using short names both will show as "Text.BGColor".)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(3,043 Views)

To be fair, when you place a property node for a string control, there are a bewildering amount of apparent text color properties to choose from, some with very similar names.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 8
(3,018 Views)

@GerdW wrote:

Hi H7N,

 

as Bob already told you: you need to choose the correct property:

check.png

In your example VI I switched the properties to show "long property names". The left property will NOT work as intended, while the right one will… (Using short names both will show as "Text.BGColor".)


This exactly illustrates my last post.  it would've helped immensely if they named the one on the left something like: Text.box.Colors:BG Color.  No ambiguity there.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 8
(3,016 Views)