initial commit

This commit is contained in:
Thomas Dehaeze 2024-07-11 12:12:44 +02:00
commit bd04133f51
28 changed files with 7009 additions and 0 deletions

5213
printnc.pncconf Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
THREAD servo-thread
MAXCHAN 4
HMULT 1
HZOOM 1
HPOS 5.000000e-01
TMODE 0
RMODE 0

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
Include your PyVCP panel here.
-->
<pyvcp>
</pyvcp>

View File

@ -0,0 +1,31 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<relief>RIDGE</relief>
<bd>6</bd>
<label>
<text>"Spindle Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<bar>
<halpin>"spindle-speed"</halpin>
<max_>3000</max_>
</bar>
<label>
<text>"Spindle-At-Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",20)</font>
</label>
<led>
<halpin>"spindle-at-speed-led"</halpin>
<size>30</size>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</led>
</hbox>
</vbox>
</pyvcp>

View File

@ -0,0 +1,31 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<relief>RIDGE</relief>
<bd>6</bd>
<label>
<text>"Spindle Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<bar>
<halpin>"spindle-speed"</halpin>
<max_>3000</max_>
</bar>
<label>
<text>"Spindle-At-Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",20)</font>
</label>
<led>
<halpin>"spindle-at-speed-led"</halpin>
<size>30</size>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</led>
</hbox>
</vbox>
</pyvcp>

View File

@ -0,0 +1,31 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<relief>RIDGE</relief>
<bd>6</bd>
<label>
<text>"Spindle Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<bar>
<halpin>"spindle-speed"</halpin>
<max_>3000</max_>
</bar>
<label>
<text>"Spindle-At-Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",20)</font>
</label>
<led>
<halpin>"spindle-at-speed-led"</halpin>
<size>30</size>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</led>
</hbox>
</vbox>
</pyvcp>

View File

@ -0,0 +1,31 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<relief>RIDGE</relief>
<bd>6</bd>
<label>
<text>"Spindle Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<bar>
<halpin>"spindle-speed"</halpin>
<max_>3000</max_>
</bar>
<label>
<text>"Spindle-At-Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",20)</font>
</label>
<led>
<halpin>"spindle-at-speed-led"</halpin>
<size>30</size>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</led>
</hbox>
</vbox>
</pyvcp>

View File

@ -0,0 +1,31 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<relief>RIDGE</relief>
<bd>6</bd>
<label>
<text>"Spindle Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<bar>
<halpin>"spindle-speed"</halpin>
<max_>3000</max_>
</bar>
<label>
<text>"Spindle-At-Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",20)</font>
</label>
<led>
<halpin>"spindle-at-speed-led"</halpin>
<size>30</size>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</led>
</hbox>
</vbox>
</pyvcp>

View File

@ -0,0 +1,31 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<relief>RIDGE</relief>
<bd>6</bd>
<label>
<text>"Spindle Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<bar>
<halpin>"spindle-speed"</halpin>
<max_>3000</max_>
</bar>
<label>
<text>"Spindle-At-Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",20)</font>
</label>
<led>
<halpin>"spindle-at-speed-led"</halpin>
<size>30</size>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</led>
</hbox>
</vbox>
</pyvcp>

View File

@ -0,0 +1,31 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<relief>RIDGE</relief>
<bd>6</bd>
<label>
<text>"Spindle Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<bar>
<halpin>"spindle-speed"</halpin>
<max_>3000</max_>
</bar>
<label>
<text>"Spindle-At-Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",20)</font>
</label>
<led>
<halpin>"spindle-at-speed-led"</halpin>
<size>30</size>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</led>
</hbox>
</vbox>
</pyvcp>

2
printnc/custom.hal Normal file
View File

@ -0,0 +1,2 @@
# Include your custom HAL commands here
# This file will not be overwritten when you run PNCconf again

2
printnc/custom_gvcp.hal Normal file
View File

@ -0,0 +1,2 @@
# Include your custom_gvcp HAL commands here
# This file will not be overwritten when you run PNCconf again

View File

@ -0,0 +1,4 @@
# Include your custom_postgui HAL commands here
# This file will not be overwritten when you run PNCconf again
net spindle-speed-fb <= gmoccapy.spindle_feedback_bar
net spindle-at-speed <= gmoccapy.spindle_at_speed_led

View File

@ -0,0 +1,5 @@
# ---manual tool change signals to gmoccapy's dialog---
net tool-change-request => gmoccapy.toolchange-change
net tool-change-confirmed <= gmoccapy.toolchange-changed
net tool-number => gmoccapy.toolchange-number

View File

@ -0,0 +1,18 @@
# Halshow settings
# This file is generated automatically.
wm geometry . 950x952+752+107
placeFrames 0.39680232558139533
set ::ratio 0.39680232558139533
set ::old_w_leftf 160
set ::watchlist {
sig+probe-in
pin+hm2_7i96s.0.gpio.008.in
pin+hm2_7i96s.0.gpio.008.in_not
}
set ::workmode watchhal
set ::watchInterval 100
set ::col1_width 100
set ::ffmts
set ::ifmts
set ::alwaysOnTop 0
set ::autoSaveWatchlist 1

