Been programming in Ignition for about a year and ran into a issue I need help on.
I’ve created a PID Tuning Screen Template for an PLC application with PV, SP, & CV vertical bars, Trend Chart, Auto/Manual Indicators, and numerical inputs for the PID Gain adjustments. So far so good.
I’m using an Integer tag that contains my Loop number. So my internal tags look like - Loop X/SP, Loop X/PGain, etc.X is of course tied to a Template Parameter that I use to change Loop Numbers. All the functions listed above works fine in my application.
I need a Button inside the Template to toggle the the Auto/Manual of the Loop. I cannot identify the correct syntax to implement a Button Function inside the Template using the Component Scripting of the Button. I have been trying using the system.tag.write to do this, but again cannot implement the correct syntax for it to function. If I hard-code it to a specific Loop Number it works.
The below is one of the lines I have tried and modified different items, but to no success. I am writing a 1 or True to the tag and clearing in the PLC.
system.tag.write(‘Chiller/Loop “event.source.parent.LoopNumber”/ModePB’, 1)
Am I inside or outside the ballpark