# Text Alignment & Animation for integer value on button

**URL:** <https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755>\
**Category:** Ignition\
**Created:** [January 30, 2020, 11:46am UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755 "2020-01-30T11:46:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rameshwar.kuthale](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rameshwar.kuthale](https://forum.inductiveautomation.com/u/Rameshwar.kuthale)\
**Post date:** [January 30, 2020, 11:46am UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755/1 "2020-01-30T11:46:15Z")

</div>

1)how to do spacing & alignment of texts on normal button. ![alignment%20of%20text%20in%20normal%20button](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e4778af2f0d166827c13f23c2539b2b7d78ad0b4.png) .

2)suppose I have integer tag, for different values I have to set different colours on button  
iam facing issue because (greater or equal) Expression.  
for example when I set integer value to 1 Button animation should be green  
when I set integer value to 2 Button animation should be yellow  
when I set integer value to 3 Button animation should be Red  
when I set integer value to 4 Button animation should be Blue

 ![error](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/4ec396b03350a90ce81ac5d58eb639c95af1f0bb.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 30, 2020, 4:51pm UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755/2 "2020-01-30T16:51:28Z")

</div>

1. _If_ the built in text controls aren’t sufficient, you can use a limited subset of HTML - just add it to the button’s Text property, eg `<html><center>Turn Table Basket Receiving</center>`

