Modbus RTU communication can be controlled by macro programming! - DM500 - Handheld 3-4 Axis CNC Moiton Contr - Digital Dream Technology support
View: 7226|Reply: 8
Print Previous Topic Next Topic

Modbus RTU communication can be controlled by macro programming!

[Copy Link]

8

Threads

333

Posts

1040

Credits

Super Moderator

Rank: 8Rank: 8

Credits
1040
Jump to the specified floor
Landlord
Posted at 2018-11-13 20:52:51 | All floors Replies reward |Descending browser |Read mode


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


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

Reply

Use props Report

You need to log in before you can reply Login | Register now

This forum Credits Rules

Shenzhen Digital Dream Numerical Technology Co., Ltd. support
Adress:507,A Building,Leibo Industry Zone,No. 22 Jinxiu East Road,Kengzi Street,Pingshan district,Shenzhen City,P.R. of China
Phone:13244704799
E-mail:info@ddcnc.com

TEL

0755-87654321

Wchat

Website designed by DigitalDream Technology Support
Quick Reply Back to top Back to list