119
printnc/linuxcnc.var Normal file
View File

@ -0,0 +1,119 @@
5161 0.000000
5162 0.000000
5163 0.000000
5164 0.000000
5165 0.000000
5166 0.000000
5167 0.000000
5168 0.000000
5169 0.000000
5181 0.000000
5182 0.000000
5183 0.000000
5184 0.000000
5185 0.000000
5186 0.000000
5187 0.000000
5188 0.000000
5189 0.000000
5210 0.000000
5211 0.000000
5212 0.000000
5213 0.000000
5214 0.000000
5215 0.000000
5216 0.000000
5217 0.000000
5218 0.000000
5219 0.000000
5220 1.000000
5221 0.200000
5222 0.200000
5223 -84.593934
5224 0.000000
5225 0.000000
5226 0.000000
5227 0.000000
5228 0.000000
5229 0.000000
5230 0.000000
5241 0.000000
5242 0.000000
5243 0.000000
5244 0.000000
5245 0.000000
5246 0.000000
5247 0.000000
5248 0.000000
5249 0.000000
5250 0.000000
5261 0.000000
5262 0.000000
5263 0.000000
5264 0.000000
5265 0.000000
5266 0.000000
5267 0.000000
5268 0.000000
5269 0.000000
5270 0.000000
5281 0.000000
5282 0.000000
5283 0.000000
5284 0.000000
5285 0.000000
5286 0.000000
5287 0.000000
5288 0.000000
5289 0.000000
5290 0.000000
5301 0.000000
5302 0.000000
5303 0.000000
5304 0.000000
5305 0.000000
5306 0.000000
5307 0.000000
5308 0.000000
5309 0.000000
5310 0.000000
5321 0.000000
5322 0.000000
5323 0.000000
5324 0.000000
5325 0.000000
5326 0.000000
5327 0.000000
5328 0.000000
5329 0.000000
5330 0.000000
5341 0.000000
5342 0.000000
5343 0.000000
5344 0.000000
5345 0.000000
5346 0.000000
5347 0.000000
5348 0.000000
5349 0.000000
5350 0.000000
5361 0.000000
5362 0.000000
5363 0.000000
5364 0.000000
5365 0.000000
5366 0.000000
5367 0.000000
5368 0.000000
5369 0.000000
5370 0.000000
5381 0.000000
5382 0.000000
5383 0.000000
5384 0.000000
5385 0.000000
5386 0.000000
5387 0.000000
5388 0.000000
5389 0.000000
5390 0.000000

119
printnc/linuxcnc.var.bak Normal file
View File

@ -0,0 +1,119 @@
5161 0.000000
5162 0.000000
5163 0.000000
5164 0.000000
5165 0.000000
5166 0.000000
5167 0.000000
5168 0.000000
5169 0.000000
5181 0.000000
5182 0.000000
5183 0.000000
5184 0.000000
5185 0.000000
5186 0.000000
5187 0.000000
5188 0.000000
5189 0.000000
5210 0.000000
5211 0.000000
5212 0.000000
5213 0.000000
5214 0.000000
5215 0.000000
5216 0.000000
5217 0.000000
5218 0.000000
5219 0.000000
5220 1.000000
5221 0.200000
5222 0.200000
5223 -84.593934
5224 0.000000
5225 0.000000
5226 0.000000
5227 0.000000
5228 0.000000
5229 0.000000
5230 0.000000
5241 0.000000
5242 0.000000
5243 0.000000
5244 0.000000
5245 0.000000
5246 0.000000
5247 0.000000
5248 0.000000
5249 0.000000
5250 0.000000
5261 0.000000
5262 0.000000
5263 0.000000
5264 0.000000
5265 0.000000
5266 0.000000
5267 0.000000
5268 0.000000
5269 0.000000
5270 0.000000
5281 0.000000
5282 0.000000
5283 0.000000
5284 0.000000
5285 0.000000
5286 0.000000
5287 0.000000
5288 0.000000
5289 0.000000
5290 0.000000
5301 0.000000
5302 0.000000
5303 0.000000
5304 0.000000
5305 0.000000
5306 0.000000
5307 0.000000
5308 0.000000
5309 0.000000
5310 0.000000
5321 0.000000
5322 0.000000
5323 0.000000
5324 0.000000
5325 0.000000
5326 0.000000
5327 0.000000
5328 0.000000
5329 0.000000
5330 0.000000
5341 0.000000
5342 0.000000
5343 0.000000
5344 0.000000
5345 0.000000
5346 0.000000
5347 0.000000
5348 0.000000
5349 0.000000
5350 0.000000
5361 0.000000
5362 0.000000
5363 0.000000
5364 0.000000
5365 0.000000
5366 0.000000
5367 0.000000
5368 0.000000
5369 0.000000
5370 0.000000
5381 0.000000
5382 0.000000
5383 0.000000
5384 0.000000
5385 0.000000
5386 0.000000
5387 0.000000
5388 0.000000
5389 0.000000
5390 0.000000

