IMD SolutionComputing LibraryShop main store

Explainer

HMI without SQL client: put the database writes on an edge PC

Edge computing and IIoT Published 6 min read By IMD Solution engineering team

Short answer

The greyed-out SQL Query is the model's feature set, not a project setting: EasyBuilder Pro lists its supporting models in the manual's appendix, and no option or update adds the function to an unsupported panel. Keep the HMI as the operator interface and give the SQL session to one edge box PC, gateway or PC-based SCADA host, using a handshake where one PLC request yields one transaction and one completion.

On this page
  1. The greyed-out function is the model's feature set
  2. Keep three roles on three devices
  3. The handshake: one request, one completion
  4. Choosing the device that owns the session
  5. Checking why V6.10.0 leaves SQL Query greyed out on the cMT2108X2(V2)
  6. Prove one request makes one row before production
  7. The decision for each case
  8. Questions asked

Your SQL Query is greyed out because the project's target model does not include that feature, not because a setting is off. EasyBuilder Pro ships the function inside the software and documents which models support it; a panel outside that list stays without it at any software version. The robust answer for a line that already has Ethernet between PLC, HMI and IT: keep your cMT2108X2(V2) as the operator interface and give the database session to one separate SQL-capable device, an edge box PC in the cabinet. The controller then runs a short handshake with that device in which one request produces exactly one transaction and one completion, instead of stretching PLC logic into database work.

The greyed-out function is the model's feature set #

EasyBuilder Pro's object chapter for SQL Query refers you to Appendix A of the user manual for the supported models and OS versions, and the Database Server manual names the software version that feature arrived in. Read together, the two documents define availability: the function ships in the engineering software and unlocks only for a project whose target model is on the supporting list.

A greyed-out SQL Query with your model selected as the target is therefore the software stating a fact about the hardware. No project option, reinstall or update changes it, and there is nothing to enable. The function becomes selectable only when a project targets a model from that list.

Keep three roles on three devices #

The panel keeps the operator role, with screens, alarms and setpoints over Ethernet, exactly as it does today. Your Omron NX/NJ controller keeps machine control and the deterministic logic; session handling has variable latency and belongs nowhere in a control task. A third device owns the SQL session and nothing else. That division is already worked through in what an industrial PC does when a PLC and HMI already exist: control stays in the controller, the operator stays on the panel, and the data path moves to the PC.

The handshake: one request, one completion #

The controller and the client exchange a small interface block over Ethernet: the values to store, room for values to retrieve, a request state, a completion state, an error state and a transaction identifier. Every transaction runs the same five steps:

  1. The PLC writes the payload, then raises the request as a rising edge or a new transaction identifier, never a bit that stays on.
  2. The client detects the new request, reads the whole payload once and confirms every field is present and typed as mapped.
  3. The client runs one fixed command with typed parameters through its own SQL session.
  4. The client writes the outcome back: completion on success, or the error state with a code, plus any retrieved values with a validity flag.
  5. The PLC clears the request; the next transaction requires a new transition or identifier.

The edge matters because a level-held request bit is re-executed at every client scan: a button held for a moment becomes a stream of duplicate inserts. Returned values written into control tags without a validity flag expose the controller to stale or partial data. One transition, one row, one answer.

Control logic must run identically whether the database answers or not: a stopped database stops logging, never the machine, so no motion permit or safety decision may depend on the SQL completion.

Choosing the device that owns the session #

Three candidates can own the session. An HMI model from the manual's supported list hosts the client inside the panel, at the price of re-targeting or rebuilding the project and re-verifying every screen and driver. A gateway qualifies only when it truly runs a database client; one that merely forwards needs an HTTP endpoint on the IT side to write the database, the arrangement explained in why an edge gateway needs an HTTP endpoint to write a database. A PC, whether an edge box PC or a PC-based SCADA host, runs a full SQL client with readable logs and real error strings.

For your case, with Ethernet already in place and the controller already exchanging data with the panel, the decision is a single industrial mini PC in the cabinet as the SQL client: the HMI project stays untouched and IT gets the connection details and error reporting a panel cannot provide. Once that client exists, whether it should reach SQL Server through a REST API or direct database access is the next design question, covered in PLC to SQL Server: REST API or direct database access.

Checking why V6.10.0 leaves SQL Query greyed out on the cMT2108X2(V2) #

The inputs, and where each comes from:

  • Project software: EasyBuilder Pro V6.10.0, from your project details.
  • Project target model: cMT2108X2(V2), from your project details.
  • Symptom: SQL Query and Database Server greyed out in the project, your observation.
  • Documented minimum for Database Server: EasyBuilder Pro V5.03.01 and later, from the Database Server manual.
  • Documented model support for SQL Query: Appendix A of the EasyBuilder Pro user manual.

