Monitor a SQL Response Table for Change

In a loosely-coupled system like this, I don’t think you have an alternative to setting a value and polling for a response. In any case polling a database works perfectly well unless you need a response time in the milliseconds range.

I would put this is in a gateway Tag Change script. On the PLC trigger issue your write, then enter a loop and poll for a response, timing out if it takes too long. When you pause, remember to use something like system.util.invokeLater() as per this post.