How to implement this
-
I have some machines using a modified modbus to comunicate with a server. The server has all the information and save points in a data base.
How can I connect it with Mango?
An idea is to make my server talk IP Modbus in a new port and connect Mango to it using a Data Source.
Other idea is create my own Data Source type and talk to the server in this language.
Which one is a better approach? Other ideas?
Thanks
-
What's a "modified modbus"? Just out of curiosity...
You could have Mango talk directly to your machines. If you want to keep your server, probably easiest would be to use Modbus IP as you suggest. Creating your own data source is not a simple matter in Mango M2M.
One alternate is to have Mango pull data directly from your database using the SQL data source.
-
Could you giveme an example of how to get the data from a MySQL data base?
-
Check out the online documentation. There are examples in there.
-
Thanks,
I'm having problems with the Connection string parameter. Could you provide an exmaple of it? It's not clear in the on line docs.
-
jdbc:mysql://localhost/mango
Also, see here: http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-properties.html
-
I have connection to the DB!
I'm using this statement:
select id, ea1, timestamp from valores;
But seems not to work. I get an error refearing an excesive package size.
If I use this statement:
select id, ea1, timestamp from valores limite 1;
I do get a value.
As explained in the on line doc, id is a row id, ea1 a value and timestamp the time the value was recorded.