benw
December 13, 2021, 4:22am
1
Hi All,
Just wondering if there's any way to grab and pass the error from a transaction group into a tag for the purpose of displaying on the screen?
Example below of what I'm referring to:
SQL to throwing back the invalid fill ID fault and I want to pass that out onto an Ignition display if possible.
Appreciate any insight.
Thanks
Edit:- Same issue raised below but didn't seem to get much of a response:
I Need to get the error message from and SP or a Transaction and use it with Ignition. for example.
if we have a duplicate fail insert, i want to catch that error , identify it, and then display an error message box saying ’ Can’t insert a duplicate name’. if the error was for example something different, then do the same and display a different message like for example: ‘Can’t insert the a negative value into Cases amount’.
a way to do this would be to pass the Message Error into an Out param…
pturmel
December 13, 2021, 4:27am
2
If you can have such execution problems, I would re-implement the transaction group as a gateway tag change script. Within a script, you can capture then do whatever you like with exceptions.
Edit: See "case 3" in this topic for ideas:
Ok. I use multiple techniques depending on the client’s needs and trust in hardware at various points along the chain.
In all cases, I avoid triggering on booleans, and I avoid writing any given value from more than one direction. I like to use small integers as triggers–increment to trigger, rolling over naturally, but skipping zero. Sometimes an LINT timestamp is a natural trigger (Logix UTC wallclock µs or Omron clock ns, perhaps).
Case 1: Fire and Forget
Sometimes one just wants produc…
1 Like
benw
December 17, 2021, 1:34am
3
Is this still relevant if it’s a stored procedure transaction? I’ll go down this path if it is.
Thanks
pturmel
December 17, 2021, 2:14am
4
Yes. Scripts can run DB stored procedures.