Skip to main content
10-Marble
April 5, 2025
Solved

PLC to kepware and Mysql

  • April 5, 2025
  • 1 reply
  • 867 views

Hello,
I'm looking for a solution to retrieve data from an Omron NJ101-9000 controller and insert it into a MySQL server. I decided to test Kepware (KEPServerEX) to see if it can be used for this project.

So far, things are looking good — I downloaded the trial version of Kepserver, successfully scanned the controller's tags, and connected to the MySQL database via ODBC. Everything seems to be working, but I've encountered one issue.

The problem is that the data is being written to the database as shown in the 1 figure, even though I'm using the "Always Triggered" mode with a 5000 ms interval.

What I want is for the data to be written to the database like it's shown in the 2 figure.

 

1 Figure.

SZ_11156868_0-1743883937796.png

2 figure

SZ_11156868_1-1743884252576.png

 

The second option is the most suitable for me because the data will be read by Grafana.
So, could you please advise me on how to write data to the database in the way shown in the second example?

If I manage to get this working, I would be able to submit a request to the purchasing department to order the Kepware license, the Omron driver, and the DataLogger module.

 

Best answer by AKshara

Ensure the "Table Format" is selected as "Wide" under the device property editor.

Since, in  Wide format  - Each item gets its own column mapping: Each item gets its own map. Each row includes Numeric ID, Value, Time and Quality for every server item.

 -Thank You

 

1 reply

AKshara14-AlexandriteAnswer
14-Alexandrite
April 6, 2025

Ensure the "Table Format" is selected as "Wide" under the device property editor.

Since, in  Wide format  - Each item gets its own column mapping: Each item gets its own map. Each row includes Numeric ID, Value, Time and Quality for every server item.

 -Thank You

 

10-Marble
April 6, 2025

thank it is working how I want