16
printnc/position.txt Normal file
View File

@ -0,0 +1,16 @@
0.00000000000000000
0.00000000000000000
-0.00000000762940999
0.00000000000000000
0.00000000000000000
0.00000000000000000
0.00000000000000000
0.00000000000000000
0.00000000000000000
0.00000000000000000
0.00000000000000000
0.00000000000000000
0.00000000000000000
0.00000000000000000
0.00000000000000000
0.00000000000000000

381
printnc/printnc.hal Normal file
View File

@ -0,0 +1,381 @@
# Generated by PNCconf at Sun Apr 21 10:53:07 2024
# Using LinuxCNC version: Master (2.9)
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
loadusr -Wn pyvcp pyvcp -c pyvcp [DISPLAY](PYVCP)
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="10.10.10.10" config="num_encoders=1 num_pwmgens=1 num_stepgens=5 sserial_port_0=0xxxxxxx"
setp hm2_7i96s.0.pwmgen.pwm_frequency 20000
setp hm2_7i96s.0.pwmgen.pdm_frequency 6000000
setp hm2_7i96s.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.y2,pid.z,pid.s
loadrt abs names=abs.spindle
loadrt lowpass names=lowpass.spindle
addf hm2_7i96s.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.y2.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf abs.spindle servo-thread
addf lowpass.spindle servo-thread
addf hm2_7i96s.0.write servo-thread
setp hm2_7i96s.0.dpll.01.timer-us -50
setp hm2_7i96s.0.stepgen.timer-number 1
# external output signals
# external input signals
# --- HOME-X ---
net home-x <= hm2_7i96s.0.inm.00.input-00-not
# --- HOME-Y ---
net home-y <= hm2_7i96s.0.inm.00.input-01-not
# --- HOME-Y2 ---
net home-y2 <= hm2_7i96s.0.inm.00.input-02-not
# --- HOME-Z ---
net home-z <= hm2_7i96s.0.inm.00.input-03-not
# --- ESTOP-EXT ---
net estop-ext <= hm2_7i96s.0.inm.00.input-06
# --- PROBE-IN ---
net probe-in <= hm2_7i96s.0.inm.00.input-07
#*******************
# AXIS X JOINT 0
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.x.maxerror 0.012700
net x-index-enable => pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-pos-fb => pid.x.feedback
net x-output <= pid.x.output
# Step Gen signals/setup
setp hm2_7i96s.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_7i96s.0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_7i96s.0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_7i96s.0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_7i96s.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp hm2_7i96s.0.stepgen.00.step_type 0
setp hm2_7i96s.0.stepgen.00.control-type 1
setp hm2_7i96s.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_7i96s.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-output => hm2_7i96s.0.stepgen.00.velocity-cmd
net x-pos-fb <= hm2_7i96s.0.stepgen.00.position-fb
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => hm2_7i96s.0.stepgen.00.enable
# ---setup home / limit switch signals---
net home-x => joint.0.home-sw-in
net x-neg-limit => joint.0.neg-lim-sw-in
net x-pos-limit => joint.0.pos-lim-sw-in
#*******************
# AXIS Y JOINT 1
#*******************
setp pid.y.Pgain [JOINT_1]P
setp pid.y.Igain [JOINT_1]I
setp pid.y.Dgain [JOINT_1]D
setp pid.y.bias [JOINT_1]BIAS
setp pid.y.FF0 [JOINT_1]FF0
setp pid.y.FF1 [JOINT_1]FF1
setp pid.y.FF2 [JOINT_1]FF2
setp pid.y.deadband [JOINT_1]DEADBAND
setp pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.y.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.y.maxerror 0.012700
net y-index-enable => pid.y.index-enable
net y-enable => pid.y.enable
net y-pos-cmd => pid.y.command
net y-pos-fb => pid.y.feedback
net y-output <= pid.y.output
# Step Gen signals/setup
setp hm2_7i96s.0.stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp hm2_7i96s.0.stepgen.01.dirhold [JOINT_1]DIRHOLD
setp hm2_7i96s.0.stepgen.01.steplen [JOINT_1]STEPLEN
setp hm2_7i96s.0.stepgen.01.stepspace [JOINT_1]STEPSPACE
setp hm2_7i96s.0.stepgen.01.position-scale [JOINT_1]STEP_SCALE
setp hm2_7i96s.0.stepgen.01.step_type 0
setp hm2_7i96s.0.stepgen.01.control-type 1
setp hm2_7i96s.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_7i96s.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net y-pos-cmd <= joint.1.motor-pos-cmd
net y-vel-cmd <= joint.1.vel-cmd
net y-output => hm2_7i96s.0.stepgen.01.velocity-cmd
net y-pos-fb <= hm2_7i96s.0.stepgen.01.position-fb
net y-pos-fb => joint.1.motor-pos-fb
net y-enable <= joint.1.amp-enable-out
net y-enable => hm2_7i96s.0.stepgen.01.enable
# ---setup home / limit switch signals---
net home-y => joint.1.home-sw-in
net y-neg-limit => joint.1.neg-lim-sw-in
net y-pos-limit => joint.1.pos-lim-sw-in
#*******************
# Tandem AXIS Y2 JOINT 2
#*******************
setp pid.y2.Pgain [JOINT_2]P
setp pid.y2.Igain [JOINT_2]I
setp pid.y2.Dgain [JOINT_2]D
setp pid.y2.bias [JOINT_2]BIAS
setp pid.y2.FF0 [JOINT_2]FF0
setp pid.y2.FF1 [JOINT_2]FF1
setp pid.y2.FF2 [JOINT_2]FF2
setp pid.y2.deadband [JOINT_2]DEADBAND
setp pid.y2.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.y2.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.y2.maxerror 0.012700
net y2-index-enable => pid.y2.index-enable
net y2-enable => pid.y2.enable
net y2-pos-cmd => pid.y2.command
net y2-pos-fb => pid.y2.feedback
net y2-output <= pid.y2.output
# Step Gen signals/setup for tandem axis
setp hm2_7i96s.0.stepgen.02.dirsetup [JOINT_2]DIRSETUP
setp hm2_7i96s.0.stepgen.02.dirhold [JOINT_2]DIRHOLD
setp hm2_7i96s.0.stepgen.02.steplen [JOINT_2]STEPLEN
setp hm2_7i96s.0.stepgen.02.stepspace [JOINT_2]STEPSPACE
setp hm2_7i96s.0.stepgen.02.position-scale [JOINT_2]STEP_SCALE
setp hm2_7i96s.0.stepgen.02.step_type 0
setp hm2_7i96s.0.stepgen.02.control-type 1
setp hm2_7i96s.0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp hm2_7i96s.0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net y2-pos-cmd <= joint.2.motor-pos-cmd
net y2-vel-cmd <= joint.2.vel-cmd
net y2-output => hm2_7i96s.0.stepgen.02.velocity-cmd
net y2-pos-fb <= hm2_7i96s.0.stepgen.02.position-fb
net y2-pos-fb => joint.2.motor-pos-fb
net y2-enable <= joint.2.amp-enable-out
net y2-enable => hm2_7i96s.0.stepgen.02.enable
# ---setup home / limit switch signals---
net home-y2 => joint.2.home-sw-in
net y2-neg-limit => joint.2.neg-lim-sw-in
net y2-pos-limit => joint.2.pos-lim-sw-in
#*******************
# AXIS Z JOINT 3
#*******************
setp pid.z.Pgain [JOINT_3]P
setp pid.z.Igain [JOINT_3]I
setp pid.z.Dgain [JOINT_3]D
setp pid.z.bias [JOINT_3]BIAS
setp pid.z.FF0 [JOINT_3]FF0
setp pid.z.FF1 [JOINT_3]FF1
setp pid.z.FF2 [JOINT_3]FF2
setp pid.z.deadband [JOINT_3]DEADBAND
setp pid.z.maxoutput [JOINT_3]MAX_OUTPUT
setp pid.z.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.z.maxerror 0.012700
net z-index-enable => pid.z.index-enable
net z-enable => pid.z.enable
net z-pos-cmd => pid.z.command
net z-pos-fb => pid.z.feedback
net z-output <= pid.z.output
# Step Gen signals/setup
setp hm2_7i96s.0.stepgen.03.dirsetup [JOINT_3]DIRSETUP
setp hm2_7i96s.0.stepgen.03.dirhold [JOINT_3]DIRHOLD
setp hm2_7i96s.0.stepgen.03.steplen [JOINT_3]STEPLEN
setp hm2_7i96s.0.stepgen.03.stepspace [JOINT_3]STEPSPACE
setp hm2_7i96s.0.stepgen.03.position-scale [JOINT_3]STEP_SCALE
setp hm2_7i96s.0.stepgen.03.step_type 0
setp hm2_7i96s.0.stepgen.03.control-type 1
setp hm2_7i96s.0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAXACCEL
setp hm2_7i96s.0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net z-pos-cmd <= joint.3.motor-pos-cmd
net z-vel-cmd <= joint.3.vel-cmd
net z-output => hm2_7i96s.0.stepgen.03.velocity-cmd
net z-pos-fb <= hm2_7i96s.0.stepgen.03.position-fb
net z-pos-fb => joint.3.motor-pos-fb
net z-enable <= joint.3.amp-enable-out
net z-enable => hm2_7i96s.0.stepgen.03.enable
# ---setup home / limit switch signals---
net home-z => joint.3.home-sw-in
net z-neg-limit => joint.3.neg-lim-sw-in
net z-pos-limit => joint.3.pos-lim-sw-in
#*******************
# SPINDLE
#*******************
setp pid.s.Pgain [SPINDLE_0]P
setp pid.s.Igain [SPINDLE_0]I
setp pid.s.Dgain [SPINDLE_0]D
setp pid.s.bias [SPINDLE_0]BIAS
setp pid.s.FF0 [SPINDLE_0]FF0
setp pid.s.FF1 [SPINDLE_0]FF1
setp pid.s.FF2 [SPINDLE_0]FF2
setp pid.s.deadband [SPINDLE_0]DEADBAND
setp pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp pid.s.error-previous-target true
net spindle-index-enable => pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm => pid.s.command
net spindle-vel-fb-rpm => pid.s.feedback
net spindle-output <= pid.s.output
# ---setup spindle control signals---
#net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
#net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
#net spindle-vel-cmd-rpm <= spindle.0.speed-out
#net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
#net spindle-enable <= spindle.0.on
#net spindle-cw <= spindle.0.forward
#net spindle-ccw <= spindle.0.reverse
#net spindle-brake <= spindle.0.brake
net spindle-revs => spindle.0.revs
net spindle-at-speed => spindle.0.at-speed
net spindle-vel-fb-rps => spindle.0.speed-in
net spindle-index-enable <=> spindle.0.index-enable
# ---Setup spindle at speed signals---
sets spindle-at-speed true
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net axis-select-x halui.axis.x.select
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-x-analog halui.axis.x.analog
net x-is-homed halui.joint.0.is-homed
net axis-select-y halui.axis.y.select
net jog-y-pos halui.axis.y.plus
net jog-y-neg halui.axis.y.minus
net jog-y-analog halui.axis.y.analog
net y-is-homed halui.joint.1.is-homed
net y2-is-homed halui.joint.2.is-homed
net axis-select-z halui.axis.z.select
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-z-analog halui.axis.z.analog
net z-is-homed halui.joint.3.is-homed
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net spindle-manual-cw halui.spindle.0.forward
net spindle-manual-ccw halui.spindle.0.reverse
net spindle-manual-stop halui.spindle.0.stop
net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
# ---coolant signals---
net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood
# ---probe signal---
net probe-in => motion.probe-input
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
# ---digital in / out signals---
# ---estop signals---
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in
# ---manual tool change signals---
net tool-change-request <= iocontrol.0.tool-change
net tool-change-confirmed => iocontrol.0.tool-changed
net tool-number <= iocontrol.0.tool-prep-number
# ---ignore tool prepare requests---
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
# ADDED for YL620A
loadrt classicladder_rt numS32out=100
addf classicladder.0.refresh servo-thread
loadusr classicladder --modmaster vfd.clp
net spindle-on classicladder.0.in-00 spindle.0.on
net spindle-brake classicladder.0.in-01 spindle.0.brake
net spindle-forward classicladder.0.in-02 spindle.0.forward
net spindle-reverse classicladder.0.in-03 spindle.0.reverse
net spindle-cmd-rpm <= spindle.0.speed-out
net spindle-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-cmd-rps <= spindle.0.speed-out-rps
net spindle-cmd-rps-abs <= spindle.0.speed-out-rps-abs classicladder.0.floatin-00

