# Expression for a progress bar if exceeds...?

**URL:** <https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [April 6, 2025, 11:56pm UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758 "2025-04-06T23:56:17Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergio\_valencia](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sergio\_valencia](https://forum.inductiveautomation.com/u/sergio_valencia)\
**Post date:** [April 6, 2025, 11:56pm UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/1 "2025-04-06T23:56:17Z")

</div>

Trying to create a expression for a progress bar. If exceeds 100%, I would like for the progress bar to show ???.

{[default]AZ ASRS Conveyor System/Wave Control/C7-1 BB1001A/N701:10}/{[default]AZ ASRS Conveyor System/Wave Control/C7-1 BB1001A/N701:11.value}\*100  
if((({Root Container.Progress Bar.value} \> 100, color(255, 0, 0),  
if({Root Container.Progress Bar.value} == 100, color(0, 0, 255), color(0, 255, 0)))  
)  
)  
)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 7, 2025, 12:07am UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/2 "2025-04-07T00:07:53Z")

</div>

Please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).  
That allows you to post the code in a readable format as shown below. This in turn reveals some strange syntax and redundant `( )` occurrences.

```python
{[default]AZ ASRS Conveyor System/Wave Control/C7-1 BB1001A/N701:10}
  / {[default]AZ ASRS Conveyor System/Wave Control/C7-1 BB1001A/N701:11.value} 
  * 100
  if(
      (
        ({Root Container.Progress Bar.value} > 100, 
          color(255, 0, 0),
          if({Root Container.Progress Bar.value} == 100, 
            color(0, 0, 255), 
            color(0, 255, 0)
        )
      )
    )
  )
)

```

Can you explain your expression logic?

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [April 7, 2025, 6:42am UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/3 "2025-04-07T06:42:21Z")

</div>

This is most likely not doing what you think it does.  
Can you elaborate on what you have (what data, and what its role is concerning that progress bar), and what the whole thing is supposed to look like ?

---

<div class="post-metadata">

**Author:** ![Lion\_Sun](https://avatars.discourse-cdn.com/v4/letter/l/3ab097/32.png) [@Lion\_Sun](https://forum.inductiveautomation.com/u/Lion_Sun)\
**Post date:** [April 7, 2025, 7:31am UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/4 "2025-04-07T07:31:37Z")

</div>

I think it doesn't work if only use a progress bar. the work around is place a progress bar and a label overlapped in a container to make it happen.

When the value is less or equal to 100, set progress bar's visible property to true, when the value is large than 100, set label's visible property to true. (Just use expression binding for each component)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/d/bdfe24bb4509174f5002e9da7c082e5b6f6ace85.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/3/d3db720d8e9d69b00c66d0aa4ddc6d5d26615c02.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/d/3db8e8a4b6b8b46e1c798f23ae69a56a750cc678.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/4/c4366dc0140935699e2e82840d2f3426faa3e783.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/9/c96b87f69acde2fe8f63fd6299b5016bb1834cad.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/0/e0d23c37f19d726c3d790f24d40901768cc1428a.png)

You can even make a template if you need re-use this 'combined component'.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [April 7, 2025, 10:01am UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/5 "2025-04-07T10:01:30Z")

</div>

> [@sergio\_valencia](#):
>
> N701:10

You can and should name your ignition tags properly with words so that you can use them logically in your graphics, as well as to maintain your sanity (and the sanity of the next person who looks at the project)

---

<div class="post-metadata">

**Author:** ![sergio\_valencia](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sergio\_valencia](https://forum.inductiveautomation.com/u/sergio_valencia)\
**Post date:** [April 7, 2025, 5:20pm UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/6 "2025-04-07T17:20:37Z")

</div>

Sorry, This is a bit that we use in PLC-5, Yes PLC-5...LOL. Once we upgrade it will change so I didnt want to put too much time....

---

<div class="post-metadata">

**Author:** ![sergio\_valencia](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sergio\_valencia](https://forum.inductiveautomation.com/u/sergio_valencia)\
**Post date:** [April 7, 2025, 5:20pm UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/7 "2025-04-07T17:20:53Z")

</div>

Awesome Thank you.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [April 7, 2025, 5:23pm UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/8 "2025-04-07T17:23:10Z")

</div>

> [@sergio\_valencia](#):
>
> Once we upgrade it will change so I didnt want to put too much time....

Okay, I understand, however, when you upgrade the PLC, the Ignition tag name will not have to change, only the OPC path. Use a name that makes since for what the bits purpose is. Prior to using it throughout your program and then learning that you want to change the name and then having to manual search and rename the reference in all the places that it is used.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [April 9, 2025, 4:25am UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/9 "2025-04-09T04:25:16Z")

</div>

> [@sergio\_valencia](#):
>
> we use in PLC-5,

I love those things. They look like something straight out of a sci-fi horror movie. Most of the time, if not every time, I've seen something replaced on a PLC-5, it's been misdiagnoses. They just don't make 'em like that anymore. Those things are military grade, and they simply won't fail on their own.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 9, 2025, 12:00pm UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/10 "2025-04-09T12:00:59Z")

</div>

I have a PLC-5 that I **could** mount on my laboratory wall, if I were willing to displace a dozen other modern components. Oy!

---

<div class="post-metadata">

**Author:** ![colten.davis](https://avatars.discourse-cdn.com/v4/letter/c/a5b964/32.png) [@colten.davis](https://forum.inductiveautomation.com/u/colten.davis)\
**Post date:** [April 9, 2025, 12:21pm UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/11 "2025-04-09T12:21:56Z")

</div>

100% agree.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [April 9, 2025, 12:33pm UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/12 "2025-04-09T12:33:28Z")

</div>

🤣 I know; they are humongous! Every time I encounter one, I feel like I'm in one of the early alien movies, and I'm afraid I'll be electrocuted if I touch it. Contrast that feeling with its SLC successor. When I encounter an old SLC in the environment, I'm afraid to touch it because the brittle plastics will probably crumble and cause the cards to fall off the backplane.

I know PLC 5s have to be upgraded to the latest and greatest thing because _where did I put that serial cable?_, but I'm just saying: we're not replacing them because they stopped working. We are replacing them because nobody remembers how to work on them.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 9, 2025, 12:39pm UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/13 "2025-04-09T12:39:42Z")

</div>

> [@justinedwards.jle](#):
>
> nobody remembers how to work on them.

Hah! Maybe my side hustle after I retire will be rescuing PLC-5 applications. Perhaps Logix5 is the new COBOL. 🤣

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [April 9, 2025, 1:12pm UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/14 "2025-04-09T13:12:41Z")

</div>

> [@pturmel](#):
>
> after I retire

I'm sure they will still be around.

_image: mid 1980s battle tank_

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/0/40de8094d103145b7fabf538d2f290b9a8951b23.jpeg)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [April 9, 2025, 1:44pm UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/15 "2025-04-09T13:44:21Z")

</div>

For size reference (thanks random guy from the interwebs)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/5/35f2622d24886e15eef906608b6415aa4405d1c6.jpeg)

---

<div class="post-metadata">

**Author:** ![harold.bruulsema](https://avatars.discourse-cdn.com/v4/letter/h/e79b87/32.png) [@harold.bruulsema](https://forum.inductiveautomation.com/u/harold.bruulsema)\
**Post date:** [April 15, 2025, 7:29pm UTC](https://forum.inductiveautomation.com/t/expression-for-a-progress-bar-if-exceeds/104758/16 "2025-04-15T19:29:02Z")

</div>

Puppies.

When I started in this business a PLC2/30 was awesome!
