Help with my "Linxcnc for Dummies" web page.

More
09 May 2014 05:12 #46740 by andypugh

I still need (Soon or Eventually) a good VFD with encoder HAL to copy..


What does the encoder do? It is entirely possible that the encoder will only connect to the drive, leaving LinuxCNC unaware that it exists. In that case the HAL will look just the same as a non-encoder VFD.

Connecting a VFD to a 7i77 should only be about 4 lines of HAL.
The following user(s) said Thank You: greeder88

Please Log in or Create an account to join the conversation.

More
09 May 2014 15:00 #46751 by greeder88
Thank you very much.
Like a combination lock. A mind boggling problem solved with very little information.
Looks like it it was money well spent buying a Vector drive.

Please Log in or Create an account to join the conversation.

More
10 May 2014 00:04 #46767 by greeder88
I can't get the 4th axis motor to reverse direction and keep getting runaway no matter what I do.

I took the connector for the +&- 10v off of the 7i77 and used a 1.5v battery to the drive and no trouble changing motor direction.
Tested encoder and working good.
Checked configuration 3 or 4 times and same as other axis.
Changed scale sign multiple times.

The trouble comes down to SCALEMAX is inoperative.
Changing the sign doesn't do anything unlike my other axis.
I'm thinking it might be a defect in the 7i77 TB-3 DRV3 circuit.
I have DRV4 available if this is the case.

Any other things to check or test?
Can I just ignore DRV3 and use DRV4 changing the configuration to from 3 to 4?

Please Log in or Create an account to join the conversation.

More
10 May 2014 00:11 #46768 by PCW
Can you post your current hal and ini files?

Please Log in or Create an account to join the conversation.

More
10 May 2014 01:24 - 10 May 2014 01:26 #46772 by greeder88
Top is INI then Hal files.
I found a few issues during my checks but didn't find the solution.
Thanks



# 5i25/7i77 ini file

[EMC]
MACHINE = 7i77
DEBUG = 0

[DISPLAY]
DISPLAY = axis
PYVCP = tabs.xml
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 1.2
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5

# the next line will need to be modified to point to the nc_files folder
PROGRAM_PREFIX = /home/George/linuxcnc/nc_files

INCREMENTS = .1in .05in .01in .005in .001in .0005in .0001in