263
printnc/printnc.ini Normal file
View File

@ -0,0 +1,263 @@
# Generated by PNCconf at Sun Apr 21 10:53:07 2024
# Using LinuxCNC version: Master (2.9)
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
[EMC]
MACHINE = printnc
DEBUG = 0
VERSION = 1.1
[DISPLAY]
DISPLAY = gmoccapy
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 2.000000
MIN_SPINDLE_OVERRIDE = 0.500000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/printnc/linuxcnc/nc_files
#PYVCP = pyvcp-panel.xml
PYVCP = vfd.xml
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 6.000000
MAX_LINEAR_VELOCITY = 25.000000
MIN_LINEAR_VELOCITY = 0.500000
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
EDITOR = gedit
GEOMETRY = xyz
CYCLE_TIME = 100
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
RS274NGC_STARTUP_CODE = G21 G40 G90 G94 G97 G64 P0.025
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000
[HMOT]
# **** This is for info only ****
CARD0=hm2_7i96s.0
[HAL]
HALUI = halui
HALFILE = printnc.hal
HALFILE = custom.hal
POSTGUI_HALFILE = vfd.hal
POSTGUI_HALFILE = pyvcp_options.hal
POSTGUI_HALFILE = gmoccapy_postgui.hal
POSTGUI_HALFILE = custom_postgui.hal
SHUTDOWN = shutdown.hal
[HALUI]
[KINS]
JOINTS = 4
KINEMATICS = trivkins coordinates=XYYZ kinstype=BOTH
[TRAJ]
COORDINATES = XYYZ
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 10.00
MAX_LINEAR_VELOCITY = 100.00
POSITION_FILE = position.txt
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
TOOL_CHANGE_QUILL_UP = 1
#******************************************
[AXIS_X]
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 1500.0
MIN_LIMIT = -0.01
MAX_LIMIT = 1130.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 1500.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 125.00
STEPGEN_MAXACCEL = 1875.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 100
STEPLEN = 200
STEPSPACE = 300
STEP_SCALE = 2000.0
MIN_LIMIT = -0.01
MAX_LIMIT = 1130.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -50.000000
HOME_LATCH_VEL = -1.000000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = 1
#******************************************
#******************************************
[AXIS_Y]
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 1500.0
MIN_LIMIT = -0.01
MAX_LIMIT = 700.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 1500.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 125.00
STEPGEN_MAXACCEL = 1875.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 50000
DIRHOLD = 100
STEPLEN = 200
STEPSPACE = 300
STEP_SCALE = 2000.0
MIN_LIMIT = -0.01
MAX_LIMIT = 700.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -50.000000
HOME_LATCH_VEL = -1.000000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = -2
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 1500.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 125.00
STEPGEN_MAXACCEL = 1875.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 50000
DIRHOLD = 100
STEPLEN = 200
STEPSPACE = 300
STEP_SCALE = 2000.0
MIN_LIMIT = -0.01
MAX_LIMIT = 700.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -50.000000
HOME_LATCH_VEL = -1.000000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = -2
#******************************************
#******************************************
[AXIS_Z]
MAX_VELOCITY = 16.666666666666668
MAX_ACCELERATION = 300.0
MIN_LIMIT = -135.0
MAX_LIMIT = 0.01
[JOINT_3]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 16.666666666666668
MAX_ACCELERATION = 300.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 20.83
STEPGEN_MAXACCEL = 375.00
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 100
STEPLEN = 200
STEPSPACE = 300
STEP_SCALE = 5000.0
MIN_LIMIT = -135.0
MAX_LIMIT = 0.01
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 10.000000
HOME_LATCH_VEL = 0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = 3
#******************************************
[SPINDLE_0]
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 2000

