I need your advice to solve a problem.
This is the thing, I have to run a comparison in a TG between a value coming from a PLC and a value coming from a DB. If those values are not equals There are few tasks I have to run in certain order. Mainly all the tasks are updates/adds in the DB. The number of tasks could change depending of the result of the previous task.
I tried to solve this problem using expression but It’s complicate run multiple queries in the same item, I tried nesting ifs but it’s hard to catch errors doing that.
I would like to know if you faced a similar situation and how did you tackle the problem.
That was an option but I wanted to see if there is a way to solve the problem using expression.
Another option I have been thinking of is to create a store procedure in the DB and call it from the TG.