Need to trigger a PLC alarm if database not logging data

Hi, My employer has setup where several compactlogix PLC’s write data to SQL database. There are two software packages that collect the data XL Reporter and HeidiSQL. How the data is pulled from the PLC’s I have not found yet. There are for example no SQL commands that I can find. If HMI I have yet to review if being done from them.
What I need to figure out is how to prevent the machine from running if either of the software packages (XL reporter or HeidiSQL) is not recording data. Ideally I need a method that I can pull data from the software app back to the PLC. My goal would be to locate the tag(s)and data that was sent to database if not the same to what is sent back then I would create an alarm preventing future cycles until database data collection or if communications issues with the server were solved. I was wondering if the experts at SolisPLC have any suggestions to products or ideas. Thank you

It sounds like it may be sending the data to the database using OPC/DDE.

Look at RSLinx. It must be RSLinx Classic OEM or RSLinx Classic Gateway to use OPC/DDE. Look at the DDE/OPC drop down menu at the top of the screen. Selecting “Active Topics/Items” should give you a list of Topics that are currently active and the tags that they are servicing.

Your database uses these topics to read the value of the PLC tags. The database should be able to write a value to a PLC tag as well. You can set up a boolean tag in the PLC to stop the process if the database is not recording data.
You will need to assign the value (0 or 1) in the database and write it to the PLC tag via the OPC/DDE Topic.

I set up a system to record tag values from a number of different PLCs on a network into an Excel spreadsheet.

I know that you can also use OPC/DDE Topics to record data in an SQL database as well. I am not sure how to do that, but you can find the information online. I hope that this gives you a starting point for researching a solution.

1 Like