78
printnc/printnc.pref Normal file
View File

@ -0,0 +1,78 @@
[DEFAULT]
dro_digits = 3
dro_size = 28
abs_color = #0000FF
rel_color = #000000
dtg_color = #FFFF00
homed_color = #00FF00
unhomed_color = #FF0000
enable_dro = False
scale_jog_vel = 30.0
scale_spindle_override = 1
scale_feed_override = 1
scale_rapid_override = 1
spindle_bar_min = 0.0
spindle_bar_max = 20000.0
turtle_jog_factor = 20
hide_turtle_jog_button = False
unlock_code = 123
toggle_readout = True
spindle_start_rpm = 300.0
kbd_height = 250
blockheight = 0.0
open_file =
screen1 = window
hide_titlebar = False
x_pos = 40
y_pos = 30
width = 979
height = 750
use_toolmeasurement = False
gtk_theme = Follow System Theme
icon_theme = classic
audio_enabled = True
audio_alert = /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
audio_error = /usr/share/sounds/freedesktop/stereo/dialog-error.oga
grid_size = 1.0
view = z
mouse_btn_mode = 4
hide_cursor = False
hide_tooltips = False
system_name_tool = Tool
system_name_g5x = G5x
system_name_rot = Rot
system_name_g92 = G92
system_name_g54 = G54
system_name_g55 = G55
system_name_g56 = G56
system_name_g57 = G57
system_name_g58 = G58
system_name_g59 = G59
system_name_g59.1 = G59.1
system_name_g59.2 = G59.2
system_name_g59.3 = G59.3
jump_to_dir = /home/printnc
show_keyboard_on_offset = False
show_keyboard_on_tooledit = False
show_keyboard_on_edit = False
show_keyboard_on_mdi = False
x_pos_popup = 45.0
y_pos_popup = 55
width_popup = 250.0
max_messages = 10
message_font = sans 10
use_frames = True
reload_tool = True
blockdel = False
show_offsets = False
show_dtg = False
view_tool_path = True
view_dimension = True
run_from_line = no_run
unlock_way = use
show_preview_on_offset = False
use_keyboard_shortcuts = True
tool_in_spindle = 0
show_keyboard_on_file_selection = False
offset_axis_z = 5.05

