I am trying to write a component script that will either display a message box or write a value to a tag based on the value of another tag. Here is what I have as of now:
if ‘[edge]PLC_3010_SJD_2/Test_Tag.value’ <> 0:
system.gui.messageBox(‘Pump Change Already in Progress… Please wait’)
if system.gui.confirm("Are you sure you want to start system?","Confirm",1): tagpath ='[edge]PLC_3010_SJD_2/Controller:Global/F_3010_LSP_15' + event.source.parent.pump_number + '0_HMI_start' value = 1 system.tag.write(tagpath, value) else: end
The second if statement writing the value to a tag works fine. The initial if statement doesn’t seem to care what the value of the “Test_Tag” is. I am assuming I have the syntax wrong for "referencing a tag value, but I have not been able to find what the correct syntax is, or if its possible.