and direct read

if I program something like this: if val==10: #do something

am I sure that the if clause gets a fresh value for tagPath, i.e. that the reads directly from the PLC and not from an Ignition internal cache?
My communication setup is

Thanks in advance

It does not. The SQLtags are read according to the scan class timing that’s been set up. will retrieve the most recently read value. You need to use system.opc.readValue() to bypass the SQLtag system to read precisely when you ask.