31
printnc/pyvcp-panel.xml Normal file
View File

@ -0,0 +1,31 @@
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<relief>RIDGE</relief>
<bd>6</bd>
<label>
<text>"Spindle Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<bar>
<halpin>"spindle-speed"</halpin>
<max_>3000</max_>
</bar>
<label>
<text>"Spindle-At-Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",20)</font>
</label>
<led>
<halpin>"spindle-at-speed-led"</halpin>
<size>30</size>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</led>
</hbox>
</vbox>
</pyvcp>

11
printnc/pyvcp_options.hal Normal file
View File

@ -0,0 +1,11 @@
# _DO NOT_ include your HAL commands here.
# Put custom HAL commands in custom_postgui.hal
# The commands in this file are run after the GUI loads
# **** Setup of spindle speed display using pyvcp -START ****
#net spindle-vel-cmd-rpm-abs => pyvcp.spindle-speed
#net spindle-at-speed => pyvcp.spindle-at-speed-led
# **** Setup of spindle speed display using pyvcp -END ****

2
printnc/shutdown.hal Normal file
View File

@ -0,0 +1,2 @@
# Include your shutdown HAL commands here
# This file will not be overwritten when you run PNCconf again

5
printnc/tool.tbl Normal file
View File

@ -0,0 +1,5 @@
T1 P1 Z0.511 D3 ;3mm end mill Sample Tool
T2 P4 Z0.1 D1.5 ;1.5mm end mill Sample Tool
T3 P3 Z1.273 D5 ;5mm tap drill Sample Tool
T4 P2 Z10 D16 ;16 mm Sample Tool
T5 P5 Z25 D25 ;25mm er Sample Tool

