Another Noob Question: Disable Tag History Programmatically, Project wide

I have an electric smoker controller application that is using Maker for a front end/historian. Within a UDT I have several tags with history enabled to a MariaDB on another computer.

Ignition gateway is on my main PC, and while on, can get data from CoDeSys on Rasberry Pi. However I really don’t need to be logging to MariaDB two thermocouple temperatures in my garage all day every day while my PC is on.

What is best practice to just disable Maria DB logging for the project, so that I can turn it on/off whenever I am actively using/not using the smoker?

I looked for a system tag that might accomplish it. But did not see one.

I suppose I could link to ‘history enabled’ for each of those tags within the UDT? Would it then remember the provider, and deadband settings etc…?

Some pictures from last tuning run.

You could use a “Driven Tag Group” with the driving expression linked to a tag or expression that indicates your smoker is running. Setting the slow rate for this tag group to 0 will prevent it from scanning (and as a result stop tag history). You can then use this tag group as the tag history scan class. For this to work you would need to set each tag’s tag history “Sample Mode” to “Tag Group” and then set your “Historical Tag Group” to your new driven tag group. There are definitely other ways to accomplish this but this was the least convoluted option that popped into my head.

I’ll take my payment in brisket :drooling_face:

5 Likes

Thanks for the reply. I’ll look into it.

Other option I though of was to just turn off the R-Pi. The [Device] would then be off-line, that’s gotta stop logging? No? I dunno enough about Ignition to say for sure.

Another option I thought of would be to just manually disable the DB connection. Then I’ll need to remember to put it back.

Decisions.

Hi @S1ack,

This would stop the data from logging to your DB, but because you are running Ignition on your main PC and tags/historian are Gateway scoped, it would still be attempting to log and would likely cause a bunch of errors in your Gateway event logs.

Same as above really, the Gateway will still attempt to log, but it has nowhere to log too which will throw a bunch of errors.

For this to be effective you would have to shutdown your main PC, or you could stop the Gateway service running on it. @WillMT10's option looks to be the most appropriate and is similar to what popped into my head initially (all credit goes to @WillMT10, I'm just hanging on to the coat-tails :slight_smile:)

1 Like

Disabling the DB Connection also won’t work because store and forward caching would come into play. It would cache as much history as it is allowed to cache (dropping off older data if it fills up) and then insert the cached data into your DB once you re-enable the DB connection.

2 Likes