7i96s vfd control

More
03 Aug 2022 21:55 #248974 by Samuelx
Replied by Samuelx on topic 7i96s vfd control
I tryed to use synaptic package manager and run some errors 
 
Attachments:

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

More
03 Aug 2022 22:59 #248985 by andypugh
Replied by andypugh on topic 7i96s vfd control
Try following the previous instructions, but get the ,deb from here rather than the slightly outdated link:

buildbot.linuxcnc.org/dists/buster/maste...reempt/binary-amd64/

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

More
05 Aug 2022 16:35 #249129 by Samuelx
Replied by Samuelx on topic 7i96s vfd control
I could not get it work. So I starterd from begining and followed youtube video how to install debian 11 and linuxcnc 2.9.
thank you feral engineer for the video:

I also installed mesaflash and mesact
I still need help how to get spindle work.

I hooked it up  my 7i96s card   ANALOG SPINDLE INTERFACE to vdf
vdf +10v output to mesa pin 24  (Spindle +)
vdf VI pin to mesa pin 23 (Spindle out)
vdf com/dcm pin to mesa pin 22 (Spindle -)

The problem is, that pin 23 (spindle out is 0v) when i try to run spindle from linuxcnc.
# This file was created with the Mesa Configuration Tool on elo 05 2022 19:28:31
# If you make changes to this file DO NOT run the configuration tool again!
# This file will be replaced with a new file if you do!

# 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=3

# hostmot2 driver
loadrt hostmot2

loadrt [HM2](DRIVER) board_ip=[HM2](IPADDRESS)
setp hm2_7i96s.0.watchdog.timeout_ns 5000000

# THREADS
addf hm2_7i96s.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_7i96s.0.write servo-thread

# Joint 0
# PID Setup
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
setp pid.0.error-previous-target true

# joint enable chain
net joint-0-index-enable <=> pid.0.index-enable
net joint-0-enable <= joint.0.amp-enable-out
net joint-0-enable => pid.0.enable

net joint-0-enable => hm2_7i96s.0.stepgen.00.enable

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]SCALE
setp hm2_7i96s.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAX_VEL
setp hm2_7i96s.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAX_ACC
setp hm2_7i96s.0.stepgen.00.step_type 0
setp hm2_7i96s.0.stepgen.00.control-type 1


# position command and feedback
net joint-0-pos-cmd <= joint.0.motor-pos-cmd
net joint-0-pos-cmd => pid.0.command

net joint-0-pos-fb <= hm2_7i96s.0.stepgen.00.position-fb
net joint-0-pos-fb => joint.0.motor-pos-fb
net joint-0-pos-fb => pid.0.feedback

net joint.0.output <= pid.0.output
net joint.0.output => hm2_7i96s.0.stepgen.00.velocity-cmd

# Joint 1
# PID Setup
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
setp pid.1.error-previous-target true

# joint enable chain
net joint-1-index-enable <=> pid.1.index-enable
net joint-1-enable <= joint.1.amp-enable-out
net joint-1-enable => pid.1.enable

net joint-1-enable => hm2_7i96s.0.stepgen.01.enable

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]SCALE
setp hm2_7i96s.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAX_VEL
setp hm2_7i96s.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAX_ACC
setp hm2_7i96s.0.stepgen.01.step_type 0
setp hm2_7i96s.0.stepgen.01.control-type 1


# position command and feedback
net joint-1-pos-cmd <= joint.1.motor-pos-cmd
net joint-1-pos-cmd => pid.1.command

net joint-1-pos-fb <= hm2_7i96s.0.stepgen.01.position-fb
net joint-1-pos-fb => joint.1.motor-pos-fb
net joint-1-pos-fb => pid.1.feedback

net joint.1.output <= pid.1.output
net joint.1.output => hm2_7i96s.0.stepgen.01.velocity-cmd

# Spindle

# Spindle Velocity Pins
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

# Spindle Command Pins
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