460
printnc/vfd.clp Normal file
View File

@ -0,0 +1,460 @@
_FILES_CLASSICLADDER
_FILE-rung_0.csv
#VER=2.0
#LABEL=
#COMMENT=
#PREVRUNG=2
#NEXTRUNG=0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
_/FILE-rung_0.csv
_FILE-sequential.csv
#VER=1.0
_/FILE-sequential.csv
_FILE-rung_4.csv
#VER=2.0
#LABEL=
#COMMENT=
#PREVRUNG=10
#NEXTRUNG=5
0-0-0/0 , 0-0-0/0 , 0-0-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4,
%IW5,%IW5,
%IW6,%IW6,
%IW7,%IW7,
%IW8,%IW8,
%IW9,%IW9,
%QW0,%QW0,no signal connected
%QW1,%QW1,
%QW2,%QW2,
%QW3,%QW3,
%QW4,%QW4,
%QW5,%QW5,
%QW6,%QW6,
%QW7,%QW7,
%QW8,%QW8,
%QW9,%QW9,
%IF0,Feq. Cmd.,
%IF1,%IF1,
%IF2,%IF2,
%IF3,%IF3,
%IF4,%IF4,
%IF5,%IF5,
%IF6,%IF6,
%IF7,%IF7,
%IF8,%IF8,
%IF9,%IF9,
%QF0,%QF0,
%QF1,%QF1,
%QF2,%QF2,
%QF3,%QF3,
%QF4,%QF4,
%QF5,%QF5,
%QF6,%QF6,
%QF7,%QF7,
%QF8,%QF8,
%QF9,%QF9,
%T0,%T0,Old Timer
%T1,%T1,Old Timer
%T2,%T2,Old Timer
%T3,%T3,Old Timer
%T4,%T4,Old Timer
%T5,%T5,Old Timer
%T6,%T6,Old Timer
%T7,%T7,Old Timer
%T8,%T8,Old Timer
%T9,%T9,Old Timer
%TM0,%TM0,New Timer
%TM1,%TM1,New Timer
%TM2,%TM2,New Timer
%TM3,%TM3,New Timer
%TM4,%TM4,New Timer
%TM5,%TM5,New Timer
%TM6,%TM6,New Timer
%TM7,%TM7,New Timer
%TM8,%TM8,New Timer
%TM9,%TM9,New Timer
%M0,%M0,One-shot
%M1,%M1,One-shot
%M2,%M2,One-shot
%M3,%M3,One-shot
%M4,%M4,One-shot
%M5,%M5,One-shot
%M6,%M6,One-shot
%M7,%M7,One-shot
%M8,%M8,One-shot
%M9,%M9,One-shot
%C0,%C0,Counter
%C1,%C1,Counter
%C2,%C2,Counter
%C3,%C3,Counter
%C4,%C4,Counter
%C5,%C5,Counter
%C6,%C6,Counter
%C7,%C7,Counter
%C8,%C8,Counter
%C9,%C9,Counter
%E0,%E0,Error Flag Bit
%E1,%E1,Error Flag Bit
%E2,%E2,Error Flag Bit
%E3,%E3,Error Flag Bit
%E4,%E4,Error Flag Bit
%E5,%E5,Error Flag Bit
%E6,%E6,Error Flag Bit
%E7,%E7,Error Flag Bit
%E8,%E8,Error Flag Bit
%E9,%E9,Error Flag Bit
%QW10,%QW10,
%QW11,%QW11,
%QW12,%QW12,
%QW13,%QW13,
%QW14,%QW14,
%QW15,%QW15,
%QW16,%QW16,
%QW17,%QW17,
%QW18,%QW18,
%QW19,%QW19,
%QW20,%QW20,
%QW21,%QW21,
%QW22,%QW22,
%QW23,%QW23,
%QW24,%QW24,
%QW25,%QW25,
%QW26,%QW26,
%QW27,%QW27,
%QW28,%QW28,
%QW29,%QW29,
%QW30,%QW30,
%QW31,%QW31,
%QW32,%QW32,
%QW33,%QW33,
%QW34,%QW34,
%QW35,%QW35,
%QW36,%QW36,
%QW37,%QW37,
%QW38,%QW38,
%QW39,%QW39,
%QW40,%QW40,
%QW41,%QW41,
%QW42,%QW42,
%QW43,%QW43,
%QW44,%QW44,
%QW45,%QW45,
%QW46,%QW46,
%QW47,%QW47,
%QW48,%QW48,
%QW49,%QW49,
_/FILE-symbols.csv
_FILE-sections.csv
#VER=1.0
#NAME000=Prog1
000,0,-1,1,0,0
_/FILE-sections.csv
_FILE-arithmetic_expressions.csv
#VER=2.0
0000,@310/0@=@280/3@*6
0001,@200/1@=@300/0@*10
0002,@200/0@=1
0003,@200/2@=@300/1@*10
0004,@200/0@=18
0005,@200/0@=34
0006,@280/2@=@280/3@
0007,@200/3@=@300/1@*10
_/FILE-arithmetic_expressions.csv
_FILE-rung_6.csv
#VER=2.0
#LABEL=
#COMMENT=
#PREVRUNG=1
#NEXTRUNG=7
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 9-0-0/0 , 99-0-0/0 , 99-0-0/0 , 60-0-0/1
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
_/FILE-rung_6.csv
_FILE-modbusioconf.csv
#VER=1.0
1,5,8200,19,0,0
1,3,8192,1,0,0
1,3,8193,1,0,1
1,3,8194,1,0,2
1,3,8195,1,0,3
_/FILE-modbusioconf.csv
_FILE-com_params.txt
MODBUS_MASTER_SERIAL_PORT=/dev/rs485_dongle
MODBUS_MASTER_SERIAL_SPEED=19200
MODBUS_MASTER_SERIAL_DATABITS=8
MODBUS_MASTER_SERIAL_STOPBITS=1
MODBUS_MASTER_SERIAL_PARITY=0
MODBUS_ELEMENT_OFFSET=0
MODBUS_MASTER_SERIAL_USE_RTS_TO_SEND=0
MODBUS_MASTER_TIME_INTER_FRAME=100
MODBUS_MASTER_TIME_OUT_RECEIPT=500
MODBUS_MASTER_TIME_AFTER_TRANSMIT=100
MODBUS_DEBUG_LEVEL=0
MODBUS_MAP_COIL_READ=0
MODBUS_MAP_COIL_WRITE=1
MODBUS_MAP_INPUT=0
MODBUS_MAP_HOLDING=0
MODBUS_MAP_REGISTER_READ=1
MODBUS_MAP_REGISTER_WRITE=0
_/FILE-com_params.txt
_FILE-rung_1.csv
#VER=2.0
#LABEL=
#COMMENT=
#PREVRUNG=-1
#NEXTRUNG=6
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0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_NBR_MONOSTABLES=10
SIZE_NBR_COUNTERS=10
SIZE_NBR_TIMERS_IEC=10
SIZE_NBR_PHYS_INPUTS=15
SIZE_NBR_PHYS_OUTPUTS=15
SIZE_NBR_ARITHM_EXPR=100
SIZE_NBR_SECTIONS=10
SIZE_NBR_SYMBOLS=200
_/FILE-general.txt
_FILE-ioconf.csv
#VER=1.0
_/FILE-ioconf.csv
_FILE-rung_3.csv
#VER=2.0
#LABEL=
#COMMENT=
#PREVRUNG=8
#NEXTRUNG=2
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0 , 0-0-0/0
_/FILE-rung_3.csv
_FILE-timers_iec.csv
1,0,0
1,0,0
1,0,0
1,0,0
1,0,0
1,0,0
1,0,0
1,0,0
1,0,0
1,0,0
_/FILE-timers_iec.csv
_/FILES_CLASSICLADDER

