Popup

Hi guys, I am trying to create a popup and pass parameters. I have attached some screen shots showing script and error. I need to pass OPC tags into parameters, looking into it I think the script is passing the value and the data quality (good), so it cannot convert good to integer. Am I going about this the right way?

Ver 7.5.0 and Controllogix over OPC UA.

thx
hazey




You are trying to pass in a tag value so you need to use the system.tag.getTagValue function:system.nav.openWindow("Popups/T_JET_02E_Popup", {"Mode" : system.tag.getTagValue("UGLPLC/Global/SJetFanOut/SJetFanOut_2_/Mode"}) system.nav.centerWindow("Popups/T_JET_02E_Popup")

Travis Yes sorry the script I tried was system.tag.read, but the script returns [9, Good] as the value. Appears it is has wrapped the data quality into it.

So I must use system.tag.getTagValue?

thx

hazey

You can use either system.tag.getTagValue(), or system.tag.read().value.

Right, as James outlined if you use system.tag.read you must do the following:system.tag.read("path/to/tag").valueSince this function returns the value, quality and timestamp.