# Set spindle at speed signal
sets spindle-at-speed true

# Spindle Board Connections
net spindle-on => hm2_7i96s.0.pwmgen.00.enable
net spindle-vel-cmd-rpm hm2_7i96s.0.pwmgen.00.value
setp hm2_7i96s.0.pwmgen.00.scale [SPINDLE]MAX_RPM
setp hm2_7i96s.0.pwmgen.pwm_frequency [SPINDLE]PWM_FREQUENCY
setp hm2_7i96s.0.pwmgen.00.output-type [SPINDLE]SPINDLE_PWM_TYPE

# Standard I/O Block - EStop, Etc
# create a signal for the estop loopback
net estop-loopback iocontrol.0.emc-enable-in <= iocontrol.0.user-enable-out
# This file was created with the Mesa Configuration Tool on elo 05 2022 19:28:31
# Changes to most things are ok and will be read by the Configuration Tool

[MESA]
VERSION = 0.7.0
BOARD = 7i96s
FIRMWARE = Select
CARD_0 = None
CARD_1 = None

[EMC]
VERSION = 1.1
MACHINE = Emco 50 PC turn mesact
DEBUG = 0x00000000

[HM2]
DRIVER = hm2_eth
IPADDRESS = 10.10.10.10
STEPGENS = False
PWMGENS = False
ENCODERS = False

[DISPLAY]
DISPLAY = gmoccapy
EDITOR = gedit
PROGRAM_PREFIX = /home/samuel/linuxcnc/nc_files
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = COMMANDED
MAX_FEED_OVERRIDE = 1.2
MIN_VELOCITY = 0.0
DEFAULT_LINEAR_VELOCITY = 2.1
MAX_LINEAR_VELOCITY = 5.0
CYCLE_TIME = 0.1
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 0
OPEN_FILE = ""

[KINS]
KINEMATICS = trivkins coordinates=ZX
JOINTS = 2

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

[RS274NGC]
PARAMETER_FILE = emco_50_pc_turn_mesact.var
SUBROUTINE_PATH = /home/samuel/linuxcnc/subroutines

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[TRAJ]
COORDINATES = ZX
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 5.0
NO_FORCE_HOMING = 1

[HAL]
HALFILE = emco_50_pc_turn_mesact.hal
HALFILE = io.hal
HALUI = halui

[HALUI]

[AXIS_Z]
MIN_LIMIT = -0
MAX_LIMIT = 236
MAX_VELOCITY = 350
MAX_ACCELERATION = 350

[AXIS_X]
MIN_LIMIT = -46
MAX_LIMIT = 0
MAX_VELOCITY = 350
MAX_ACCELERATION = 350

[JOINT_0]
AXIS = Z
MIN_LIMIT = -0
MAX_LIMIT = 236
MAX_VELOCITY = 350
MAX_ACCELERATION = 350
TYPE = LINEAR
SCALE = 8000
DRIVE = Custom
STEP_INVERT = False
DIR_INVERT = False
STEPGEN_MAX_VEL = 420.00
STEPGEN_MAX_ACC = 420.00
DIRSETUP = 2000
DIRHOLD = 2000
STEPLEN = 2000
STEPSPACE = 2000
FERROR = 0.005
MIN_FERROR = 0.0025
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127

[JOINT_1]
AXIS = X
MIN_LIMIT = -46
MAX_LIMIT = 0
MAX_VELOCITY = 350
MAX_ACCELERATION = 350
TYPE = LINEAR
SCALE = 8000
DRIVE = Custom
STEP_INVERT = False
DIR_INVERT = False
STEPGEN_MAX_VEL = 420.00
STEPGEN_MAX_ACC = 420.00
DIRSETUP = 20000
DIRHOLD = 20000
STEPLEN = 20000
STEPSPACE = 20000
FERROR = 0.005
MIN_FERROR = 0.0025
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127

