Ignition Edge MySQL

Is there any way for an edge gateway to write to a MySQL database, or for it to have a query tag that read from a MySQL database, either locally or from a central full versioned ignition server?

If you make the database connection and query tag on the central Ignition gateway and then add it as a remote Tag Provider to the Edge Ignition gateway you’d be able to access the dataset.

Thanks Kevin, I need it to be able to write a log entry in the same MySQL database though, it sounds like I might need to use full-fledge ignition servers instead of the edge device.

If this would work for what you need, you can also add the Edge gateway as a remote tag provider on your central gateway and read data from it that way.

Yeah, the main thing I am attempting to do is set up a data entry station for water haulers. They put in their code, identifying data would be read from a MySQL database for display. They load water to their truck and when they are finished the Load data (time, driver, and load amount) would be submitted to a log MySQL table. I would have these remote stations at 10-20 locations all storing back to a main server. Edge was appealing to me because I was hoping to use the store and forward technique so if we had communication issues we wouldn’t lose the load data. I’m going to have to look into other alternatives now, I believe the full version of ignition will be cost prohibitive.

I feel your pain. The full version is hard to justify for small things and that’s scheduled to get significantly worse May 3rd.

I haven’t used Edge yet, and I’m not sure whether scripting restrictions would allow this without adding the scripting license to it, but something like following might work:

  • Central gateway as remote tag provider on Edge provides identifying data for all codes in a dataset or document.
  • Edge gateway looks up identifying data from that dataset so it’s quick and hopefully works when offline (might have to cache that data somehow, but I think it’d stay available when remote tag provider is offline–just bad quality).
  • Edge gateway logs load in local buffer. This could be an array of dataset tags, or possibly a dataset or document (again, unsure of scripting restrictions and what you need to store).
  • Central gateway with Edge gateway as remote tag provider grabs entries from log tag(s) and logs to SQL, then notifies Edge gateway (via remote tag provider) of retrieved logs to flush from buffer.

You’d probably want to add some kind of notification of buffer getting full to avoid data loss if the connection remains down for some time.