Today is...
Friday, November 24, 2017
Welcome to Control.com, the global online
community of automation professionals.
Featured Video...
Featured Video
A tutorial introduction to programming using the QuickBuilder Programming Environment.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive
Writing Modbus Values to an ODBC Database
How to write Modbus values in an ODBC database?
By Tachaqourrt on 30 May, 2017 - 3:16 am

Hi,

I am a student currently in an internship, and i've been asked to test writing modbus TCP values to an odbc database. except that after researching all over the net for a right way to actually do it, i didn't find much help nor directions about a software that'll let me communicate with the database.

So my question is: If you've been asked to handle a write/read modbus TCP connection with an odbc database, how would you test it? and which software would you use to easily write in the database?

Thanks in advance.

There are many products that can write data from a Modbus Driver to a Relational Database using ODBC. Two that come to mind are Kepware's KEPServerEX that has both a MODBUS Driver and an ODBC Data Logger option. Ocean Data System's Dream Report that also includes Modbus, an ODBC datalogger function, and the bonus of lots of report and dashboard generation for any statistics and KPIs that you may want.

Hello,

>There are many products that can write data from a Modbus
>Driver to a Relational Database using ODBC. Two that come to
>mind...

And another is PeakHMI.

Regards,

Mark
http://www.peakhmi.com/

1 out of 1 members thought this post was helpful...

You could do this with Mango Automation. https://infiniteautomation.com/. there is a free version for personal and education use.

You can do it a few different way.

1. Create the Modbus Data Points to read the registers you want. See here for more information: https://help.infiniteautomation.com/configuring-data-sources-and-data-points/

2.Next you can add a SQL data source and data points to insert the values into the database.

3. use Point Links so that when the values change from the Modbus Data Points they get sent to the SQL data soruce and inserted into the database.

There are help documents inside the application once you get it installed.

This is a bit of an old video but it does show you how to configure the SQL database inserts: https://vimeo.com/78754193

Hi,

Here is a good tutorial:

http://www.aggsoft.com/tcpip-data-logger/tutorials/modbus-tcp-power-meter-data-logging.htm

By Tachaqourrt on 1 June, 2017 - 3:41 am

Thanks for all of your replies,

I checked most of the software you've replied me with. i especially liked mango, but the problem with it is that i don't have concrete devices to connect with it. my tests use mostly slave simulators and most of these software don't recognize the nature of the slaves so i can't even write data nor read it.

@x_art
I already tried working the aggsoft TCP/IP, logger but it can't even connect to one single ip address when i define it even though the ip address is 100% legit. it always says that the IP address is locked do you know how to fix this issue?

Select the "TCP client" mode. An example is here:
http://www.aggsoft.com/asdl-modbus-control-filter.htm

By Tachaqourrt on 1 June, 2017 - 4:02 am

Forget what i just said x-art i managed to create a connection but do you know how to actually send a data frame from the TCP/IP's Data logger to the slave?

I've read the datasheet of the logger, but they don't precise the exact way of doing it. and i'm not familiar with most of the configuration options they propose.

You can also use Mango as a Modbus simulator as well. The process would be to create a virtual data source with "settable" data points. Then you can add the Modbus Publisher to expose the data points as Modbus IP. Then from your other Mango instance you can read and write to it. You can run more than one Mango instance on a computer as long as they are configured for different ports in the /classes/env.properties file. There is a really good support forum for Mango that you can ask for more detailed help: https://forum.infiniteautomation.com/

Also, as a student, you will find this online course helpful https://bin95.com/opc-scada-training.htm