[SPINDLE]
SPINDLE_TYPE = analog
SPINDLE_PWM_TYPE = 1
PWM_FREQUENCY = 5000
MAX_RPM = 1370
MIN_RPM = 0

# Everything below this line is only used to
# setup the Configuration Tool when loading the ini.

[INPUTS]
# DO NOT change the inputs they are used by the configuration tool
INPUT_0 = Joint 0 Home
INPUT_INVERT_0 = False
INPUT_SLOW_0 = False
INPUT_1 = Joint 1 Home
INPUT_INVERT_1 = False
INPUT_SLOW_1 = False
INPUT_2 = Select
INPUT_INVERT_2 = False
INPUT_SLOW_2 = False
INPUT_3 = Select
INPUT_INVERT_3 = False
INPUT_SLOW_3 = False
INPUT_4 = Select
INPUT_INVERT_4 = False
INPUT_SLOW_4 = False
INPUT_5 = Select
INPUT_INVERT_5 = False
INPUT_SLOW_5 = False
INPUT_6 = Select
INPUT_INVERT_6 = False
INPUT_SLOW_6 = False
INPUT_7 = Select
INPUT_INVERT_7 = False
INPUT_SLOW_7 = False
INPUT_8 = Select
INPUT_INVERT_8 = False
INPUT_SLOW_8 = False
INPUT_9 = Select
INPUT_INVERT_9 = False
INPUT_SLOW_9 = False
INPUT_10 = Select
INPUT_INVERT_10 = False
INPUT_SLOW_10 = False
INPUT_11 = Select
INPUT_INVERT_11 = False
INPUT_SLOW_11 = False
INPUT_12 = Select
INPUT_INVERT_12 = False
INPUT_SLOW_12 = False
INPUT_13 = Select
INPUT_INVERT_13 = False
INPUT_SLOW_13 = False
INPUT_14 = Select
INPUT_INVERT_14 = False
INPUT_SLOW_14 = False
INPUT_15 = Select
INPUT_INVERT_15 = False
INPUT_SLOW_15 = False
INPUT_16 = Select
INPUT_INVERT_16 = False
INPUT_SLOW_16 = False
INPUT_17 = Select
INPUT_INVERT_17 = False
INPUT_SLOW_17 = False
INPUT_18 = Select
INPUT_INVERT_18 = False
INPUT_SLOW_18 = False
INPUT_19 = Select
INPUT_INVERT_19 = False
INPUT_SLOW_19 = False
INPUT_20 = Select
INPUT_INVERT_20 = False
INPUT_SLOW_20 = False
INPUT_21 = Select
INPUT_INVERT_21 = False
INPUT_SLOW_21 = False
INPUT_22 = Select
INPUT_INVERT_22 = False
INPUT_SLOW_22 = False
INPUT_23 = Select
INPUT_INVERT_23 = False
INPUT_SLOW_23 = False
INPUT_24 = Select
INPUT_INVERT_24 = False
INPUT_SLOW_24 = False
INPUT_25 = Select
INPUT_INVERT_25 = False
INPUT_SLOW_25 = False
INPUT_26 = Select
INPUT_INVERT_26 = False
INPUT_SLOW_26 = False
INPUT_27 = Select
INPUT_INVERT_27 = False
INPUT_SLOW_27 = False
INPUT_28 = Select
INPUT_INVERT_28 = False
INPUT_SLOW_28 = False
INPUT_29 = Select
INPUT_INVERT_29 = False
INPUT_SLOW_29 = False
INPUT_30 = Select
INPUT_INVERT_30 = False
INPUT_SLOW_30 = False
INPUT_31 = Select
INPUT_INVERT_31 = False
INPUT_SLOW_31 = False

