Hello!

I am stuck on a problem that I cannot figure out.
Please take a look here: https://youtu.be/LtP9wE-FUN4
It should be steady jogging back and forth at 1074 mm/min. The motor
is not moving at a constant pace and I noticed that the DRO also shows
that the velocity is not steady. So that tells me that my wiring is ok
and there is no interference with step signals or whatever, but the
software is to blame.
Where should I start looking for the cause?
And then there are 2 more sidequestions (that might have arised only
because there have been 5 or 6 years since my previous LinuxCNC build,
so I might just missed something obvious):
The machine has 7i96 board. I need to use 2 outputs. How do I find
their corresponding HAL pin names? Previously I would just "setp
...gpio.xx.is-output 1" and then try to switch that output and see, if
it worked or no, but here for 7i96 I saw that some gpio pins are
inputs only, but the thing is that my counting suggests that those
should be the outputs.
And the second question is about creating gantry config. How do I do
that with the new gentrivkins? I have AXIS=Y for joints 1 and 3, but
that is not enough.

Viesturs

P.S. Here are the INI and HAL files:
# This file was created with the 7i96 Wizard on Dec 23 2018 15:02:21
# Changes to most things are ok and will be read by the wizard

[EMC]
VERSION = 1.1
MACHINE = A.V.U. Plazma
DEBUG = 0x00000000

[HOSTMOT2]
DRIVER = hm2_eth
IPADDRESS = "10.10.10.10"
BOARD = 7i96
STEPGENS = 3
ENCODERS = 1
SSERIAL_PORT = 0

[DISPLAY]
DISPLAY = axis
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.0
CYCLE_TIME = 0.1
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 0
OPEN_FILE = ""

[KINS]
KINEMATICS = trivkins
JOINTS = 4

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

[RS274NGC]
PARAMETER_FILE = plasma.var

[EMCMOT]
EMCMOT = motmod
SERVO_PERIOD = 1000000

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[TRAJ]
COORDINATES = XYZ
LINEAR_UNITS = metric
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 150.00

[HAL]
HALFILE = hm2-stepper.hal
# HALFILE = io.hal
# HALFILE = custom.hal
# HALFILE = postgui.hal

[HALUI]

[AXIS_X]
MIN_LIMIT = -10.0
MAX_LIMIT = 3050.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 500.0

[AXIS_Y]
MIN_LIMIT = -10.0
MAX_LIMIT = 1650.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 500.0

[AXIS_Z]
MIN_LIMIT = -10.01
MAX_LIMIT = 250.0
MAX_VELOCITY = 15.0
MAX_ACCELERATION = 400.0

[AXIS_A]
MIN_LIMIT = -10.0
MAX_LIMIT = 1650.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 500.0


[JOINT_0]
AXIS = X
MIN_LIMIT = -10.0
MAX_LIMIT = 3050.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 550.0
TYPE = LINEAR
SCALE = 50.9295817894065
STEPGEN_MAX_VEL = 260.0
STEPGEN_MAX_ACC = 600.0
FERROR = 0.5
MIN_FERROR = 0.3

DIRSETUP = 6000
DIRHOLD = 6000
STEPLEN = 2700
STEPSPACE = 2700

HOME = 0.0
HOME_OFFSET = 0.0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False


[JOINT_1]
AXIS = Y
MIN_LIMIT = -10.0
MAX_LIMIT = 1650.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 550.0
TYPE = LINEAR
SCALE = 50.9295817894065
STEPGEN_MAX_VEL = 260.0
STEPGEN_MAX_ACC = 600.0
FERROR = 0.5
MIN_FERROR = 0.3

DIRSETUP = 6000
DIRHOLD = 6000
STEPLEN = 2700
STEPSPACE = 2700

HOME = 0.0
HOME_OFFSET = 0.0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False


[JOINT_2]
AXIS = Z
MIN_LIMIT = -10.01
MAX_LIMIT = 250.0
MAX_VELOCITY = 15.0
MAX_ACCELERATION = 500.0
TYPE = LINEAR
SCALE = -160
STEPGEN_MAX_VEL = 18.0
STEPGEN_MAX_ACC = 600.0
FERROR = 0.5
MIN_FERROR = 0.3

DIRSETUP = 6000
DIRHOLD = 6000
STEPLEN = 2700
STEPSPACE = 2700

HOME = 0.0
HOME_OFFSET = 0.0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False


[JOINT_3]
AXIS = Y
MIN_LIMIT = -10.0
MAX_LIMIT = 1650.0
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 550.0
TYPE = LINEAR
SCALE = -50.9295817894065
STEPGEN_MAX_VEL = 260.0
STEPGEN_MAX_ACC = 600.0
FERROR = 0.5
MIN_FERROR = 0.3

DIRSETUP = 6000
DIRHOLD = 6000
STEPLEN = 2700
STEPSPACE = 2700

HOME = 0.0
HOME_OFFSET = 0.0
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False



[INPUTS]
# DO NOT change the input text
INPUT_0 = None
INPUT_JOINT_0 = False
INPUT_1 = None
INPUT_JOINT_1 = False
INPUT_2 = None
INPUT_JOINT_2 = False
INPUT_3 = None
INPUT_JOINT_3 = False
INPUT_4 = None
INPUT_JOINT_4 = False
INPUT_5 = None
INPUT_JOINT_5 = False
INPUT_6 = None
INPUT_JOINT_6 = False
INPUT_7 = None
INPUT_JOINT_7 = False
INPUT_8 = None
INPUT_JOINT_8 = False
INPUT_9 = None
INPUT_JOINT_9 = False
INPUT_10 = None
INPUT_JOINT_10 = False

[OUTPUTS]
# DO NOT change the output text
OUTPUT_0 = None
OUTPUT_1 = None
OUTPUT_2 = None
OUTPUT_3 = None
OUTPUT_4 = None

[OPTIONS]
MANUAL_TOOL_CHANGE = False
HALUI = False
PYVCP = False
GLADEVCP = False
LADDER = False


hm2-stepper.hal:


# kinematics
loadrt [KINS]KINEMATICS

# motion controller
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD
num_joints=[KINS]JOINTS

# 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

# THREADS
addf hm2_[HOSTMOT2](BOARD).0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller 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

# position command and feedback
net j.0.pos-cmd hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-cmd
joint.0.motor-pos-cmd
net j.0.pos-fb hm2_[HOSTMOT2](BOARD).0.stepgen.00.position-fb
joint.0.motor-pos-fb

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 0


# 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

# position command and feedback
net j.1.pos-cmd hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-cmd
joint.1.motor-pos-cmd
net j.1.pos-fb hm2_[HOSTMOT2](BOARD).0.stepgen.01.position-fb
joint.1.motor-pos-fb

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 0


# 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

# position command and feedback
net j.2.pos-cmd hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-cmd
joint.2.motor-pos-cmd
net j.2.pos-fb hm2_[HOSTMOT2](BOARD).0.stepgen.02.position-fb
joint.2.motor-pos-fb


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 0


# 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

# position command and feedback
net j.3.pos-cmd hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-cmd
joint.3.motor-pos-cmd
net j.3.pos-fb hm2_[HOSTMOT2](BOARD).0.stepgen.03.position-fb
joint.3.motor-pos-fb


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_2]STEPGEN_MAX_VEL
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.maxaccel [JOINT_2]STEPGEN_MAX_ACC
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.step_type 0
setp hm2_[HOSTMOT2](BOARD).0.stepgen.03.control-type 0


# 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


_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to