- Configuring LinuxCNC
- Advanced Configuration
- Mesa 7i96 need help configuring Huanyang VFD spindle over RS485 Modbus
Mesa 7i96 need help configuring Huanyang VFD spindle over RS485 Modbus
15 Jun 2020 04:48 - 23 Jun 2020 04:06 #171677
by drack
I have confirmed the usb to rs485 adapter works and the vfd is communicating with spindle talker on a windows pc. I seem to be getting a communication error when I try to manually run the spindle in a terminal window with halcmd.
There is a communication error over and over and there is a FALSE on the hycomm_ok pin. Everything is configured the same as what worked in spindle talker for my VFD and I think there may be some settings in Debian that are messed up. Anyone know how I can get this sorted?
Edit** Updated to Linuxcnc 8 through buildbot and Pncconf Wizard has the 7i96 listed, following is no longer accurate
I created the config with the Mesa 7i96 Configuration Tool at github.com/jethornton/7i96, I was unable to find a good walk-through for creating a configuration for this card with Pncconf Wizard but got it working and everything is working except the spindle for my xyzaw machine. It's a 3 axis cnc router with a removable 4th axis turner and I am considering a 5th axis removable unit.
I am now trying to configure the spindle for control over RS485 Modbus with the hy_vfd driver to control my Huanyang VFD.
It allows me to start linuxcnc without any errors and after homing all the axis the manual spindle CW button does not start the spindle in manual or when putting "m3 s10000" in the MID controller. I have never used G code before and I may be missing some basic principles.
I tried following the official documentation,
linuxcnc.org/docs/2.7/html/man/man1/hy_gt_vfd.1.html
I tried following this youtube video,
And multiple combinations of multiple forum posts about the hy_vfd driver to control Huanyang VFD's
I could use some help as I have many days in hours getting to this point and have finally hit a wall that time and persistence doesn't seem to be solving. If anyone can point out the problem or point me to some materials to set this up correctly that would be swell.
.ini
.hal
io.hal
custom.hal
halcmd loadusr -Wn spindle-vfd hy_vfd -n spindle-vfd -t 1 -d /dev/ttyUSB0 -p none -r 9600 -s 1
halcmd setp spindle-vfd.enable 1
halcmd show pin
There is a communication error over and over and there is a FALSE on the hycomm_ok pin. Everything is configured the same as what worked in spindle talker for my VFD and I think there may be some settings in Debian that are messed up. Anyone know how I can get this sorted?
Edit** Updated to Linuxcnc 8 through buildbot and Pncconf Wizard has the 7i96 listed, following is no longer accurate
Warning: Spoiler!
I created the config with the Mesa 7i96 Configuration Tool at github.com/jethornton/7i96, I was unable to find a good walk-through for creating a configuration for this card with Pncconf Wizard but got it working and everything is working except the spindle for my xyzaw machine. It's a 3 axis cnc router with a removable 4th axis turner and I am considering a 5th axis removable unit.
I am now trying to configure the spindle for control over RS485 Modbus with the hy_vfd driver to control my Huanyang VFD.
It allows me to start linuxcnc without any errors and after homing all the axis the manual spindle CW button does not start the spindle in manual or when putting "m3 s10000" in the MID controller. I have never used G code before and I may be missing some basic principles.
I tried following the official documentation,
linuxcnc.org/docs/2.7/html/man/man1/hy_gt_vfd.1.html
I tried following this youtube video,
And multiple combinations of multiple forum posts about the hy_vfd driver to control Huanyang VFD's
I could use some help as I have many days in hours getting to this point and have finally hit a wall that time and persistence doesn't seem to be solving. If anyone can point out the problem or point me to some materials to set this up correctly that would be swell.
.ini
[EMC]
VERSION = 1.1
MACHINE = hwk-6090
DEBUG = 0x00000000
[HOSTMOT2]
DRIVER = hm2_eth
IPADDRESS = "192.168.1.121"
BOARD = 7i96
STEPGENS = 5
ENCODERS = 1
SSERIAL_PORT = 1
[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
CYCLE_TIME = 0.1
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 0
OPEN_FILE = ""
PYVCP = hwk-6090.xml
[KINS]
KINEMATICS = trivkins coordinates=XYZWA
JOINTS = 5
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[RS274NGC]
PARAMETER_FILE = hwk-6090.var
[EMCMOT]
EMCMOT = motmod
SERVO_PERIOD = 1000000
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[TRAJ]
COORDINATES = XYZWA
LINEAR_UNITS = metric
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 5000
[HAL]
HALFILE = hwk-6090.hal
HALFILE = io.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui.hal
[HALUI]
[AXIS_X]
MIN_LIMIT = 0
MAX_LIMIT = 600
MAX_VELOCITY = 1500
MAX_ACCELERATION = 750
[AXIS_Y]
MIN_LIMIT = 0
MAX_LIMIT = 900
MAX_VELOCITY = 1500
MAX_ACCELERATION = 750
[AXIS_Z]
MIN_LIMIT = 0
MAX_LIMIT = 190
MAX_VELOCITY = 1500
MAX_ACCELERATION = 750
[AXIS_A]
MIN_LIMIT = -9999
MAX_LIMIT = 9999
MAX_VELOCITY = 1500
MAX_ACCELERATION = 750
[AXIS_W]
MIN_LIMIT = 0
MAX_LIMIT = 200
MAX_VELOCITY = 1500
MAX_ACCELERATION = 750
[JOINT_0]
AXIS = X
MIN_LIMIT = 0
MAX_LIMIT = 600
MAX_VELOCITY = 1500
MAX_ACCELERATION = 750
TYPE = LINEAR
SCALE = -39.37
STEPGEN_MAX_VEL = 1800.0
STEPGEN_MAX_ACC = 900.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 1000
DIRHOLD = 1000
STEPLEN = 2500
STEPSPACE = 2500
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = 0
HOME_SEARCH_VEL = 120
HOME_LATCH_VEL = 30
HOME_SEQUENCE = 0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
[JOINT_1]
AXIS = Y
MIN_LIMIT = 0
MAX_LIMIT = 900
MAX_VELOCITY = 1500
MAX_ACCELERATION = 750
TYPE = LINEAR
SCALE = 39.37
STEPGEN_MAX_VEL = 1800.0
STEPGEN_MAX_ACC = 900.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 1000
DIRHOLD = 1000
STEPLEN = 2500
STEPSPACE = 2500
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = 0
HOME_SEARCH_VEL = 120
HOME_LATCH_VEL = 30
HOME_SEQUENCE = 0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
[JOINT_2]
AXIS = Z
MIN_LIMIT = 0
MAX_LIMIT = 190
MAX_VELOCITY = 1500
MAX_ACCELERATION = 750
TYPE = LINEAR
SCALE = 39.37
STEPGEN_MAX_VEL = 1800.0
STEPGEN_MAX_ACC = 900.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 1000
DIRHOLD = 1000
STEPLEN = 2500
STEPSPACE = 2500
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = 0
HOME_SEARCH_VEL = -120
HOME_LATCH_VEL = -30
HOME_SEQUENCE = 0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
[JOINT_3]
AXIS = W
MIN_LIMIT = 0
MAX_LIMIT = 200
MAX_VELOCITY = 1500
MAX_ACCELERATION = 750
TYPE = LINEAR
SCALE = 39.37
STEPGEN_MAX_VEL = 1800.0
STEPGEN_MAX_ACC = 900.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 1000
DIRHOLD = 1000
STEPLEN = 2500
STEPSPACE = 2500
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = 0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
[JOINT_4]
AXIS = A
MIN_LIMIT = -9999
MAX_LIMIT = 9999
MAX_VELOCITY = 1500
MAX_ACCELERATION = 750
TYPE = ANGULAR
SCALE = 39.37
STEPGEN_MAX_VEL = 1800.0
STEPGEN_MAX_ACC = 900.0
FERROR = 0.0051
MIN_FERROR = 0.0025
DIRSETUP = 1000
DIRHOLD = 1000
STEPLEN = 2500
STEPSPACE = 2500
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.00013
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME = 0
HOME_OFFSET = 0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
[SPINDLE]
SPINDLE_TYPE = False
SCALE =
PWM_FREQUENCY = 20000
MAX_RPM = 24000
MIN_RPM = 5000
DEADBAND =
P =
I =
D =
FF0 =
FF1 =
FF2 =
BIAS =
MAX_ERROR =
[INPUTS]
# DO NOT change the input text
INPUT_0 = Home
INPUT_JOINT_0 = 2
INPUT_1 = Home
INPUT_JOINT_1 = 1
INPUT_2 = Home
INPUT_JOINT_2 = 0
INPUT_3 = Home
INPUT_JOINT_3 = 4
INPUT_4 = Select
INPUT_JOINT_4 = False
INPUT_5 = Select
INPUT_JOINT_5 = False
INPUT_6 = Select
INPUT_JOINT_6 = False
INPUT_7 = Select
INPUT_JOINT_7 = False
INPUT_8 = Select
INPUT_JOINT_8 = False
INPUT_9 = Select
INPUT_JOINT_9 = False
INPUT_10 = Select
INPUT_JOINT_10 = False
[OUTPUTS]
# DO NOT change the output text
OUTPUT_0 = Select
OUTPUT_1 = Select
OUTPUT_2 = Select
OUTPUT_3 = Select
OUTPUT_4 = Select
[OPTIONS]
MANUAL_TOOL_CHANGE = True
HALUI = False
PYVCP = True
GLADEVCP = False
LADDER = False
.hal
# kinematics
loadrt [KINS]KINEMATICS
# motion controller
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
# standard components
loadrt pid num_chan=5
# hostmot2 driver
loadrt hostmot2
loadrt [HOSTMOT2](DRIVER) board_ip=[HOSTMOT2](IPADDRESS) config="num_encoders=[HOSTMOT2](ENCODERS) num_stepgens=[HOSTMOT2](STEPGENS) sserial_port_0=[HOSTMOT2](SSERIAL_PORT)"
setp hm2_[HOSTMOT2](BOARD).0.watchdog.timeout_ns 25000000
#load spindle
loadrt abs names=abs.spindle
loadrt lowpass names=lowpass.spindle
# THREADS
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
setp hm2_[HOSTMOT2](BOARD).0.dpll.01.timer-us -100
setp hm2_[HOSTMOT2](BOARD).0.stepgen.timer-number 1
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf pid.3.do-pid-calcs servo-thread
addf pid.4.do-pid-calcs servo-thread
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread
# Joint 0
# axis enable chain
newsig emcmot.0.enable bit
sets emcmot.0.enable FALSE
net emcmot.0.enable <= joint.0.amp-enable-out
net emcmot.0.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.00.enable pid.0.enable
# position command and feedback
net emcmot.0.pos-cmd joint.0.motor-pos-cmd => pid.0.command
net motor.0.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb joint.0.motor-pos-fb pid.0.feedback
net motor.0.command pid.0.output hm2_[HOSTMOT2](BOARD).0.stepgen.00.velocity-cmd
setp pid.0.error-previous-target true
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-scale [JOINT_0]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.00.control-type 1
setp pid.0.Pgain [JOINT_0]P
setp pid.0.Igain [JOINT_0]I
setp pid.0.Dgain [JOINT_0]D
setp pid.0.bias [JOINT_0]BIAS
setp pid.0.FF0 [JOINT_0]FF0
setp pid.0.FF1 [JOINT_0]FF1
setp pid.0.FF2 [JOINT_0]FF2
setp pid.0.deadband [JOINT_0]DEADBAND
setp pid.0.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.0.maxerror [JOINT_0]MAX_ERROR
# Joint 1
# axis enable chain
newsig emcmot.1.enable bit
sets emcmot.1.enable FALSE
net emcmot.1.enable <= joint.1.amp-enable-out
net emcmot.1.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable pid.1.enable
# position command and feedback
net emcmot.1.pos-cmd joint.1.motor-pos-cmd => pid.1.command
net motor.1.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb joint.1.motor-pos-fb pid.1.feedback
net motor.1.command pid.1.output hm2_[HOSTMOT2](BOARD).0.stepgen.01.velocity-cmd
setp pid.1.error-previous-target true
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.dirhold [JOINT_1]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.steplen [JOINT_1]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.stepspace [JOINT_1]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-scale [JOINT_1]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.01.control-type 1
setp pid.1.Pgain [JOINT_1]P
setp pid.1.Igain [JOINT_1]I
setp pid.1.Dgain [JOINT_1]D
setp pid.1.bias [JOINT_1]BIAS
setp pid.1.FF0 [JOINT_1]FF0
setp pid.1.FF1 [JOINT_1]FF1
setp pid.1.FF2 [JOINT_1]FF2
setp pid.1.deadband [JOINT_1]DEADBAND
setp pid.1.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.1.maxerror [JOINT_1]MAX_ERROR
# Joint 2
# axis enable chain
newsig emcmot.2.enable bit
sets emcmot.2.enable FALSE
net emcmot.2.enable <= joint.2.amp-enable-out
net emcmot.2.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.02.enable pid.2.enable
# position command and feedback
net emcmot.2.pos-cmd joint.2.motor-pos-cmd => pid.2.command
net motor.2.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb joint.2.motor-pos-fb pid.2.feedback
net motor.2.command pid.2.output hm2_[HOSTMOT2](BOARD).0.stepgen.02.velocity-cmd
setp pid.2.error-previous-target true
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirsetup [JOINT_2]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.dirhold [JOINT_2]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.steplen [JOINT_2]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.stepspace [JOINT_2]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-scale [JOINT_2]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxvel [JOINT_2]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.maxaccel [JOINT_2]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.02.control-type 1
setp pid.2.Pgain [JOINT_2]P
setp pid.2.Igain [JOINT_2]I
setp pid.2.Dgain [JOINT_2]D
setp pid.2.bias [JOINT_2]BIAS
setp pid.2.FF0 [JOINT_2]FF0
setp pid.2.FF1 [JOINT_2]FF1
setp pid.2.FF2 [JOINT_2]FF2
setp pid.2.deadband [JOINT_2]DEADBAND
setp pid.2.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.2.maxerror [JOINT_2]MAX_ERROR
# Joint 3
# axis enable chain
newsig emcmot.3.enable bit
sets emcmot.3.enable FALSE
net emcmot.3.enable <= joint.3.amp-enable-out
net emcmot.3.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.03.enable pid.3.enable
# position command and feedback
net emcmot.3.pos-cmd joint.3.motor-pos-cmd => pid.3.command
net motor.3.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-fb joint.3.motor-pos-fb pid.3.feedback
net motor.3.command pid.3.output hm2_[HOSTMOT2](BOARD).0.stepgen.03.velocity-cmd
setp pid.3.error-previous-target true
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.dirsetup [JOINT_3]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.dirhold [JOINT_3]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.steplen [JOINT_3]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.stepspace [JOINT_3]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-scale [JOINT_3]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.maxvel [JOINT_3]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.maxaccel [JOINT_3]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.control-type 1
setp pid.3.Pgain [JOINT_3]P
setp pid.3.Igain [JOINT_3]I
setp pid.3.Dgain [JOINT_3]D
setp pid.3.bias [JOINT_3]BIAS
setp pid.3.FF0 [JOINT_3]FF0
setp pid.3.FF1 [JOINT_3]FF1
setp pid.3.FF2 [JOINT_3]FF2
setp pid.3.deadband [JOINT_3]DEADBAND
setp pid.3.maxoutput [JOINT_3]MAX_OUTPUT
setp pid.3.maxerror [JOINT_3]MAX_ERROR
# Joint 4
# axis enable chain
newsig emcmot.4.enable bit
sets emcmot.4.enable FALSE
net emcmot.4.enable <= joint.4.amp-enable-out
net emcmot.4.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.04.enable pid.4.enable
# position command and feedback
net emcmot.4.pos-cmd joint.4.motor-pos-cmd => pid.4.command
net motor.4.pos-fb <= hm2_[HOSTMOT2](BOARD).0.stepgen.04.position-fb joint.4.motor-pos-fb pid.4.feedback
net motor.4.command pid.4.output hm2_[HOSTMOT2](BOARD).0.stepgen.04.velocity-cmd
setp pid.4.error-previous-target true
setp hm2_[HOSTMOT2](BOARD).0.stepgen.04.dirsetup [JOINT_4]DIRSETUP
setp hm2_[HOSTMOT2](BOARD).0.stepgen.04.dirhold [JOINT_4]DIRHOLD
setp hm2_[HOSTMOT2](BOARD).0.stepgen.04.steplen [JOINT_4]STEPLEN
setp hm2_[HOSTMOT2](BOARD).0.stepgen.04.stepspace [JOINT_4]STEPSPACE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.04.position-scale [JOINT_4]SCALE
setp hm2_[HOSTMOT2](BOARD).0.stepgen.04.maxvel [JOINT_4]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.04.maxaccel [JOINT_4]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.04.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.04.control-type 1
setp pid.4.Pgain [JOINT_4]P
setp pid.4.Igain [JOINT_4]I
setp pid.4.Dgain [JOINT_4]D
setp pid.4.bias [JOINT_4]BIAS
setp pid.4.FF0 [JOINT_4]FF0
setp pid.4.FF1 [JOINT_4]FF1
setp pid.4.FF2 [JOINT_4]FF2
setp pid.4.deadband [JOINT_4]DEADBAND
setp pid.4.maxoutput [JOINT_4]MAX_OUTPUT
setp pid.4.maxerror [JOINT_4]MAX_ERROR
# Spindle
# Standard I/O Block - EStop, Etc
# create a signal for the estop loopback
net estop-loop iocontrol.0.user-enable-out => iocontrol.0.emc-enable-in
# create signals for tool loading loopback
net tool-prep-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net tool-change-loop iocontrol.0.tool-change => iocontrol.0.tool-changed
io.hal
net home-joint-2 joint.2.home-sw-in <= hm2_7i96.0.gpio.000.in
net home-joint-1 joint.1.home-sw-in <= hm2_7i96.0.gpio.001.in
net home-joint-0 joint.0.home-sw-in <= hm2_7i96.0.gpio.002.in
net home-joint-4 joint.4.home-sw-in <= hm2_7i96.0.gpio.003.in
custom.hal
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 19200
net spindle-cmd-rpm-abs => vfd.speed-command
net spindle-cw spindle.0.forward => vfd.spindle-forward
net spindle-ccw spindle.0.reverse => vfd.spindle-reverse
net on spindle.0.on => vfd.spindle-on
Last edit: 23 Jun 2020 04:06 by drack.
Please Log in or Create an account to join the conversation.
15 Jun 2020 06:44 #171684
by bbsr_5a
Replied by bbsr_5a on topic Mesa 7i96 need help configuring Huanyang VFD spindle over RS485 Modbus
Hi
you got the wrong component
use mb2hal to controll over Modebus
the component you use is for a PWM or analog 0-10V setup
you got the wrong component
use mb2hal to controll over Modebus
the component you use is for a PWM or analog 0-10V setup
Please Log in or Create an account to join the conversation.
15 Jun 2020 14:36 - 16 Jun 2020 19:15 #171747
by drack
Replied by drack on topic Mesa 7i96 need help configuring Huanyang VFD spindle over RS485 Modbus
Updated to Linuxcnc 2.8 buildbot and Pncconf Wizard has the 7i96 listed
Warning: Spoiler!
I missed a line when copying the custom.hal to the post.
Can you point out the places I messed up and how to fix it?
I removed from .ini
The video shows this as working with stepconfig file. The only difference I see is the following
Added to .hal
With this added I get a stepgen.capture-position error.
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 19200
net spindle-cmd-rpm-abs => vfd.speed-command
net spindle-cw spindle.0.forward => vfd.spindle-forward
net spindle-ccw spindle.0.reverse => vfd.spindle-reverse
net on spindle.0.on => vfd.spindle-on
Can you point out the places I messed up and how to fix it?
I removed from .ini
SPINDLE_TYPE = False
SCALE =
PWM_FREQUENCY = 20000
MAX_RPM = 24000
MIN_RPM = 5000
DEADBAND =
P =
I =
D =
FF0 =
FF1 =
FF2 =
BIAS =
MAX_ERROR =
The video shows this as working with stepconfig file. The only difference I see is the following
Added to .hal
addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
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
net spindle-at-speed => spindle.0.at-speed
With this added I get a stepgen.capture-position error.
Last edit: 16 Jun 2020 19:15 by drack.
Please Log in or Create an account to join the conversation.
18 Jun 2020 17:47 - 18 Jun 2020 17:48 #172025
by drack
Replied by drack on topic Mesa 7i96 need help configuring Huanyang VFD spindle over RS485 Modbus
I have since got this sorted to be a communication issue in Debian that is not present in windows. I am currently looking for assistance in getting communications to work with the VFD and hy_vfd in terminal with halcmd. I have verified that the usb to rs485 is ttyUSB0 and that the user has dialout permissions and tried the following,
Any help would be greatly appreciated.
# modprobe -r ftdi_sio
# modprobe ftdi_sio vendor=0xDevice Vendor Numbers product=0xDevice Product Numbers
# ls -al /dev/ttyUSB0
crw-rw—-1 root uucp 188, 0 2008-05-08 10:59 /dev/ttyUSB0
# chmod 777 /dev/ttyUSB0
Any help would be greatly appreciated.
Last edit: 18 Jun 2020 17:48 by drack.
Please Log in or Create an account to join the conversation.
21 Jun 2020 20:13 #172272
by drack
Replied by drack on topic Mesa 7i96 need help configuring Huanyang VFD spindle over RS485 Modbus
I suspect the USB to RS485 adapter is the suspect. It looks the same as others used but after opening it up the "ch340T" chip does not have any markings and the M12 spot is not populated. I am going to try the one at the following link as the photo shows the chip manufacturer markings and mine is suspect to being a "ch340T" at all.
www.amazon.com/gp/product/B00NKAJGZM/ref...00_s00?ie=UTF8&psc=1
www.amazon.com/gp/product/B00NKAJGZM/ref...00_s00?ie=UTF8&psc=1
Please Log in or Create an account to join the conversation.
21 Jun 2020 20:44 #172273
by Hakan
Replied by Hakan on topic Mesa 7i96 need help configuring Huanyang VFD spindle over RS485 Modbus
In the line in the first post you seem to have written 9600-s, there should be a space after the 9600.
In the description of the hy_vfd component it is said how to enter the correct settings in the huan yang vfd. That must be done, also double check that communication settings on the loadusr line really agree with the settings in the vfd. Other than that you can try switching the A and B and if you don't already have that use twisted pair cable.
It is also helpful to see what the communication eŕror message say in full, there are a few variants.
In the description of the hy_vfd component it is said how to enter the correct settings in the huan yang vfd. That must be done, also double check that communication settings on the loadusr line really agree with the settings in the vfd. Other than that you can try switching the A and B and if you don't already have that use twisted pair cable.
It is also helpful to see what the communication eŕror message say in full, there are a few variants.
Please Log in or Create an account to join the conversation.
23 Jun 2020 04:04 #172417
by drack
Replied by drack on topic Mesa 7i96 need help configuring Huanyang VFD spindle over RS485 Modbus
I just got the new USB adapter and now the VFD coms ok is true in show pin for hy_vfd. I think I will be beyond this hurdle as there was a problem with the old USB adapter, I will spend a few hours on it tomorrow.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- Mesa 7i96 need help configuring Huanyang VFD spindle over RS485 Modbus
Time to create page: 0.087 seconds