2. Use the [Style Customizer](https://docs.inductiveautomation.com/display/DOC80/Vision+Component+Customizers#VisionComponentCustomizers-StyleCustomizer) to customize animation.

---

<div class="post-metadata">

**Author:** ![Rameshwar.kuthale](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rameshwar.kuthale](https://forum.inductiveautomation.com/u/Rameshwar.kuthale)\
**Post date:** [February 5, 2020, 10:04am UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755/3 "2020-02-05T10:04:09Z")

</div>

@paul-griffith  
thank you very much.it working perfectly.  
Iam facing major issue while using momentary button or normal button to set or reset Boolean bits.  
when I configure momentary button or normal button using event action  
when pressed set(db1.dbx0.0)  
when released reset(db1.dbx0.0)  
iam browsing these tags from plc through opc.

when I press button db1.dbx0.0 is true  
when I Release button db1.dbx0.0 is some times reset and sometimes not.  
db1.dbx0.0 continuously true  
in logic these bits are not overwritten, all communication settings checked.  
still error not resolved??  
could you help me.

---

<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:** [February 5, 2020, 12:15pm UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755/4 "2020-02-05T12:15:59Z")

</div>

New, unrelated questions ought to be new topics, but in this case:

> [@Rameshwar.kuthale](#):
>
> when I Release button db1.dbx0.0 is some times reset and sometimes not.

This is a common, ugly problem. Momentary buttons and query-response protocols don't play well together. Anyways, start with this topic and follow to the linked topics:

> [@HMI Momentary button Gets stuck with N/O Bit of PLC](http://forum.inductiveautomation.com/t/hmi-momentary-button-gets-stuck-with-n-o-bit-of-plc/21388):
>
> [image] I have two dynamically tagged momentary button for each of this START and STOP bit. Some reason, most of the time, B10.0 get stuck and latched in PLC, this causes not able to shut the motor down. Its control value is assigned to its respective tag as bidirectional with 2.5 sec, but still it gets hung up. Any one experienced this type of problem or I am doing some thing wrong. ?

---

<div class="post-metadata">

**Author:** ![Rameshwar.kuthale](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rameshwar.kuthale](https://forum.inductiveautomation.com/u/Rameshwar.kuthale)\
**Post date:** [February 5, 2020, 12:23pm UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755/5 "2020-02-05T12:23:20Z")

</div>

@pturmel  
iam facing these button problems in my three projects which are in commissioning process.  
we have many manual actions in our projects through these buttons.  
so iam highlighting this issue repeatedly.

so I need solution quickly to resolve this problem.  
I need to understand where is problem exactly.  
is it tag problem or button or protocol problem???

---

<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:** [February 5, 2020, 1:11pm UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755/6 "2020-02-05T13:11:31Z")

</div>

> [@Rameshwar.kuthale](#):
>
> is it tag problem or button or protocol problem???

It is a fundamental problem with common PLC protocols that is exacerbated by the typical network architectures of SCADA systems and the event models of PC-based GUI operating environments. Read the topics. There are robust techniques to avoid the issues.

---

<div class="post-metadata">

**Author:** ![shibubalaji](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/shibubalaji/32/9165_2.png) [@shibubalaji](https://forum.inductiveautomation.com/u/shibubalaji)\
**Post date:** [February 5, 2020, 11:07pm UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755/7 "2020-02-05T23:07:34Z")

</div>

The way i resolved this issue through PLC by simply adding a logic to reset this momentary bit in 5 sec.

---

<div class="post-metadata">

**Author:** ![Rameshwar.kuthale](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rameshwar.kuthale](https://forum.inductiveautomation.com/u/Rameshwar.kuthale)\
**Post date:** [February 6, 2020, 1:04pm UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755/8 "2020-02-06T13:04:22Z")

</div>

yes we can do it by plc,  
but what is use of buttons provided on ignition software?//

---

<div class="post-metadata">

**Author:** ![Rameshwar.kuthale](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rameshwar.kuthale](https://forum.inductiveautomation.com/u/Rameshwar.kuthale)\
**Post date:** [February 6, 2020, 1:29pm UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755/9 "2020-02-06T13:29:58Z")

</div>

@pturmel  
how to pop up particular screen in ignition 7.9.8,  
on Boolean bit, which will set by plc.

---

<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:** [February 6, 2020, 1:57pm UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755/10 "2020-02-06T13:57:37Z")

</div>

That would be a client tag change event.

---

<div class="post-metadata">

**Author:** ![Rameshwar.kuthale](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Rameshwar.kuthale](https://forum.inductiveautomation.com/u/Rameshwar.kuthale)\
**Post date:** [February 18, 2020, 6:49am UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755/11 "2020-02-18T06:49:22Z")

</div>

Hello guys,

@pturmel  
1)How to differentiate clients on different ip address in ignition  
how to provide functionality accessibility based on ip address in ignition??

@paul-griffith,  
2)Normal buttons can be used for navigation? if so these why these button keeps get stucked?  
I have used **action performed** event to open screen.

3)In Our project we have turn table,from ignition designer v7.9.8 we have Momentary button to start and stop commands for turn table  
when we give start command from ignition designer using momentary button .  
turn table will rotate continuously without stopping, because momentary button is getting stucked its not working as momentary button !!  
if we use reset logic from plc to this reset momentary button,  
their are several problems  
firstly turn table speed will be varying always not fixed.  
so reset logic will not work.  
second we cant define time in reset logic because of varying speed.

I need exact solution how can I start & stop turn table using momentary button or any other button.  
or any scripting let me know.

---

<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:** [February 18, 2020, 11:33am UTC](https://forum.inductiveautomation.com/t/text-alignment-animation-for-integer-value-on-button/31755/12 "2020-02-18T11:33:06Z")

</div>

1. Try the scripts in this post (for Vision, not Perspective):

> [@Mobile Client MAC Address](http://forum.inductiveautomation.com/t/mobile-client-mac-address/23037/10):
>
> In a real Vision client, you can obtain the local MAC addresses with the following script: from java.net import NetworkInterface # Get list of local mac address as strings def myMacIds(): macs = [ni.hardwareAddress for ni in NetworkInterface.getNetworkInterfaces() if ni.hardwareAddress] return [":".join(["%02x" % (b & 0xff) for b in mac]) for mac in macs] Also, again in a real Vision client, you can obtain the outbound network interface and the corresponding local IP address the clien…

Probably want to save the results of your location decisions in a client tag to make it available to all windows in your project.

1. Go study all of the posts I linked, and maybe the links within those posts. This is not a problem specific to you, or to Ignition. There are a number of solutions that don't use the bit reset pattern (though PLC code is required for all solutions) in those linked posts. Pick one.
