round( (({CO2 Tanks/Tank 2 Level Row}/380)*100), 0 ) gives me the value I want.
I see prefix and Suffix fields that I am using. I see Font options, but if I change this it changes all Prefix, Suffix and values to a static setting.
How can I script this to dynamically change font and color based on value?
How do I return the tank value with the correct formatting?
I cannot even declare Tank_Value as a variable equal to round( (({CO2 Tanks/Tank 2 Level Row}/380)*100), 0 )
I would really appreciate that. I am having a hard time knowing where I can input logic and how and where to return to and from. If only it was as simple as php or .net....
css/html formatting options would be great. I don't know how to make it dynamic. The user manual only gives snip-its.
I added a dynamic property to the label called StatusColor. It holds the color name according to the setpoint values (I used the cascaded If-Then you posted earlier. )
The Text property is a concatenated string that puts together all the html code to get the disired output. Tank with html label.vwin (6.49 KB)
Do you have anymore examples of how to use scripting. I learned more with your exported window in minutes than I have from reading the user manual for days.
Thank you sir. I wish there are some kind of like or mod points for this. Thumbs up and thank you for your time.
I've got quite a bit of stuff scattered around on the forum, some more stuff here at work. Whether it's actually useful or not is a matter of some conjecture!
Usually, I'll make a window for whatever someone is trying to do, keeping it as self-contained as possible.
go easy,first post, only started messing with this today (in my “spare” time)
My question is to confirm whether I need scripting to do the value conversions on a window from the PLC counts. I searched for “4095” and found nothing.
SO, Ignition is such that one embeds a script for such conversion for each indiv value, everytime it is used?
I’ll continue to mess about, but I read 2 PLC registers and the values did not match the counts I saw in my PLC view. The tags just declared as unsigned 16bit if I recall. It’s probably something basic.
Also, I presume the *.vwin scripts I see in posts must be viewed in Ignition?
Thanks
[quote="billymac00"]go easy,first post, only started messing with this today (in my "spare" time)
[/quote]
No worries! Everyone is new at one time!
I get to use my stock answer for such things: "It depends." Seriously, though, an example of what is in the PLC register to what you're seeing in Ignition will go a long way. My gut tells me that that the PLC register is in BCD, but it's something to verify before I go completely off-base.
Oh! Almost forgot… okay, I did forget. But I remembered, and that’s the important thing! What PLC are you using? A PLC side solution likely exists as well. That way you have extra options. That whole “multiple ways to skin a cat” thing, which is good… unless you’re a cat…