[OUTPUTS]
# DO NOT change the outputs they are used by the configuration tool
OUTPUT_0 = Spindle CW
OUTPUT_1 = Select
OUTPUT_2 = Select
OUTPUT_3 = Select
OUTPUT_4 = Select
OUTPUT_5 = Select
OUTPUT_6 = Select
OUTPUT_7 = Select
OUTPUT_8 = Select
OUTPUT_9 = Select
OUTPUT_10 = Select
OUTPUT_11 = Select
OUTPUT_12 = Select
OUTPUT_13 = Select
OUTPUT_14 = Select
OUTPUT_15 = Select

[OPTIONS]
# DO NOT change the options they are used by the configuration tool
LOAD_CONFIG = False
INTRO_GRAPHIC = emc2.gif
INTRO_GRAPHIC_TIME = 0
MANUAL_TOOL_CHANGE = False
CUSTOM_HAL = False
POST_GUI_HAL = False
SHUTDOWN_HAL = False
HALUI = False
PYVCP = False
GLADEVCP = False
LADDER = False
BACKUP = False

 

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

More
05 Aug 2022 16:44 - 05 Aug 2022 16:51 #249130 by PCW
Replied by PCW on topic 7i96s vfd control
Looks like a bug in mesact:

# Spindle Command Pins
net spindle-enable <= spindle.0.on <<<<<<<<<<<<<<<<<<<<<<<

SNIP

# Spindle Board Connections
net spindle-on => hm2_7i96s.0.pwmgen.00.enable <<<<<<<<<<<<<<<<<<<<<<<

 
Last edit: 05 Aug 2022 16:51 by PCW.
The following user(s) said Thank You: JT

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

More
05 Aug 2022 17:21 #249137 by Samuelx
Replied by Samuelx on topic 7i96s vfd control
I have no idea how it should be?
This is my first time trying to get mesacard work.

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

More
05 Aug 2022 17:30 #249141 by PCW
Replied by PCW on topic 7i96s vfd control
Change:

net spindle-on => hm2_7i96s.0.pwmgen.00.enable

To:

net spindle-enable => hm2_7i96s.0.pwmgen.00.enable

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

More
05 Aug 2022 18:04 #249147 by Samuelx
Replied by Samuelx on topic 7i96s vfd control
It almost work.
Now voltage is going up but  I still got 1 problem-
I somehow need to invert spndle fw pin.
Now pin gives +24V when spindle is off
And goes to 0V when i put spindle on.
 

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

More
05 Aug 2022 18:22 #249148 by PCW
Replied by PCW on topic 7i96s vfd control
The 7I96 outputs are off when false and on when true so should
work when directly connected to the spindle-cw signal

Sounds like you have the signal inverted

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

More
05 Aug 2022 20:10 - 05 Aug 2022 20:13 #249156 by Samuelx
Replied by Samuelx on topic 7i96s vfd control
Thank You
Now spindle is working.
 
Last edit: 05 Aug 2022 20:13 by Samuelx.

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

More
06 Aug 2022 19:18 #249218 by Samuelx
Replied by Samuelx on topic 7i96s vfd control
I got OUTPUT_0 = Spindle CW working
and OUTPUT_1 = Spindle CCW working

But OUTPUT_2 = Spindle On is not working

Hal:
# This file was created with the Mesa Configuration Tool on elo 06 2022 20:18:17
# If you make changes to this file DO NOT run the configuration tool again!
# This file will be replaced with a new file if you do!

# 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=3

# hostmot2 driver
loadrt hostmot2

loadrt [HM2](DRIVER) board_ip=[HM2](IPADDRESS)
setp hm2_7i96s.0.watchdog.timeout_ns 5000000

# THREADS
addf hm2_7i96s.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_7i96s.0.write servo-thread

# Joint 0
# PID Setup
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
setp pid.0.error-previous-target true

# joint enable chain
net joint-0-index-enable <=> pid.0.index-enable
net joint-0-enable <= joint.0.amp-enable-out
net joint-0-enable => pid.0.enable

net joint-0-enable => hm2_7i96s.0.stepgen.00.enable

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]SCALE
setp hm2_7i96s.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAX_VEL
setp hm2_7i96s.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAX_ACC
setp hm2_7i96s.0.stepgen.00.step_type 0
setp hm2_7i96s.0.stepgen.00.control-type 1


