Hey guys,
I’m starting to fool around with doing some recipe loading from a database via Ignition transaction groups. I got everything working except for a failure indication.
I’m selecting a recipe number from a OPC tag and then running a custom where clause on the database:
Recipe_ndx = {[~]Recipe Number}
when the Recipe_ndx number exists it loads the recipe and pushed it down to the PLC fine, I also have a handshake on success bit set and that works good too.
The problem is when the Recipe_ndx number does not exist, i.e. someone puts in a recipe number that is not in the database. I would like to indicate on the PLC that the recipe did not exist and was not loaded and I thought I could do it with the handshake on fail option but that doesn’t work. Even when there is no recipe loaded the handshake on success bit still comes on. Is there a way to set a PLC bit if the SQL query is invalid (no Recipe_ndx number match)?