-
Notifications
You must be signed in to change notification settings - Fork 0
/
idraw1_0_laser_conf.py
260 lines (188 loc) · 13.5 KB
/
idraw1_0_laser_conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# axidraw_conf.py
# Part of the AxiDraw driver software
#
# https://github.com/evil-mad/axidraw
# Version 3.6.0, dated 2022-10-01.
#
# Copyright 2022 Windell H. Oskay, Evil Mad Scientist Laboratories
#
# https://github.com/evil-mad/AxiDraw
#
# "Change numbers here, not there." :)
'''
Primary user-adjustable control parameters:
We encourage you to freely tune these values as needed to match the
behavior and performance of your AxiDraw to your application and taste.
These parameters are used as defaults when using AxiDraw with the command-
line interface (CLI) or with the python API. With the CLI, you can make
copies of this configuration file and specify one as a configuration file.
When using the Python API, override individual settings within your script.
If you are operating the AxiDraw from within Inkscape, please set your
preferences within Inkscape, using the AxiDraw Control dialog. Settings
that appear both here and in AxiDraw Control will be ignored; those
from AxiDraw Control will be used. Other settings can be configured here.
Settings within Inkscape only affect use within Inkscape, and do not affect
the behavior of the AxiDraw CLI or Python APIs.
'''
# DEFAULT VALUES
mode = 'plot' # Operational mode or GUI tab. Default: 'plot'
speed_pendown = 25 # Maximum plotting speed, when pen is down (1-100). Default 25
speed_penup = 75 # Maximum transit speed, when pen is up (1-100). Default 75
accel = 75 # Acceleration rate factor (1-100). Default 75
pen_pos_up = 20 # Height of pen when raised (0-100). Default 60
pen_pos_down = 45 # Height of pen when lowered (0-100). Default 30
pen_rate_raise = 75 # Rate of raising pen (1-100). Default 75
pen_rate_lower = 50 # Rate of lowering pen (1-100). Default 50
pen_delay_up = 0 # Optional delay after pen is raised (ms). Default 0
pen_delay_down = 0 # Optional delay after pen is lowered (ms). Default 0
const_speed = False # Use constant velocity mode when pen is down. Default False
report_time = False # Report time elapsed. Default False
default_layer = 1 # Layer(s) selected for layers mode (1-1000). Default 1
manual_cmd = 'fw_version' # Manual command to execute when in manual mode.
# Default 'fw_version'
walk_dist = 1.0 # Distance to walk in "walking" manual commands. Units may be
# selected with the value of manual_cmd. Default 1.0
copies = 1 # Copies to plot, or 0 for continuous plotting. Default: 1
page_delay = 15 # Optional delay between copies (s). Default 15
preview = False # Preview mode; simulate plotting only. Default False
rendering = 3 # Preview mode rendering option (0-3):
# 0: Do not render previews
# 1: Render only pen-down movement
# 2: Render only pen-up movement
# 3: Render all movement (Default)
model = 1 # AxiDraw Model (1-6).
# 1: AxiDraw V2 or V3 (Default). 2: AxiDraw V3/A3 or SE/A3.
# 3: AxiDraw V3 XLX. 4: AxiDraw MiniKit.
# 5: AxiDraw SE/A1. 6: AxiDraw SE/A2.
port = None # Serial port or named AxiDraw to use
# None (Default) will plot to first unit located
port_config = 0 # Serial port behavior option (0-2)
# 0: Plot to first unit found, unless port is specified (Default)
# 1: Plot to first AxiDraw unit located
# 2: Plot to a specific AxiDraw only, given by port
auto_rotate = True # Auto-select portrait vs landscape orientation
# Default: True
reordering = 0 # Plot optimization option (0-4; 3 is deprecated)
# 0: Least; Only connect adjoining paths (Default)
# 1: Basic; Also reorder paths for speed
# 2: Full; Also allow path reversal
# 4: None; Strictly preserve file order
random_start = False # Randomize start locations of closed paths. Default False
webhook = False # Enable webhook alerts when True
# Default False
webhook_url = None # URL for webhook alerts. Default None
digest = 0 # Plot digest output option. (NOT supported in Inkscape context.)
# 0: Disabled; No change to behavior or output (Default)
# 1: Output "plob" digest, not full SVG, when saving file
# 2: Disable plots and previews; generate digest only
progress = False # Enable progress bar display in AxiDraw CLI, when True
# Default False
# This option has no effect in Inkscape or Python API contexts.
resolution = 1 # Resolution: (1-2):
# 1: High resolution (smoother, slightly slower) (Default)
# 2: Low resolution (coarser, slightly faster)
# Effective motor resolution is approx. 1437 or 2874 steps per inch, in the two modes respectively.
# Note that these resolutions are defined along the native axes of the machine (X+Y) and (X-Y),
# not along the XY axes of the machine. This parameter chooses 8X or 16X motor microstepping.
'''
Additional user-adjustable control parameters:
Values below this point are configured only in this file, not through the user interface(s).
'''
servo_timeout = 60000 # Time, ms, for servo motor to power down after last movement command
# (default: 60000). This feature requires EBB v 2.5 hardware (with USB
# micro not USB mini connector), firmware version 2.6.0, and
# servo_pin set to 1 (only).
servo_pin = 1 # EBB I/O pin number (port B) to control the pen-lift servo motor.
# Default: 1 (pin RB1). Suggested alternate: 2 (pin RB2, located
# two positions above the standard servo output pins).
check_updates = True # If True, allow AxiDraw Control to check online to see
# what the current software version is, when you
# query the version. Set to False to disable. Note that
# this is the only internet-enabled function in the
# AxiDraw software.
use_b3_out = True # If True, enable digital output pin B3, which will be high (3.3V)
# when the pen is down, and low otherwise. Can be used to control
# external devices like valves, relays, or lasers.
auto_rotate_ccw = True # If True (default), auto-rotate is counter-clockwise when active.
# If False, auto-rotate direction is clockwise.
options_message = True # If True (default), display an advisory message if Apply is clicked
# in the AxiDraw Control GUI, while in tabs that have no effect.
# (Clicking Apply on these tabs has no effect other than the message.)
# This message can prevent the situation where one clicks Apply on the
# Options tab and then waits a few minutes before realizing that
# no plot has been initiated.
report_lifts = False # Report number of pen lifts when reporting plot duration (Default: False)
auto_clip_lift = True # Option applicable only to XY movements in the Interactive Python API.
# If True (default), keep pen up when motion is clipped by travel bounds.
# Colors used to represent pen-up and pen-down travel in preview mode:
preview_color_up = 'LightPink' # Pen-up travel color. Default: LightPink; rgb(255, 182, 193)
preview_color_down = 'Blue' # Pen-up travel color. Default: Blue; rgb(0, 0, 255)
skip_voltage_check = False # Set to True to disable EBB input power voltage checks. Default: False
clip_to_page = True # Clip plotting area to SVG document size. Default: True
min_gap = 0.008 # Automatic path joining threshold, inches. Default: 0.008
# If greater than zero, pen-up moves shorter than this distance
# will be replaced by pen-down moves. Set negative to disable.
# Setting reordering to 4 (strict) will also disable path joining.
'''
Secondary control parameters:
Values below this point are configured only in this file, not through the user interface(s).
These values have been carefully chosen, and generally do not need to be adjusted in everyday use.
And, you can easily change these values such that things will not work as you expect them to.
That said, proceed with caution, and keep a backup copy.
'''
# Travel area limits typically do not need to be changed.
# For each model, there is an X travel and Y travel limit, given in inches.
x_travel_default = 11.81 # AxiDraw V2, V3, SE/A4: X. Default: 11.81 in (300 mm)
y_travel_default = 8.58 # AxiDraw V2, V3, SE/A4: Y. Default: 8.58 in (218 mm)
x_travel_V3A3 = 16.93 # V3/A3 and SE/A3: X Default: 16.93 in (430 mm)
y_travel_V3A3 = 11.69 # V3/A3 and SE/A3: Y Default: 11.69 in (297 mm)
x_travel_V3XLX = 23.42 # AxiDraw V3 XLX: X Default: 23.42 in (595 mm)
y_travel_V3XLX = 8.58 # AxiDraw V3 XLX: Y Default: 8.58 in (218 mm)
x_travel_MiniKit = 6.30 # AxiDraw MiniKit: X Default: 6.30 in (160 mm)
y_travel_MiniKit = 4.00 # AxiDraw MiniKit: Y Default: 4.00 in (101.6 mm)
x_travel_SEA1 = 34.02 # AxiDraw SE/A1: X Default: 34.02 in (864 mm)
y_travel_SEA1 = 23.39 # AxiDraw SE/A1: Y Default: 23.39 in (594 mm)
x_travel_SEA2 = 23.39 # AxiDraw SE/A2: X Default: 23.39 in (594 mm)
y_travel_SEA2 = 17.01 # AxiDraw SE/A2: Y Default: 17.01 in (432 mm )
x_travel_V3B6 = 7.48 # AxiDraw V3/B6: X Default: 7.48 in (190 mm)
y_travel_V3B6 = 5.51 # AxiDraw V3/B6: Y Default: 5.51 in (140 mm)
native_res_factor = 1270.0 # Motor resolution factor, steps per inch. Default: 1016.0
# Note that resolution is defined along native (not X or Y) axes.
# Resolution is native_res_factor * sqrt(2) steps/inch in Low Resolution (Approx 1437 steps/in)
# and 2 * native_res_factor * sqrt(2) steps/inch in High Resolution (Approx 2874 steps/in)
max_step_rate = 24.995 # Maximum allowed motor step rate, in steps per millisecond.
# Note that 25 kHz is the absolute maximum step rate for the EBB.
# Movement commands faster than this are ignored; may result in a crash (loss of position control).
# We use a conservative value, to help prevent errors due to rounding.
# This value is normally used _for speed limit checking only_.
speed_lim_xy_lr = 15.000 # Max XY speed allowed when in Low Resolution mode, in/s. Default: 15.000 Max: 17.3958
speed_lim_xy_hr = 8.6979 # Max XY speed allowed when in High Resolution mode, in/s. Default: 8.6979, Max: 8.6979
# Do not increase these values above Max; they are derived from max_step_rate and the resolution.
max_step_dist_lr = 0.000696 # Max distance covered by 1 step in Low Res mode, rounded up, in inches. ~1/(1016 sqrt(2))
max_step_dist_hr = 0.000348 # Max distance covered by 1 step in Hi Res mode, rounded up, in inches. ~1/(2032 sqrt(2))
# In planning trajectories, we skip movements shorter than these distances, likely to be < 1 step.
const_speed_factor_lr = 0.25 # In constant-speed mode, multiply pen-down speed by this factor. Default: 0.25 for Low Res mode
const_speed_factor_hr = 0.4 # In constant-speed mode, multiply pen-down speed by this factor. Default: 0.4 for Hi Res mode
start_pos_x = 0 # Parking position, inches. Default: 0
start_pos_y = 0 # Parking position, inches. Default: 0
# Acceleration & Deceleration rates:
accel_rate = 40.0 # Standard acceleration rate, inches per second squared
accel_rate_pu = 60.0 # Pen-up acceleration rate, inches per second squared
time_slice = 0.025 # Interval, in seconds, of when to update the motors. Default: time_slice = 0.025 (25 ms)
bounds_tolerance = 0.003 # Suppress warnings if bounds are exceeded by less than this distance (inches).
# Servo motion limits, in units of (1/12 MHz), about 83.3 ns:
servo_max = 27831 # Highest allowed position; "100%" on scale. Default: 27831 units, or 2.32 ms.
servo_min = 9855 # Lowest allowed position; "0%" on scale. Default: 9855 units, or 0.82 ms.
# Time for servo control signal to sweep over full 0-100% range, at 100% pen lift/lower rates:
servo_sweep_time = 200 # Duration, ms, to sweep servo control signal over 100% range. Default: 200
# Time (for pen lift servo to physically move) = slope * distance + min, with a full speed sweep.
servo_move_min = 45 # Minimum time, ms, for pen lift/lower of non-zero distance. Default: 45
servo_move_slope = 2.69 # Additional time, ms, per percentage of vertical travel. Default: 2.69
smoothness = 10.0 # Curve smoothing (default: 10.0)
cornering = 10.0 # Cornering speed factor (default: 10.0)
# the tolerance for determining when the bezier has been segmented enough to plot:
bezier_segmentation_tolerance = 0.02 / smoothness
# Tolerance for merging nearby vertices:
# Larger values of segment_supersample_tolerance give smoother plotting along paths that
# were created with too many vertices. A value of 0 will disable supersampling.
segment_supersample_tolerance = bezier_segmentation_tolerance / 16