7
printnc/vfd.hal Normal file
View File

@ -0,0 +1,7 @@
# Spindle output speed
net spindle-at-speed classicladder.0.out-01 <= pyvcp.at-speed
net spindle-speed-out classicladder.0.floatout-00 pyvcp.rpm-out
net spindle-acc classicladder.0.floatin-01 pyvcp.acc-f
# Communication
net pyvcp-is-connected classicladder.0.out-00 => pyvcp.is-connected

42
printnc/vfd.xml Normal file
View File

@ -0,0 +1,42 @@
<pyvcp>
<labelframe text="config">
<meter>
<halpin>"rpm-out"</halpin>
<text>"Spindle"</text>
<subtext>"rpm"</subtext>
<size>250</size>
<min_>0</min_>
<max_>24000</max_>
<majorscale>3000</majorscale>
<minorscale>1000</minorscale>
<region1>(0,4000,"yellow")</region1>
<region2>(4001,23000,"green")</region2>
<region3>(23000,24000,"red")</region3>
</meter>
<table flexible_rows="[1]" flexible_columns="[2]">
<tablerow/>
<label text="Spindle at speed"/>
<led halpin="at-speed" size="12" on_color="green" off_color="red"/>
<tablerow/>
<label text="'\nParameters:'"/>
<tablerow/>
<label text="Acc time in s"/>
<scale>
<font>("Helvetica",10)</font>
<width>"20"</width>
<halpin>"acc"</halpin>
<resolution>0.1</resolution>
<orient>HORIZONTAL</orient>
<initval>5</initval>
<min_>3</min_>
<max_>15</max_>
<param_pin>0</param_pin>
</scale>
<tablerow/>
<label text="'\nRS485:'"/>
<tablerow/>
<label text="Is connected"/>
<led halpin="is-connected" size="12" on_color="green" off_color="red"/>
</table>
</labelframe>
</pyvcp>