I am new to scripting and wanted to return a value from a database using gateway event script timer. Here is my script…the syntax is wrong. Please help out! I am thinking I need to use a name query but not sure how to write that.
Cell01 = system.tag.readBlocking(["[default]CELL01/FOLDER01/TT01)"])
If (Cell01.value <> 0):
pWeight = SELECT CC.Weight FROM mytable01 CC
WHERE CC.active = 1 AND CC.tool_number = Cell01.value;