contact
support
Download
order
news
AGG Software Forums
November 23, 2024, 06:31:13 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Welcome on our forum!
Home
Help
Search
Login
Register
AGG Software Forums
>
Online Help Center
>
Data loggers and plug-ins
>
MODBUS RTU to My SQL
Pages: [
1
]
« previous
next »
Print
Author
Topic: MODBUS RTU to My SQL (Read 25034 times)
japras
Newbie
Karma: +0/-0
Posts: 4
MODBUS RTU to My SQL
«
on:
January 09, 2019, 02:05:59 PM »
hello,
i am new to this software. what i want to do is take data from my PLC using modbus RTU and to put it into SQL database.
I will highly appreciate if someone has managed to do this, to tell me how you managed to do it.
i am currently upto the stage where i have successfully managed to do a data query.
the response is as expected:
#01#03#0C#42#9A#00#00#42#A0#00#00#42#A4#00#00#C7#2A
first part: 01 = slave ID
second part: 03 = function code
third part: 0C = number of registers to read
fourth part: 42 9A 00 00 = value of register that i want = 77 decimal
fifth part: 42 A0 00 00 = 80 decimal
Note: my data type is 32 bit single floating point, with big endian format
my question is, what is next for me to do?
- i tried to get these data to go into excel first but so far the data that is outputted to excel is gibberish
- I am guessing my issue is with the parsing stage? because i guess that is the part that converts the hex to a decimal number?
much appreciated.
modbus.gif
(161.23 KB, 1226x800 - viewed 3 times.)
modbus2.gif
(84.58 KB, 600x1080 - viewed 4 times.)
modbus3.gif
(64.9 KB, 660x558 - viewed 2 times.)
modbus4.gif
(184.59 KB, 1624x508 - viewed 5 times.)
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
Karma: +0/-0
Posts: 806
Re: MODBUS RTU to My SQL
«
Reply #1 on:
January 09, 2019, 02:30:23 PM »
Hello,
1. Address - it looks like offset. Please, try it.
2. Set Offset to -1. In this case, the program will calculate it automatically for sequential items.
3. Count - I think it should be "1".
Tutorial:
http://www.aggsoft.com/serial-data-logger/tutorials/modbus-polling-1.htm
Logged
japras
Newbie
Karma: +0/-0
Posts: 4
Re: MODBUS RTU to My SQL
«
Reply #2 on:
January 09, 2019, 06:17:04 PM »
Hi Arthur!
thanks very much. i finally found the solution and it was exactly as you said. i ended up trying all offsets between -1 and 8 and finally found out the correct address.
thank you very much sir! you are amazing
Logged
japras
Newbie
Karma: +0/-0
Posts: 4
Re: MODBUS RTU to My SQL
«
Reply #3 on:
January 27, 2020, 01:37:39 PM »
Hello Arthur, or other kind users,
i want to ask with this advanced serial data logger software:
- i have multiple machines that talk to a central modbus master, which is this advanced serial data logger
- right now if i have 2 devices for example with modbus ID 2 and modbus ID 3, i am able to get the data to parse just fine, using the same parsing variable name e.g. "ITEM1" but i am having issue with the ODBC module because it seems that i am unable to use the same "ITEM1"
- is it possible with the "modbusRTU" module, to set up multiple queries but then the data goes into the same variable name in the response items.
thank you .
question.png
(23.7 KB, 510x724 - viewed 3 times.)
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
Karma: +0/-0
Posts: 806
Re: MODBUS RTU to My SQL
«
Reply #4 on:
January 27, 2020, 02:11:13 PM »
In your case, you should define separate request for each device and disable the "Export data for all requests at once" option.
Logged
japras
Newbie
Karma: +0/-0
Posts: 4
Re: MODBUS RTU to My SQL
«
Reply #5 on:
January 28, 2020, 02:37:16 PM »
YOU ARE A GENIUS! THAT IMMEDIATELY MAKES IT WORK!
WOW YOU ARE TRULY LIFESAVER. I HAVE SPENT ALMOST 10 HOURS TRYING TO FIGURE THIS PROBLEM OUT. you solved it immediately. thank you very much, good sir!
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
News & Feedbacks
-----------------------------
=> News and Updates
=> Site Comments
-----------------------------
Online Help Center
-----------------------------
=> Advanced Serial Port Monitor
=> Data loggers and plug-ins
=> Data loggers ActiveX
=> Advanced USB Port Monitor
=> Virtual Null Modem
=> Software for DNC and CNC
=> Other questions
-----------------------------
Development
-----------------------------
=> Feature Requests
Loading...