Question for HMI data real-timely update if using SQLBridge database


For some HMI widgets display (its data are come from PLC OPCUA server), we want to use SQL Bridge to store the PLC OPC tags in the database table, and HMI widgets retrieve the data from the table( Just want to isolate the link between PLC OPC tags and HMI widgets ).
Currently, we could only use the polling mode with some seconds interval to query the SQLBridge database table and fill the related data to the HMI widgets, as this is an indirect way, so the efficiency is very low. We also tried to use function system.db.refresh, but as we don’t know when the OPC data will be updated and written to SQLBridge database table, so this function seems can’t be used.

As we know that if we bind the OPC tag to HMI widget directly, any change in the OPC tag can be reflected on HMI widgets real-timely.

So is it possible to trigger the HMI widget’s data refresh real-timely by using the SQLBridge database like the way of binding OPC tag with HMI widgets directly?

Thanks in advance.

Create memory tags instead of OPC tags. Then, add items to your transaction with direction DB->OPC, but instead of pointing at OPC items, point at the memory tags. Make sure the DB target column for these items match the columns that get the values from OPC.

1 Like


That’s a smart way, it should work, thanks a lot :slight_smile: