How-to
Managing recipes on Ignition Edge without a database
Short answer
Yes. Keep the recipe set on the Edge gateway itself — a dataset tag or a JSON file loaded by a script — look it up by tool ID, and write the resolved values to the Siemens PLC behind a request/accept handshake so PLC logic, not the HMI, decides when the new settings go active.
On this page
You can run tool-ID recipes on Ignition Edge with no database behind them. Keep the recipe table in a dataset tag — persistent, CSV-exportable, and small — or in a JSON file that a script module loads and saves. Resolve the tool ID against an explicit key column, write the resolved values into the PLC-facing tags, and let the Siemens PLC accept them through a request/accept handshake before they become active machine settings. Transaction groups and external database connections are what Edge leaves out; recipe storage is not.
What Edge has instead of a database #
An Edge gateway as deployed here has no database connection, so the SQL Bridge transaction groups that would normally map tags to database rows are not available. The recipe store has to live in the gateway itself, and it can: memory and dataset tags are persistent, held in the gateway's internal database rather than in RAM. The tag historian on Edge also writes locally rather than to an external connection — where the Ignition Edge tag historian writes its data covers that side of the platform.
Two documented behaviors shape the design:
- Very large documents or very large dataset memory tags can outgrow the internal database. The persisted-tag store is a gateway file, valueStore.idb, and there are reports of gateways that would not start until that file was deleted — which discards the persisted values it holds. That is the strongest argument for keeping a CSV export of the recipe table at all times.
- Dataset tags containing Date or DateTime column types have been reported to lose their values across a gateway restart. A recipe table has no use for them anyway: an integer tool ID plus numeric and string settings covers the welding case.
Choose the store #
| Store | Choose it when | Design rules |
|---|---|---|
| Dataset tag | Recipes form a modest table that changes rarely — the welding case | Tool ID as an explicit key column; no Date or DateTime columns; CSV export kept current |
| JSON file loaded by a script | You need structured records, controlled editing, or a versionable file | Validate on load; write to a fresh file and swap it in; fail closed on a missing or malformed file |
| Siemens PLC data blocks | The PLC program already owns the recipe records | Edge sends only the tool ID; the PLC resolves the record and acknowledges it |
For a tool-ID-keyed welding table, the dataset tag is the right default: inspectable in the tag editor, editable by engineering, and exportable to CSV for backup. Take the JSON file route when you need its structure or edit control; take the PLC route only when the PLC already owns the recipes.
A script dictionary makes lookup convenient, but its contents are memory only. Persist every edit to the file, and decide what the running project does when a save fails — reject the edit and tell the operator, rather than carry an unsaved change.
Key the recipe on the tool ID #
Use the tool ID as an explicit lookup key, never row position or display order; both change the moment someone sorts the table. Reject an unknown ID with an operator-visible fault rather than falling back to a default recipe — on a welder, quietly running the wrong schedule damages parts and tooling faster than a stopped station does.
Before any PLC write, check that the record exists, that every field is present with the expected type, and that each value sits inside the range the welding process allows. Those limits come from the machine specification or the existing PLC logic; carry them into the script as explicit bounds instead of trusting the stored data.
Hand the values to the PLC through a handshake #
Keep selection and activation separate: Edge resolves and stages, the PLC decides. Writing several tags independently leaves a window where the PLC sees a mixture of old and new settings, so use a request/accept sequence — stage all fields into the PLC-facing tags, raise the request, and have the PLC validate the set, copy it to the active settings at a safe point in its cycle, and return accepted or fault. Show the operator success only on accepted; a completed write says nothing about what the machine actually applied.
If the machine's program already contains a request, busy, accepted or fault sequence, use it as designed. If it does not, agree the sequence with the controls engineer before writing code — the tag names and timing belong to the project's tag map and PLC design.
Build it in six steps #
- Record the tool-ID source (operator entry, scanner, or PLC input), the recipe fields, the destination data blocks in the Siemens PLC, and the PLC's existing apply sequence.
- Build the recipe store: a dataset tag with the tool ID as its key column and one column per setting, loaded from CSV.
- Write the lookup as a script: parse the ID, find the record, validate every field against its range, and return a fault for an unknown ID or an out-of-range value before anything is written.
- Stage the resolved values into the PLC-facing tags, then raise the request; clear it on accepted or fault, exactly as the PLC sequence defines.
- Test four cases: a known ID, an unknown ID, a request made mid-cycle, and a gateway restart followed by another selection.
- Export the dataset to CSV — or copy the JSON file — restore it to a test gateway, and repeat the known-ID check before the station goes live.
Size the store before you worry about it #
Illustrative numbers for one station: 38 welded parts, each with its own tool and 11 settings per recipe. The dataset is 38 rows × (1 ID + 11 settings) = 38 × 12 = 456 cells. Exported to CSV at a generous 20 characters per cell plus separators, that is 456 × 21 = 9,576 characters, about 10 kB; at a realistic 6 characters per cell it is 456 × 7 = 3,192 characters, about 3 kB. Double the part count and the worst case is 76 × 12 × 21 = 19,152 characters, about 19 kB.
The internal-store failures on record involve very large dataset tags — orders of magnitude beyond a few hundred cells — so size is not the constraint at this scale. Decision: pick the dataset tag and stop there; the JSON file earns its keep only when you need its structure, and the PLC store only when the PLC already owns the data.
What this design is not #
A dataset tag or a JSON file is not a transaction system. Editing the store, writing the PLC, and the PLC accepting the set are three events that fail independently: the backup covers loss, validation covers bad data, and the handshake covers timing — none of them substitutes for another. Treat the accepted signal as the only statement of what the machine is running, and keep the CSV export somewhere other than the panel PC's own disk so a failed drive cannot take the only copy of the recipes with it.
Questions asked
Do dataset tags keep their values after a gateway restart on Edge?
Memory and dataset tags are persistent — they are held in the gateway's internal database, not RAM. Two limits apply: very large dataset tags can outgrow that store, and Date or DateTime columns have been reported to lose values after a restart. If a restart ever leaves the recipe dataset empty, re-import the CSV export rather than retyping records, which is why the export stays current.
Why not keep the recipes in the Siemens PLC and skip the gateway store?
That works, and plants ran welding recipes that way before Ignition, but every edit then happens in PLC memory with no CSV export and no file to version, and changing a weld schedule means a PLC project change. Choose it when the PLC program already owns the recipe records; then Edge only sends the tool ID and displays the accepted values.
How do I back up recipes when there is no database?
Export the dataset tag to CSV — or copy the JSON file — after every approved change, and keep a copy off the panel PC. The worked example's whole table is about 3 kB, so backups cost nothing, and the export is the only copy that survives a failed gateway store.
Can I use a Python persistence library like TinyDB on Edge?
TinyDB came up as preliminary testing around the Ignition 8 release, not as a supported path. Any third-party store must be proven on the deployed Edge version through a full save, restart and corrupted-file cycle before it carries recipes; the dataset tag and JSON file routes already meet a tool-ID table with far less to prove.
What happens if a second recipe is requested while one is still being accepted?
The handshake serializes it. The PLC signals busy, and the Edge script holds the second request until the first returns accepted or fault. Without that guard, two sets of writes can interleave and the PLC could activate a mixture of two recipes.