# position command and feedback
net joint-0-pos-cmd <= joint.0.motor-pos-cmd
net joint-0-pos-cmd => pid.0.command

net joint-0-pos-fb <= hm2_7i96s.0.stepgen.00.position-fb
net joint-0-pos-fb => joint.0.motor-pos-fb
net joint-0-pos-fb => pid.0.feedback

net joint.0.output <= pid.0.output
net joint.0.output => hm2_7i96s.0.stepgen.00.velocity-cmd

# Joint 1
# PID Setup
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
setp pid.1.error-previous-target true

# joint enable chain
net joint-1-index-enable <=> pid.1.index-enable
net joint-1-enable <= joint.1.amp-enable-out
net joint-1-enable => pid.1.enable

net joint-1-enable => hm2_7i96s.0.stepgen.01.enable

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]SCALE
setp hm2_7i96s.0.stepgen.01.maxvel [JOINT_1]STEPGEN_MAX_VEL
setp hm2_7i96s.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAX_ACC
setp hm2_7i96s.0.stepgen.01.step_type 0
setp hm2_7i96s.0.stepgen.01.control-type 1


# position command and feedback
net joint-1-pos-cmd <= joint.1.motor-pos-cmd
net joint-1-pos-cmd => pid.1.command

net joint-1-pos-fb <= hm2_7i96s.0.stepgen.01.position-fb
net joint-1-pos-fb => joint.1.motor-pos-fb
net joint-1-pos-fb => pid.1.feedback

net joint.1.output <= pid.1.output
net joint.1.output => hm2_7i96s.0.stepgen.01.velocity-cmd

# Spindle

# Spindle Velocity Pins
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

# Spindle Command Pins
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

# Set spindle at speed signal
sets spindle-at-speed true

# Spindle Board Connections
net spindle-enable => hm2_7i96s.0.pwmgen.00.enable
net spindle-vel-cmd-rpm hm2_7i96s.0.pwmgen.00.value
setp hm2_7i96s.0.pwmgen.00.scale [SPINDLE]MAX_RPM
setp hm2_7i96s.0.pwmgen.pwm_frequency [SPINDLE]PWM_FREQUENCY
setp hm2_7i96s.0.pwmgen.00.output-type [SPINDLE]SPINDLE_PWM_TYPE


Ini:
# This file was created with the Mesa Configuration Tool on elo 06 2022 20:18:17
# Changes to most things are ok and will be read by the Configuration Tool

[MESA]
VERSION = 0.7.0
BOARD = 7i96s
FIRMWARE = 7i96s_d.bin
CARD_0 = None
CARD_1 = None

[EMC]
VERSION = 1.1
MACHINE = Emco 50 PC turn mesact
DEBUG = 0x00000000

[HM2]
DRIVER = hm2_eth
IPADDRESS = 10.10.10.10
STEPGENS = False
PWMGENS = False
ENCODERS = False

[DISPLAY]
DISPLAY = gmoccapy
EDITOR = gedit
PROGRAM_PREFIX = /home/samuel/linuxcnc/nc_files
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = COMMANDED
MAX_FEED_OVERRIDE = 1.2
MIN_VELOCITY = 0.0
DEFAULT_LINEAR_VELOCITY = 2.1
MAX_LINEAR_VELOCITY = 5.0
CYCLE_TIME = 0.1
INTRO_GRAPHIC = emc2.gif
INTRO_TIME = 0
OPEN_FILE = ""
LATHE = 1
BACK_TOOL_LATHE = 1

[KINS]
KINEMATICS = trivkins coordinates=ZX
JOINTS = 2

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

[RS274NGC]
PARAMETER_FILE = emco_50_pc_turn_mesact.var
SUBROUTINE_PATH = /home/samuel/linuxcnc/subroutines