The rule, in words: a documented function is selectable when two conditions both hold, the installed software meets the documented minimum version, and the project's target model is on the function's supported-model list. A greyed-out function means at least one condition fails.

The arithmetic: compare the version numbers field by field, major first. Installed 6.10.0 against minimum 5.03.01, major 6 against major 5, and 6 is greater than 5, so the installed version exceeds the minimum without needing the minor or patch fields. The version condition is met.

The result: the version is not the blocker. With the version condition met and the function still greyed out, the failing condition is the model list. The target is not among the supported models, which is exactly what the greyed-out function reports.

The decision, with its threshold: if the target model is on the Appendix A list, the function becomes selectable and that HMI can own the SQL session. When it is not, as in your case, no update unlocks it: stop searching the settings, keep the panel as the interface, and put the session on the edge PC.

Prove one request makes one row before production #

Commission the data path with a known test record. Put recognizable values in the payload, for example a fixed test part number and a count, and issue exactly one request from the PLC, then count: one request, one insert, one completion, and a new row whose fields equal the payload. Run the read path the same way and compare the returned values against the known record; run required updates or deletions against controlled test rows and verify the affected data. Match every mapped field to its table column type, numeric, text or date/time, so a schema mismatch surfaces on the bench and not on the night shift.

The decision for each case #

  • The panel is already in the machine and SQL is now required: keep it untouched, add one edge box PC as the client, and run the five-step handshake over the Ethernet you already have.
  • A new project must query from the panel itself: choose a model from the manual's supported list, create a project with that exact target, and confirm the SQL function is selectable before the first screen is built.
  • The PLC is currently stretched into data handling: retire that logic into the interface block, because the payload, the retrieved values, the three state bits and the transaction identifier are all the controller keeps.

In every case the panel does what it is built for, the controller stays deterministic, and one identifiable device owns the SQL session.

Questions asked

Where do the SQL client's connection details come from?

From your database administrator, defined per site: the server address, database name, authentication method, the tables and columns the client may touch, and which operations it may run. No defaults exist for an installation, and none should be guessed at commissioning. The client device holds these settings; the PLC interface block carries only payload and handshake bits, never credentials.

What permissions should the database account have?

Only what the application needs: the required operations on the required tables and nothing beyond them. Fixed command structures with typed values prevent quoting errors and keep operator-entered text from ever becoming part of a command. When the connection succeeds but a write is rejected, look for a missing grant on that table before blaming the handshake.

How do I test the failure path before production?

Stop the database service or pull the client's network cable, then issue one request from the PLC. Confirm the error state returns to the controller, the control logic keeps cycling, and no transaction executes. Restore the path, clear the failed request through the handshake, and verify the retry creates exactly one row; the transaction identifier is what lets the client reject a repeat of the same request.

Can the panel still show data retrieved from the database?

Yes, indirectly. The client writes retrieved values into the PLC interface block with a validity flag, and the panel shows them like any other PLC tag: it never sees the database, only the result. That is also the clean route for order or recipe data on the operator screen. The PLC requests it, the client fetches it, the panel displays it.

Keep reading

  • How-to

    Bridging OPC UA PLC data to MQTT with an edge PC

    Keep the OPC UA server on the PLC side and give MQTT publishing its own role on a separate edge PC that acts as the OPC UA client and MQTT publisher. Commission the two links independently — first a verified tag read, then a verified subscriber message — and only then widen the tag set.

    Edge computing and IIoT

  • Comparison

    Getting Wonderware Historian data into Ignition Edge for MQTT

    Yes — Ignition Edge can publish this data as MQTT Sparkplug, but through two separate routes. Live values come from the existing DAServer acquisition layer behind a DA-to-UA gateway, because Edge's OPC client is UA-only. History and aggregates come from SQL queries against the Historian Runtime database, using its documented stored procedures.

    Edge computing and IIoT

  • How-to

    Sending PLC data to an IoT hub without custom software

    You do not need custom software to move PLC data to an IoT hub: a configurable edge package with an S7, Modbus TCP or EtherNet/IP driver, a channel mapping and an MQTT publisher replaces hand-written acquisition code. Verify two things before you commit: the driver covers the protocol your controller actually speaks, and the publisher covers the destination's authentication and message format. Software still does the work — you configure it instead of writing it.

    Edge computing and IIoT

Why InfluxDB asynchronous writes never land in the bucket