Skip to content

Commit ba65e41

Browse files
authored
Merge pull request #3446 from BsAtHome/backport_2.9_hm2_modbus
Backport: hm2_modbus driver
2 parents 76645f9 + 9be0f54 commit ba65e41

21 files changed

Lines changed: 6666 additions & 2 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.mbccb
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
[EMC]
2+
# The version string for this INI file.
3+
VERSION = 1.1
4+
# Name of machine, for use with display, etc.
5+
MACHINE = HM2-Stepper+Modbus+BLDC
6+
# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
7+
#DEBUG = 0x00000003
8+
#DEBUG = 0x00000007
9+
DEBUG = 0
10+
11+
[DISPLAY]
12+
# Name of display program, e.g., tklinuxcnc
13+
#DISPLAY = tklinuxcnc
14+
DISPLAY = axis
15+
# Cycle time, in seconds, that display will sleep between polls
16+
CYCLE_TIME = 0.0500
17+
# Path to help file
18+
HELP_FILE = tklinuxcnc.txt
19+
# Initial display setting for position, RELATIVE or MACHINE
20+
POSITION_OFFSET = RELATIVE
21+
# Initial display setting for position, COMMANDED or ACTUAL
22+
POSITION_FEEDBACK = ACTUAL
23+
# Highest value that will be allowed for feed override, 1.0 = 100%
24+
MAX_FEED_OVERRIDE = 1.5
25+
# Prefix to be used
26+
PROGRAM_PREFIX = ../../nc_files/
27+
# Introductory graphic
28+
INTRO_GRAPHIC = linuxcnc.gif
29+
INTRO_TIME = 5
30+
31+
[FILTER]
32+
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
33+
PROGRAM_EXTENSION = .py Python Script
34+
png = image-to-gcode
35+
gif = image-to-gcode
36+
jpg = image-to-gcode
37+
py = python3
38+
39+
[RS274NGC]
40+
# File containing interpreter variables
41+
PARAMETER_FILE = hm2-stepper.var
42+
43+
[EMCMOT]
44+
EMCMOT = motmod
45+
# Timeout for comm to emcmot, in seconds
46+
COMM_TIMEOUT = 1.0
47+
# Servo task period, in nanoseconds
48+
SERVO_PERIOD = 1000000
49+
50+
[TASK]
51+
# Name of task controller program, e.g., milltask
52+
TASK = milltask
53+
# Cycle time, in seconds, that task controller will sleep between polls
54+
CYCLE_TIME = 0.010
55+
56+
[HAL]
57+
# The run script first uses halcmd to execute any HALFILE
58+
# files, and then to execute any individual HALCMD commands.
59+
# list of hal config files to run through halcmd
60+
# files are executed in the order in which they appear
61+
HALFILE = hm2-stepper-eth-modbus.hal
62+
HALFILE = brushless-dc-motor-driver.hal
63+
64+
# list of halcmd commands to execute
65+
# commands are executed in the order in which they appear
66+
#HALCMD = save neta
67+
68+
[HALUI]
69+
#No Content
70+
71+
[TRAJ]
72+
COORDINATES = X Y Z
73+
#HOME = 0 0 0
74+
LINEAR_UNITS = inch
75+
ANGULAR_UNITS = degree
76+
MAX_LINEAR_VELOCITY = 100
77+
78+
[EMCIO]
79+
# tool table file
80+
TOOL_TABLE = tool.tbl
81+
82+
[KINS]
83+
KINEMATICS = trivkins
84+
JOINTS = 3
85+
86+
[AXIS_X]
87+
MIN_LIMIT = -10.0
88+
MAX_LIMIT = 10.0
89+
MAX_VELOCITY = 10
90+
MAX_ACCELERATION = 20
91+
92+
[JOINT_0]
93+
#
94+
# Step timing is 40 us steplen + 40 us stepspace
95+
# That gives 80 us step period = 12.5 KHz step freq
96+
#
97+
# Bah, even software stepping can handle that, hm2 doesn't buy you much with
98+
# such slow steppers.
99+
#
100+
# Scale is 200 steps/rev * 5 revs/inch = 1000 steps/inch
101+
#
102+
# This gives a maxvel of 12.5/1 = 12.5 ips
103+
#
104+
TYPE = LINEAR
105+
MAX_VELOCITY = 10
106+
MAX_ACCELERATION = 20
107+
# Set Stepgen max 20% higher than the axis
108+
STEPGEN_MAX_VEL = 12
109+
STEPGEN_MAX_ACC = 24
110+
BACKLASH = 0.000
111+
# scale is 200 steps/rev * 5 revs/inch
112+
SCALE = 1000
113+
MIN_LIMIT = -10.0
114+
MAX_LIMIT = 10.0
115+
FERROR = 0.050
116+
MIN_FERROR = 0.005
117+
#HOME = 0.000
118+
#HOME_OFFSET = 0.10
119+
#HOME_SEARCH_VEL = 0.10
120+
#HOME_LATCH_VEL = -0.01
121+
#HOME_USE_INDEX = YES
122+
#HOME_IGNORE_LIMITS = YES
123+
HOME_SEQUENCE = 1
124+
# these are in nanoseconds
125+
DIRSETUP = 200
126+
DIRHOLD = 200
127+
STEPLEN = 40000
128+
STEPSPACE = 40000
129+
130+
[AXIS_Y]
131+
MIN_LIMIT = -10.0
132+
MAX_LIMIT = 10.0
133+
MAX_VELOCITY = 10
134+
MAX_ACCELERATION = 20
135+
136+
[JOINT_1]
137+
TYPE = LINEAR
138+
MAX_VELOCITY = 10
139+
MAX_ACCELERATION = 20
140+
# Set Stepgen max 20% higher than the axis
141+
STEPGEN_MAX_VEL = 12
142+
STEPGEN_MAX_ACC = 24
143+
BACKLASH = 0.000
144+
SCALE = 1000
145+
MIN_LIMIT = -10.0
146+
MAX_LIMIT = 10.0
147+
FERROR = 0.050
148+
MIN_FERROR = 0.005
149+
#HOME = 0.000
150+
#HOME_OFFSET = 0.10
151+
#HOME_SEARCH_VEL = 0.10
152+
#HOME_LATCH_VEL = -0.01
153+
#HOME_USE_INDEX = YES
154+
#HOME_IGNORE_LIMITS = YES
155+
HOME_SEQUENCE = 1
156+
# these are in nanoseconds
157+
DIRSETUP = 200
158+
DIRHOLD = 200
159+
STEPLEN = 40000
160+
STEPSPACE = 40000
161+
162+
[AXIS_Z]
163+
MIN_LIMIT = -10.0
164+
MAX_LIMIT = 10.0
165+
MAX_VELOCITY = 10
166+
MAX_ACCELERATION = 20
167+
168+
[JOINT_2]
169+
TYPE = LINEAR
170+
MAX_VELOCITY = 10
171+
MAX_ACCELERATION = 20
172+
# Set Stepgen max 20% higher than the axis
173+
STEPGEN_MAX_VEL = 12
174+
STEPGEN_MAX_ACC = 24
175+
BACKLASH = 0.000
176+
SCALE = 1000
177+
MIN_LIMIT = -10.0
178+
MAX_LIMIT = 10.0
179+
FERROR = 0.050
180+
MIN_FERROR = 0.005
181+
#HOME = 0.000
182+
#HOME_OFFSET = 0.10
183+
#HOME_SEARCH_VEL = 0.10
184+
#HOME_LATCH_VEL = -0.01
185+
#HOME_USE_INDEX = YES
186+
#HOME_IGNORE_LIMITS = YES
187+
HOME_SEQUENCE = 0
188+
# these are in nanoseconds
189+
DIRSETUP = 200
190+
DIRHOLD = 200
191+
STEPLEN = 40000
192+
STEPSPACE = 40000
193+
194+
[HOSTMOT2]
195+
DRIVER=hm2_eth
196+
BOARD_IP=10.10.10.10
197+
BOARD=7i96s
198+
CONFIG=""
199+
200+
[MODBUS]
201+
PORTS="hm2_7i96s.0.pktuart.0"
202+
MBCCBS="brushless-dc-motor-driver.mbccb"

0 commit comments

Comments
 (0)