[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000

[TASK]
TASK = milltask
CYCLE_TIME = 0.010

[TRAJ]
COORDINATES = ZX
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
MAX_LINEAR_VELOCITY = 5.0
NO_FORCE_HOMING = 1

[HAL]
HALFILE = emco_50_pc_turn_mesact.hal
HALFILE = io.hal
HALFILE = custom.hal
HALUI = halui

[HALUI]

[AXIS_Z]
MIN_LIMIT = -1
MAX_LIMIT = 236
MAX_VELOCITY = 3.15
MAX_ACCELERATION = 350

[AXIS_X]
MIN_LIMIT = -46
MAX_LIMIT = 0
MAX_VELOCITY = 3.15
MAX_ACCELERATION = 350

[JOINT_0]
AXIS = Z
MIN_LIMIT = -1
MAX_LIMIT = 236
MAX_VELOCITY = 3.15
MAX_ACCELERATION = 350
TYPE = LINEAR
SCALE = 8000
DRIVE = Custom
STEP_INVERT = False
DIR_INVERT = False
STEPGEN_MAX_VEL = 3.78
STEPGEN_MAX_ACC = 420.00
DIRSETUP = 20000
DIRHOLD = 20000
STEPLEN = 20000
STEPSPACE = 20000
FERROR = 0.005
MIN_FERROR = 0.0025
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -1
HOME_LATCH_VEL = -0.5
HOME_FINAL_VEL = 0.0000
HOME_IGNORE_LIMITS = True

[JOINT_1]
AXIS = X
MIN_LIMIT = -46
MAX_LIMIT = 0
MAX_VELOCITY = 3.15
MAX_ACCELERATION = 350
TYPE = LINEAR
SCALE = 8000
DRIVE = Custom
STEP_INVERT = False
DIR_INVERT = False
STEPGEN_MAX_VEL = 3.78
STEPGEN_MAX_ACC = 420.00
DIRSETUP = 20000
DIRHOLD = 20000
STEPLEN = 20000
STEPSPACE = 20000
FERROR = 0.005
MIN_FERROR = 0.0025
DEADBAND = 0
P = 1000
I = 0
D = 0
FF0 = 0
FF1 = 1
FF2 = 0
BIAS = 0
MAX_OUTPUT = 0
MAX_ERROR = 0.0127

[SPINDLE]
SPINDLE_TYPE = analog
SPINDLE_PWM_TYPE = 1
PWM_FREQUENCY = 10000
MAX_RPM = 1600
MIN_RPM = 0

# Everything below this line is only used to
# setup the Configuration Tool when loading the ini.

[INPUTS]
# DO NOT change the inputs they are used by the configuration tool
INPUT_0 = Joint 0 Home
INPUT_INVERT_0 = False
INPUT_SLOW_0 = False
INPUT_1 = Joint 1 Home
INPUT_INVERT_1 = True
INPUT_SLOW_1 = False
INPUT_2 = External E Stop
INPUT_INVERT_2 = True
INPUT_SLOW_2 = False
INPUT_3 = Select
INPUT_INVERT_3 = False
INPUT_SLOW_3 = False
INPUT_4 = Select
INPUT_INVERT_4 = False
INPUT_SLOW_4 = False
INPUT_5 = Select
INPUT_INVERT_5 = False
INPUT_SLOW_5 = False
INPUT_6 = Select
INPUT_INVERT_6 = False
INPUT_SLOW_6 = False
INPUT_7 = Select
INPUT_INVERT_7 = False
INPUT_SLOW_7 = False
INPUT_8 = Select
INPUT_INVERT_8 = False
INPUT_SLOW_8 = False
INPUT_9 = Select
INPUT_INVERT_9 = False
INPUT_SLOW_9 = False
INPUT_10 = Select
INPUT_INVERT_10 = False
INPUT_SLOW_10 = False
INPUT_11 = Select
INPUT_INVERT_11 = False
INPUT_SLOW_11 = False
INPUT_12 = Select
INPUT_INVERT_12 = False
INPUT_SLOW_12 = False
INPUT_13 = Select
INPUT_INVERT_13 = False
INPUT_SLOW_13 = False
INPUT_14 = Select
INPUT_INVERT_14 = False
INPUT_SLOW_14 = False
INPUT_15 = Select
INPUT_INVERT_15 = False
INPUT_SLOW_15 = False
INPUT_16 = Select
INPUT_INVERT_16 = False
INPUT_SLOW_16 = False
INPUT_17 = Select
INPUT_INVERT_17 = False
INPUT_SLOW_17 = False
INPUT_18 = Select
INPUT_INVERT_18 = False
INPUT_SLOW_18 = False
INPUT_19 = Select
INPUT_INVERT_19 = False
INPUT_SLOW_19 = False
INPUT_20 = Select
INPUT_INVERT_20 = False
INPUT_SLOW_20 = False
INPUT_21 = Select
INPUT_INVERT_21 = False
INPUT_SLOW_21 = False
INPUT_22 = Select
INPUT_INVERT_22 = False
INPUT_SLOW_22 = False
INPUT_23 = Select
INPUT_INVERT_23 = False
INPUT_SLOW_23 = False
INPUT_24 = Select
INPUT_INVERT_24 = False
INPUT_SLOW_24 = False
INPUT_25 = Select
INPUT_INVERT_25 = False
INPUT_SLOW_25 = False
INPUT_26 = Select
INPUT_INVERT_26 = False
INPUT_SLOW_26 = False
INPUT_27 = Select
INPUT_INVERT_27 = False
INPUT_SLOW_27 = False
INPUT_28 = Select
INPUT_INVERT_28 = False
INPUT_SLOW_28 = False
INPUT_29 = Select
INPUT_INVERT_29 = False
INPUT_SLOW_29 = False
INPUT_30 = Select
INPUT_INVERT_30 = False
INPUT_SLOW_30 = False
INPUT_31 = Select
INPUT_INVERT_31 = False
INPUT_SLOW_31 = False

[OUTPUTS]
# DO NOT change the outputs they are used by the configuration tool
OUTPUT_0 = Spindle CW
OUTPUT_1 = Spindle CCW
OUTPUT_2 = Spindle On
OUTPUT_3 = Select
OUTPUT_4 = Select
OUTPUT_5 = Select
OUTPUT_6 = Select
OUTPUT_7 = Select
OUTPUT_8 = Select
OUTPUT_9 = Select
OUTPUT_10 = Select
OUTPUT_11 = Select
OUTPUT_12 = Select
OUTPUT_13 = Select
OUTPUT_14 = Select
OUTPUT_15 = Select

[OPTIONS]
# DO NOT change the options they are used by the configuration tool
LOAD_CONFIG = False
INTRO_GRAPHIC = emc2.gif
INTRO_GRAPHIC_TIME = 0
MANUAL_TOOL_CHANGE = False
CUSTOM_HAL = True
POST_GUI_HAL = False
SHUTDOWN_HAL = False
HALUI = False
PYVCP = False
GLADEVCP = False
LADDER = False
BACKUP = False


io.hal
# This file was created with the 7i92 Wizard on elo 06 2022 20:18:17
# If you make changes to this file DO NOT use the Configuration Tool

net joint-0-home joint.0.home-sw-in <=  hm2_7i96s.0.inm.00.input-00

net joint-1-home joint.1.home-sw-in <=  hm2_7i96s.0.inm.00.input-01-not


# External 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_7i96s.0.inm.00.input-02-not

net spindle-cw spindle.0.forward => hm2_7i96s.0.ssr.00.out-00
net spindle-ccw spindle.0.reverse => hm2_7i96s.0.ssr.00.out-01
net spindle-on => hm2_7i96s.0.ssr.00.out-02

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

Time to create page: 0.393 seconds
Powered by Kunena Forum