I am nearing completion of my first Ignition project. I have a few final issues to fix and I have been struggling with this one. Ignition v7.9. Siemens PLCs.
I have a template called “Level_Controller” which displays the process value from a level transmitter and the status of a top-up valve. If the user clicks on this template a pop-up is displayed with a chart showing the PV, the valve status and some other information including manual control etc.
The popup is configured with 4 strings as inputs (see attached). These define the tag path to the process value (UDT), the controller (UDT) and the two set points. These strings are then passed to the pop-up where the relevant tag path(s) are generated by scripts. The desired functionality is that the setpoint controls are enabled in “manual mode”. In automatic mode they are controlled by a SQL recipe that I will add soon!). The user uses the controls to adjust the on and off trips for the level controller.
The float value of each set point box is configured as shown.
This script works fine. If the set point is changed in the PLC or in Ignition’s tag browser the new value is displayed. However, if a new value is entered in this box, it is not transmitted to the tag (or PLC).
To get around this, I wrote a script which fires the value back at the tag. This is triggered on a property change for each numeric value box. This works but there is an issue when the pop-up is opened. It looks like the “property change” script runs before the “tag update” script. This results in the default value (0) being copied to the PLC which is less than ideal…
I’ve just tried adding a save button for each set point box (see attached screenshot). When the property change script is fired it now sets a flag which enables the save button. The save button then copies the value to the tag when clicked. However, the property change script is always triggered when the pop-up is opened which is annoying as this then lights up the save buttons for no reason.
Can anyone suggest a more elegant way of achieving the desired functionality? Essentially I just want to be able to type a number in a box and send it to the PLC.Is there a way of configuring my set point numeric input to just copy the value to the tag when it is changed (bi-directional)?
Thanks in advance!