[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 = 7i77.var

[EMCMOT]
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010

[HAL]
HALFILE = 7i77.hal
POSTGUI_HALFILE = postgui.hal
HALFILE = jog-pendant.hal
HALUI=halui

[HALUI]
MDI_COMMAND = G0 G53 Z0
MDI_COMMAND = G0 G53 X0Y0Z0
MDI_COMMAND = G0 X0Y0
MDI_COMMAND = G0 Z0

[TRAJ]
AXES = 4
COORDINATES = X Y Z A
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 0.10
MAX_LINEAR_VELOCITY = 1.00

[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl

#### the axis values need to be updated to your machine

[AXIS_0]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.050
MIN_FERROR = 0.01

# put how many pulses from the encoder per inch here
#1000=-40000,250=10000,1024=40960,500=20000
INPUT_SCALE = 10000
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0

MIN_LIMIT = -.45
MAX_LIMIT = 29.5
HOME = 0.000
HOME_OFFSET = .05
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
# the X axis encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES

# PID tuning params
DEADBAND = 0.000015
P = 20
I = 0
D = 0
FF0 = 0
FF1 = 1.4
FF2 = 0.01
BIAS = 0.000

[AXIS_1]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.050
MIN_FERROR = 0.01

# put how many pulses from the encoder per inch here
INPUT_SCALE = -10000
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0

MIN_LIMIT = -.5
MAX_LIMIT = 14.45
HOME = 0.000
HOME_OFFSET = .05
HOME_SEARCH_VEL = -.5
HOME_LATCH_VEL = 0.10
# the Y axis encoder has an index channel, so we use it to improve the home accuracy
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES

# PID tuning params
DEADBAND = 0.000015
P = 20
I = 0
D = 0
FF0 = 0
FF1 = 1.4
FF2 = 0.01
BIAS = 0.000

[AXIS_2]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.050
MIN_FERROR = 0.01

# put how many pulses from the encoder per inch here
INPUT_SCALE = 10000
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0

MIN_LIMIT = -4.75
MAX_LIMIT = .25
HOME = .0
HOME_OFFSET = 0.05
HOME_SEARCH_VEL = 0.5
HOME_LATCH_VEL = 0.10
# the Z axis encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES

# PID tuning params
DEADBAND = 0.00015
P = 20
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.01
BIAS = 0.000



[AXIS_3]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.50
MIN_FERROR = 0.2

# put how many pulses from the encoder per inch here
INPUT_SCALE = 40960
OUTPUT_SCALE = 1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0

MIN_LIMIT = -4.875
MAX_LIMIT = .5
HOME = 0.0
HOME_OFFSET = 1.9
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
# the A axis encoder does not have an index channel, so we have to home without index
HOME_USE_INDEX = YES
HOME_IGNORE_LIMITS = YES

# PID tuning params
DEADBAND = 0.000015
P = 20
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0.0
BIAS = 0.000











# 5i25/7i77 HAL File

# kinematics
loadrt trivkins

# motion controller
loadrt motmod servo_period_nsec=1000000 num_joints=[TRAJ]AXES

# hostmot2 driver
# if you have any firmware trouble, enable the debug flags here and see what's going on in the syslog
#loadrt hostmot2 debug_idrom=1 debug_module_descriptors=1 debug_pin_descriptors=1 debug_modules=1
loadrt hostmot2

# load low-level driver
loadrt hm2_pci config="num_encoders=6 sserial_port_0=003xxx"

loadrt and2 count=4
loadrt or2 count=1
loadrt toggle count=1
loadrt toggle2nist count=1


# pid
loadrt pid num_chan=4

setp hm2_5i25.0.watchdog.timeout_ns 10000000

# Threads
addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
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 hm2_5i25.0.write servo-thread
addf hm2_5i25.0.pet_watchdog servo-thread

# X Axis
setp hm2_5i25.0.encoder.00.scale [AXIS_0]INPUT_SCALE
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2

net x-axis-enable pid.0.enable <= axis.0.amp-enable-out
net x-axis-enable hm2_5i25.0.7i77.0.1.analogena
net x-axis-fb pid.0.feedback <= hm2_5i25.0.encoder.00.position
net x-axis-fb axis.0.motor-pos-fb
net x-axis-pos-cmd axis.0.motor-pos-cmd => pid.0.command
net x-axis-command pid.0.output => hm2_5i25.0.7i77.0.1.analogout0


net x-limits <= hm2_5i25.0.7i77.0.0.input-09-not
net x-limits => axis.0.pos-lim-sw-in axis.0.neg-lim-sw-in
#net x-limits => axis.0.home-sw-in

# Y Axis
setp hm2_5i25.0.7i77.0.1.analogout1-scalemax -10
setp hm2_5i25.0.encoder.01.scale [AXIS_1]INPUT_SCALE
setp pid.1.Pgain [AXIS_1]P
setp pid.1.Igain [AXIS_1]I
setp pid.1.Dgain [AXIS_1]D
setp pid.1.FF0 [AXIS_1]FF0
setp pid.1.FF1 [AXIS_1]FF1
setp pid.1.FF2 [AXIS_1]FF2

net y-axis-enable pid.1.enable <= axis.1.amp-enable-out
net y-axis-fb axis.1.motor-pos-fb <= hm2_5i25.0.encoder.01.position
net y-axis-fb pid.1.feedback <= hm2_5i25.0.encoder.01.position
net y-axis-fb axis.1.motor-pos-fb
net y-axis-pos-cmd axis.1.motor-pos-cmd => pid.1.command
net y-axis-command pid.1.output => hm2_5i25.0.7i77.0.1.analogout1


net y-limits <= hm2_5i25.0.7i77.0.0.input-10-not
net y-limits => axis.1.pos-lim-sw-in axis.1.neg-lim-sw-in
#net y-limits => axis.1.home-sw-in

# Z Axis

setp hm2_5i25.0.7i77.0.1.analogout2-scalemax -10
setp hm2_5i25.0.encoder.02.scale [AXIS_2]INPUT_SCALE
setp pid.2.Pgain [AXIS_2]P
setp pid.2.Igain [AXIS_2]I
setp pid.2.Dgain [AXIS_2]D
setp pid.2.FF0 [AXIS_2]FF0
setp pid.2.FF1 [AXIS_2]FF1
setp pid.2.FF2 [AXIS_2]FF2



net z-axis-enable pid.2.enable <= axis.2.amp-enable-out
net z-axis-fb axis.2.motor-pos-fb <= hm2_5i25.0.encoder.02.position
net z-axis-fb pid.2.feedback <= hm2_5i25.0.encoder.02.position
net z-axis-fb axis.2.motor-pos-fb
net z-axis-pos-cmd axis.2.motor-pos-cmd => pid.2.command
net z-axis-command pid.2.output => hm2_5i25.0.7i77.0.1.analogout2


net z-limits <= hm2_5i25.0.7i77.0.0.input-11-not
net z-limits => axis.2.pos-lim-sw-in axis.2.neg-lim-sw-in
#net z-limits => axis.2.home-sw-in


# A Axis
setp hm2_5i25.0.7i77.0.1.analogout3-scalemax 10
setp hm2_5i25.0.encoder.03.scale [AXIS_3]INPUT_SCALE
setp pid.3.Pgain [AXIS_3]P
setp pid.3.Igain [AXIS_3]I
setp pid.3.Dgain [AXIS_3]D
setp pid.3.FF0 [AXIS_3]FF0
setp pid.3.FF1 [AXIS_3]FF1
setp pid.3.FF2 [AXIS_3]FF2

net a-axis-enable pid.3.enable <= axis.3.amp-enable-out
net a-axis-fb axis.3.motor-pos-fb <= hm2_5i25.0.encoder.03.position
net a-axis-fb pid.3.feedback <= hm2_5i25.0.encoder.03.position
net a-axis-fb axis.3.motor-pos-fb
net a-axis-pos-cmd axis.3.motor-pos-cmd => pid.3.command
net a-axis-command pid.3.output => hm2_5i25.0.7i77.0.1.analogout3


net a-limits <= hm2_5i25.0.7i77.0.0.input-17-not
net a-limits => axis.3.pos-lim-sw-in axis.3.neg-lim-sw-in
#net a-limits => axis.3.home-sw-in



#VFD

net vfd-enable motion.spindle-on => hm2_5i25.0.7i77.0.1.spinena
net vfd-command motion.spindle-speed-out => hm2_5i25.0.7i77.0.1.analogout5


setp hm2_5i25.0.7i77.0.1.analogout5-scalemax 3485
setp hm2_5i25.0.7i77.0.1.analogout5-maxlim 3485
setp hm2_5i25.0.7i77.0.1.analogout5-minlim -3485



# connect flood coolant to I/O controller

newsig FloodOn bit
net FloodOn <= hm2_5i25.0.7i77.0.0.output-04
net FloodOn => iocontrol.0.coolant-flood


#Tool in and out
newsig MistOn bit
net MistOn <= hm2_5i25.0.7i77.0.0.output-00
net MistOn => iocontrol.0.coolant-mist



# E-stop
loadrt estop_latch
addf estop-latch.0 servo-thread
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
net remote-estop estop-latch.0.fault-in <= hm2_5i25.0.7i77.0.0.input-12-not





# 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


# homing pins
net x-home-switch <= hm2_5i25.0.7i77.0.0.input-05
net y-home-switch <= hm2_5i25.0.7i77.0.0.input-06
net z-home-switch <= hm2_5i25.0.7i77.0.0.input-07
net a-home-switch <= hm2_5i25.0.7i77.0.0.input-08


net x-home-switch => axis.0.home-sw-in
net y-home-switch => axis.1.home-sw-in
net z-home-switch => axis.2.home-sw-in
net a-home-switch => axis.3.home-sw-in



# Use index, to home
net x-index-enable hm2_5i25.0.encoder.00.index-enable <=> axis.0.index-enable
net y-index-enable hm2_5i25.0.encoder.01.index-enable <=> axis.1.index-enable
net Z-index-enable hm2_5i25.0.encoder.02.index-enable <=> axis.2.index-enable
net a-index-enable hm2_5i25.0.encoder.03.index-enable <=> axis.3.index-enable



#Jog Pendant Hal File

loadrt mux4 count=1
loadrt ilowpass


setp ilowpass.0.scale 256
setp ilowpass.0.gain 0.01

addf mux4.0 servo-thread
addf ilowpass.0 servo-thread


net x-jog-select axis.0.jog-enable <= hm2_5i25.0.7i77.0.0.input-00
net y-jog-select axis.1.jog-enable <= hm2_5i25.0.7i77.0.0.input-01
net z-jog-select axis.2.jog-enable <= hm2_5i25.0.7i77.0.0.input-02
net a-jog-select axis.3.jog-enable <= hm2_5i25.0.7i77.0.0.input-03

net x10 hm2_5i25.0.7i77.0.0.input-16 => mux4.0.sel0
net x100 hm2_5i25.0.7i77.0.0.input-13 => mux4.0.sel1

setp mux4.0.in0 .0000025
setp mux4.0.in1 .000025
setp mux4.0.in2 .00025
setp mux4.0.in3 .0

net jogscale mux4.0.out => axis.0.jog-scale
net jogscale => axis.1.jog-scale
net jogscale => axis.2.jog-scale
net jogscale => axis.3.jog-scale


#net mpgout hm2_5i25.0.7i77.0.0.enc0 => ilowpass.0.in

setp hm2_5i25.0.encoder.05.scale 256
#net jog-position <= hm2_5i25.0.encoder.05.count



net jogcounts ilowpass.0.out => axis.0.jog-counts
net jogcounts => axis.1.jog-counts
net jogcounts => axis.2.jog-counts
net jogcounts => axis.3.jog-counts
Last edit: 10 May 2014 01:26 by greeder88.

Please Log in or Create an account to join the conversation.

More
10 May 2014 01:52 #46773 by PCW
There may be other errors but
addf pid.3.do-pid-calcs servo-thread

is missing from the HAL file

(and that's a showstopper as far as getting the axis 4 servo to work)
The following user(s) said Thank You: greeder88

Please Log in or Create an account to join the conversation.

More
10 May 2014 02:30 #46775 by greeder88
Now that you pointed it out that looks impossible to miss.
Usually it shuts down when something is missed.
Now I know.
Thanks

Please Log in or Create an account to join the conversation.

More
11 May 2014 19:00 #46813 by greeder88
Vector drive spindle issues:

"Motor Thermal" shut down after couple of minutes. (I have the 2 motor thermal wires connected to drive)
Motor gets to 900 rpm pretty good then begins struggling to get above.
The reverse is not working. Seems to not respond to - 10v on circuit connector #1. "STR" might have to be used for reverse? STF works good for Forward.

I have 1000ppr encoder hooked up and all parameters set to speed control. (More or less. Pretty complex)

Note:
These are brand new 5-HP drives and motors but maybe 20 years old. Motors probably much newer.
The manual says replace smoothing capacitors every 5 years as needed.
Should I replace all the small capacitors or just the ones that show swelling? (Medium one shows swelling)
There is one giant capacitor, one medium on circuit board and eleven small ones.

Please Log in or Create an account to join the conversation.

More
11 May 2014 20:39 #46815 by PCW
for +-10V to work (reverse for negative inputs) you must set pr73 to '1'

(section1.6.4)
The following user(s) said Thank You: greeder88

Please Log in or Create an account to join the conversation.

More
12 May 2014 04:22 #46826 by greeder88
I fixed the thermal shut-down issue. I had connected to my 2-Hp rotary phase converter. The 5-hp one solved the problem.

STF --> 7i77 ENA5+
SD --> 7i77 ENA5-
These are working fine.

1 -->7i77 AOUT5
5 --> GND
There is a problem with these.

When I put different battery voltages on 1 & 5 into the drive it works fine.
When I put a volt meter on 23 & 24 coming out of the 7i77 and push the Axis Spindle Speed < or > I just get millivolts.
Shouldn't there be 0-10v?

Please Log in or Create an account to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum