Title: Modbus RTU communication can be controlled by macro programming! [Print This Page] Author: ytliu Time: 2018-11-13 20:52 Title: Modbus RTU communication can be controlled by macro programming!
The following video link is an example of macro programming to control the output of the IO board via the MODBUS communication protocol: https://www.youtube.com/watch?v=N1j3Mvmh4fo
微信图片_20181113092417.jpg(391.02 KB, Down times: 921)
This video demonstrates the IO board output status of the standard modbus RTU protocol controlled by macro programming.
The English version of this handheld controller is DM500, which is based on the DDCSV2.1 software architecture and supports the MODBUS RTU communication protocol.
It can communicate with modbus devices through macro programming. The currently supported read/write function codes are:
Read function code:01H 02H 03H 04H
Write function code: 0FH 10H
The modbus protocol configuration parameters, read and write data, and response status can all be set or read by macro variables.
Note: If the IO board is an RS232 interface, it can be directly connected to the handset box, without conversion.
Upload the full MODBUS full macro address instructions later.
Attachment: DAM0404.nc
O000
(Modbus RTU control output macro program)
G04 P0
#1200 = 1230 (Send data macroaddress)
#1201 = 0 (Communication serial port 0)
#1202 = 1 (Slave ID)
#1204 = 1 (Number of coils)
#1205 = 1 (MODE: RTU)
(OUT1-OUT4 Turn on in turn)
#2=0
WHILE [#2 NE 4] DO3
#1203 = #2 (Starting address)
#1230 = 1 (Output state data)
#1209 = 1 (Trigger sending)
WHILE [#1209 NE 0] DO4 (Waiting for response success)
G04P0
END4
#2 = #2+1
G04P0
END3
(OUT1-OUT4 Turn off in turn)
#2=0
WHILE [#2 NE 4] DO5
#1203 = #2
#1230 = 0
#1209 = 1
WHILE [#1209 NE 0] DO6
G04P0
END6
#2 = #2+1
G04P0
END5
M30
Author: jjae6 Time: 2018-11-27 15:34
Hello Ytliu
Can you upload the MODBUS full macro address instructions ?, I need it for a project. Thanks. Author: enjoy_cnc Time: 2018-11-28 19:50
Hello jjae6
Is the DM500 handheld controller already in hand? In the past few days, I have sorted out the modbus detailed macro operation and sent it up.Author: jjae6 Time: 2018-11-29 03:50
HI enjoy_cnc.
I am going to buy it now, but while it arrives I would like to know all!
I need more examples to use in gcode this Modbus codes:
Read function code:01H 02H 03H 04H
Write function code: 0FH 10H (part of previous dm0404.nc file)
B/R
jjae6Author: enjoy_cnc Time: 2018-11-29 22:05 Last edited by enjoy_cnc In 2018-12-5 15:02 Editor
Hello jjae6
This is the DM500 modbus macro operation description. The description of the write operation has been updated. The description of the read operation is continuously updated...
Author: jjae6 Time: 2018-11-30 03:43
Thank you
We hope you have the manual with all Reading functions soon. Come on!! Cheers.Author: enjoy_cnc Time: 2018-11-30 15:16 DM500 Modbus Manual.pdf(977.33 KB, Down times: 1339)
2018-11-30 15:15 Uplaod
Click on the file name to download attach
DM500 Modbus Manual