Lathe gui reconfiguration

More
03 Oct 2019 19:04 #147011 by Scot
Hello again,

So Pico-Systems boards are great. They really perform. But there isn't an out of the box .ini file for lathes like that found in the simulation files. So I have to take it apart, line by line. I don't mind doing that, but I am running into things that are dependent and causing problems. Files are backed up if need be.

I've been fiddling with my current and partially configured .ini file and changing a few things is pretty easy, over all. But there are snags, for sure. One snag is that I can change the display to show the only axes that my system sees through the PWM board via the [TRAJ] section. That would be X and Y. But when I do, it gives me an error regarding the splash code that comes up when LinuxCNC starts. Since I removed the Z axis from the display through the [TRAJ] section, the system doesn't see the code for the Z, but it lets me continue and load the gui anyway, and allows me to home the X and Y and run any code that doesn't have Z coordinates.

I have more questions than this one. But I've been a bit annoyed at the splash code from the get go. So I'd like to remove that from the startup to not just eliminate the code from starting with LinuxCNC with my .ini file, but to also eliminate that error I'm getting about the bad lines in the code which comes up when the system reads the code and compares it to the configuration.

Anyone out there been able to remove that first program that comes up automatically so I can either start from another program or with no code? Accidentally running it sets the scaling to non real world size. So I'd like to eliminate any issues with accidentally running that code while also being able to pick the program, if any is chosen to start when LinuxCNC is initiated.

Thanks in advance,

Scot

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

More
04 Oct 2019 00:41 #147054 by OT-CNC
Replied by OT-CNC on topic Lathe gui reconfiguration
What's the reason not to have the Z axis section? I would try to make a clean lathe configuration with X and Z and add the spindle components etc so you can get on the right track with a configuration you can build on. If you are doing a workaround chances are the keyboard arrows will not match the movement and then that leads to more problems configuring things wrong.
Look at a couple of sample lathe configs both hal and ini and compare to what you have currently that works. Then hand edit so it uses x and z. Maybe attach your current hal and ini so someone here who's quick at it could help edit it to get you started.
Once in lathe mode the screen will make proper sense too.

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

More
04 Oct 2019 01:09 #147057 by Scot
Replied by Scot on topic Lathe gui reconfiguration
"What's the reason not to have the Z axis section?"

The axes that I can show with the current, partial configuration are X and Y. This is a two axis lathe. I cut my teeth on a lathe with a Z axis. This is mostly for ease of quick programming. I program move to move because my parts are simple. I want to have an XZ configuration. The Pico boards don't have a lathe configuration file. The .ini files come as XYZR available. It's not that I don't want the Z. I WANT the Z. I don't want the Y if I can get rid of it. But it's not killing me. If it functions, a rose still smells as sweet,right?

"I would try to make a clean lathe configuration with X and Z and add the spindle components etc so you can get on the right track with a configuration you can build on."

Well, I'd love to do that, but my experience is limited with what comes out of the box with much of LinuxCNC. Top that off with the lathe .ini file being for a stepper based system or a servo based system which runs like steppers, i.e. Gecko 320's. And I have a completely different system, due to the brushless servo drives and proprietary needs of the PWM board for software. If I knew which files to switch, then I could do just that. But it's not a simple task due to the brushless factor. At least that's what I'm getting out of the experience I'm having. Or it could just be a problem with my experience, too.

"If you are doing a workaround chances are the keyboard arrows will not match the movement and then that leads to more problems configuring things wrong."

Well, I've eliminated the Z axis from the display and the program functions with an XY configuration, so it's not really a work around, unless I can find a way to change the appearance. That's really, ultimately all it is, too. It's just an appearance, really. So is it a big deal? No. But I'm weird like that, sometimes. If I know how to do it, then I can in the future when I retrofit the next machine. That's what I'm planning, too. And the next machine really does have the Z axis where the axis is nearly vertical. I'm putting controllers on two machines. One is a flat slide machine where the long axis is parallel to the floor. I don't mind having that be an XY. But the other seems wrong with it configured as an XY and I'd rather see it have an XZ.

"Look at a couple of sample lathe configs both hal and ini and compare to what you have currently that works."

I did that. And when I changed things, it throws errors. So I'm clearly not changing the correct things, likely due to dependencies regarding the axes and how the PWM software sees them. So I hit the list for info. Waiting on Jon's input,too. He's a busy guy, though. And he's not always available for quick answers. So I throw it out to as many places as I can to see what I can find. That's working well with other questions, too. It solved many issues to do it that way.

"Then hand edit so it uses x and z.

That seems to be the next step if it can be done with little fanfare or if it can be done at all.

"Maybe attach your current hal and ini so someone here who's quick at it could help edit it to get you started."

I've posted my .ini file about 4 or 5 times a few threads, but when you say "hal" my mind goes about 30 places. The hal file you're talking about could be any one of about 6 from from what I've seen since so many are associated with those 3 letters. So unless I have a specific file name, I'm kind of at a loss on that one as to which file to post. Remember, with the PWM boards, it's different.

"Once in lathe mode the screen will make proper sense too."

This is what I'm hoping for since that's how I learned to program with a lathe.

Thanks for the input, though. Sorry if it raises more questions than answers. This stuff gets complex. I'm still a noob, too. So even with linux, I get spun around - not just with LinuxCNC and it's configurations.

Scot

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

More
04 Oct 2019 01:28 #147061 by OT-CNC
Replied by OT-CNC on topic Lathe gui reconfiguration
The hal file is located in the same folder where the ini resides.
It can most definitely be edited to make it work regardless of what hardware you use. The hal will contain what is needed to connect to your pico system.

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

More
05 Oct 2019 01:39 #147150 by andypugh
Replied by andypugh on topic Lathe gui reconfiguration
XZ is definitely how a lathe should be set up.

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

More
05 Oct 2019 16:02 #147204 by Scot
Replied by Scot on topic Lathe gui reconfiguration
Would it be okay to post my .ini file and hal file for you to look at to see what I'm missing?

I've been fiddling with it, but when I set up the lathe gui, it shows the XZ view, and even when the Z is configured exactly like the Y, the outcome is that the system looks for the Y <I think> but doesn't find it.

So when I go to home the Z, rather than the system using the settings for the Y and just replacing things, it gives me a joint 1 following error.

When I set it up as a standard mill, I can mask the other 2 axes, other than X and Y, but it won't give me the radius and diameter view.

I'm not sure why this is happening, really. But I think it may have to do with the way that Jon set up the Pico System's software to recognize the axes.

Any insight on what I'm missing would be awesome.

Thanks in advance,

Scot

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

More
05 Oct 2019 16:04 #147205 by Scot
Replied by Scot on topic Lathe gui reconfiguration
I agree. Now I'd love to figure it out without having errors thrown.

When I set up an .ini file to run as a lathe, The system doesn't appear to configure the Z it to be Joint 1. So when I go to home the Z, it gives me a joint 1 error. This happens even when I set up the Z to have identical settings as the Y, just in case the system would skip the Y configuration when going into a lathe gui.

Any insight would be great.

Scot

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

More
05 Oct 2019 16:13 - 05 Oct 2019 16:13 #147206 by Clive S
Replied by Clive S on topic Lathe gui reconfiguration

Would it be okay to post my .ini file and hal file for you to look at to see what I'm missing?


That's always a good idea
Last edit: 05 Oct 2019 16:13 by Clive S.

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

More
05 Oct 2019 16:29 - 05 Oct 2019 21:28 #147209 by Scot
Replied by Scot on topic Lathe gui reconfiguration
Scroll down to see the hal files that I have in my config file. The .ini file is first. There is a load.hal file and an io.hal file. These files function and the system is programmable. But the display is incorrect for a lathe and when I set up a lathe configuration, the setup doesn't see things correctly. When I go to home the Z after setting up the lathe gui in the .ini file, the Z won't home and it gives a Joint 1 following error.

This is my .ini file which works with a mill setup:

# EMC controller parameters for generic controller. Make these what you need
# for your system.

# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.


# General section
[EMC]

# Version of this INI file
VERSION = $Revision$

# Name of machine, for use with display, etc.
MACHINE = LinuxCNC-UNIVPWM-RATROD LATHE

# Debug level, 0 means no messages. See src/emc/nml_int/emcglb.h for others
DEBUG = 0
# DEBUG = 0x00000007
# DEBUG = 0x7FFFFFFF

# Sections for display options
[DISPLAY]

# Name of display program, e.g., xemc
DISPLAY = axis
# DISPLAY = usrmot
# DISPLAY = tkemc
# Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME = 0.100

# Path to help file
HELP_FILE = tklinucnc.txt

# Initial display setting for position, RELATIVE or MACHINE
POSITION_OFFSET = RELATIVE

# Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK = ACTUAL

# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 1.2

# Prefix to be used
PROGRAM_PREFIX = /home/scot/linuxcnc/nc_files

# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 2

# Enable popup balloon help
BALLOON_HELP = 1
OPEN_FILE = ""

# Task controller section
[TASK]

# Name of task controller program, e.g., milltask
TASK = milltask

# Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME = 0.010

# Part program interpreter section
[RS274NGC]

# File containing interpreter variables
PARAMETER_FILE = univpwm.var

# Motion control section
[EMCMOT]

EMCMOT = motmod

# Timeout for comm to emcmot, in seconds
COMM_TIMEOUT = 1.0

# Interval between tries to emcmot, in seconds
COMM_WAIT = 0.010

# Servo task period, in nanoseconds
SERVO_PERIOD = 1000000

# Hardware Abstraction Layer section
[HAL]

# The run script first uses halcmd to execute any HALFILE
# files, and then to execute any individual HALCMD commands.
#

# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = univpwm_load.hal
HALFILE = univpwm_servo.hal
HALFILE = univpwm_motion.hal
HALFILE = univpwm_io.hal
#uncomment the following line to enable the pendant function
#HALFILE = pendant.hal
#uncomment the following line to enable the spindle speed display
#POSTGUI_HALFILE = spindle.hal
#You need to remove axis 3 or provide another path for a spindle encoder to
# feed into EMC for this to work.


# Trajectory planner section
[TRAJ]

AXES = 4
# COORDINATES = X Y Z R P W
COORDINATES = X Y
HOME = 0 0 0 0
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 1
MAX_VELOCITY = 8
DEFAULT_ACCELERATION = 20.0
MAX_ACCELERATION = 10.0

# Axes sections

# Scaling: The OUTPUT_SCALE should be the speed
# in UNITS/second (inches/sec or mm/sec) that would be
# reached if the PWM duty cycle was 100%. It depends on
# the power supply voltage, motor RPM/Volt factor, and
# gearing/screw pitch. For example:
#
# Power supply voltage 50V
# Motor RPM/V 1000RPM/24V
# Gearing: 2 motor revs per 1 screw rev
# Screw pitch: 0.2" per turn
#
# Max motor speed = 50V * 1000RPM/24V = 2083 RPM
# Max screw speed = 2083RPM * 1(screw)/2(motor) = 1041RPM
# Max table speed = 1041RPM * 0.2"/turn = 208 in/min
# Max table speed = 208 in/min / 60 seconds = 3.47 inches/sec
#
# Since max speed is reached at 100% duty cycle, OUTPUT_SCALE
# should be 3.47

# First axis
[AXIS_0]

TYPE = LINEAR
HOME = 8.
MAX_VELOCITY = 8
MAX_ACCELERATION = 100.0
PID_MAX_VEL = 1.5
BACKLASH = 0.00
INPUT_SCALE = -25400
OUTPUT_SCALE = -1
MIN_LIMIT = -0.15
MAX_LIMIT = 8.1
FERROR = 0.010
MIN_FERROR = 1
HOME_OFFSET = 8.
HOME_SEARCH_VEL = 1
HOME_LATCH_VEL = -0.2
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
DEADBAND = 0.000126
P = 24.75
I = 0
D = 0.545
BIAS = 0
FF0 = 0
FF1 = 0.135
FF2 = 0.001104011



# Second axis
[AXIS_1]

TYPE = LINEAR
HOME = 5.
MAX_VELOCITY = 8
MAX_ACCELERATION = 100.0
PID_MAX_VEL = 1.5
BACKLASH = 0.00
INPUT_SCALE = 25400
OUTPUT_SCALE = 1
MIN_LIMIT = -.15
MAX_LIMIT = 5.1
FERROR = 0.010
MIN_FERROR = 1
HOME_OFFSET = 5.0
HOME_SEARCH_VEL = 1
HOME_LATCH_VEL = 0.2
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
DEADBAND = 0.000126
P = 24.75
I = 0
D = 0.545
BIAS = 0
FF0 = 0
FF1 = 0.135
FF2 = 0.001104011

# Third axis
[AXIS_2]

TYPE = LINEAR
HOME = 5.
MAX_VELOCITY = 6
MAX_ACCELERATION = 50.0
PID_MAX_VEL = 1.5
BACKLASH = 0.00
INPUT_SCALE = 25400
OUTPUT_SCALE = 1
MIN_LIMIT = -.15
MAX_LIMIT = 5.1
FERROR = 0.010
MIN_FERROR = 1
HOME_OFFSET = 5.
HOME_SEARCH_VEL = .5
HOME_LATCH_VEL = 0.2
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
DEADBAND = 0.000026
P = 24.75
I = 0
D = 0.545
BIAS = 0
FF0 = 0
FF1 = 0.135
FF2 = 0.001104011

# Fourth axis
[AXIS_3]

TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 65
MAX_ACCELERATION = 20.0
PID_MAX_VEL = 66
BACKLASH = 0.000
INPUT_SCALE = 11.11111
OUTPUT_SCALE = 5
MIN_LIMIT = -3600.0
MAX_LIMIT = 3600.0
FERROR = 0.010
MIN_FERROR = 0.001
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.0
HOME_LATCH_VEL = 0.0
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = NO
DEADBAND = 0.046
P = 150
I = 100
D = 0.1
BIAS = 0
FF0 = 0
FF1 = 1
FF2 = 0


# section for main IO controller parameters
[EMCIO]

# Name of IO controller program, e.g., io
EMCIO = io

# cycle time, in seconds
CYCLE_TIME = 0.100

# tool table file
TOOL_TABLE = univpwm.tbl

This is my io.hal file:

# HAL config file for Pico Systems USC board
#
# Connect motion controller I/Os
#

# connect limit/home switch outputs to motion controller
net Xminlim <= ppmc.0.din.01.in
net Xminlim => axis.0.neg-lim-sw-in
net Xmaxlim <= ppmc.0.din.02.in
net Xmaxlim => axis.0.pos-lim-sw-in
net Xhome <= ppmc.0.din.00.in
net Xhome => axis.0.home-sw-in

net Yminlim <= ppmc.0.din.05.in
net Yminlim => axis.1.neg-lim-sw-in
net Ymaxlim <= ppmc.0.din.06.in
net Ymaxlim => axis.1.pos-lim-sw-in
net Yhome <= ppmc.0.din.04.in
net Yhome => axis.1.home-sw-in

net Zminlim <= ppmc.0.din.09.in
net Zminlim => axis.2.neg-lim-sw-in
net Zmaxlim <= ppmc.0.din.10.in
net Zmaxlim => axis.2.pos-lim-sw-in
net Zhome <= ppmc.0.din.08.in
net Zhome => axis.2.home-sw-in

net Aminlim <= ppmc.0.din.12.in
net Aminlim => axis.3.neg-lim-sw-in
net Amaxlim <= ppmc.0.din.13.in
net Amaxlim => axis.3.pos-lim-sw-in
net Ahome <= ppmc.0.din.11.in
net Ahome => axis.3.home-sw-in


# connect index pulses to motion controller
# uncomment these lines only if you have a Rev 3 UPC board
# The ppmc.x.encoder.xx.index-enable pin is ONLY exported by the driver
# if the UPC has rev 3 or above firmware
#newsig Xindex bit
#newsig Yindex bit
#newsig Zindex bit
#linksp Xindex <= ppmc.0.encoder.00.index-enable
#linksp Xindex => axis.0.index-enable
#linksp Yindex <= ppmc.0.encoder.01.index-enable
#linksp Yindex => axis.1.index-enable
#linksp Zindex <= ppmc.0.encoder.02.index-enable
#linksp Zindex => axis.2.index-enable

#
# Connect I/O controller I/Os
#

# connect e-stop write/sense to I/O controller
# and univpwm's fault with estop's output, so estop FF is reset, but
# prevent continued estop signal from univpwm from holding FF cleared
net ppmcEstop ppmc.0.din.15.in-not
net ppmcEstop and2.0.in0
net EstopOkIn estop-latch.0.fault-in
net EstopOkIn and2.0.out
net EstopOkOut <= ppmc.0.dout.07.out
net EstopOkOut iocontrol.0.emc-enable-in
net EstopOkOut estop-latch.0.ok-out
net EstopOkOut and2.0.in1
net emc-estop-out iocontrol.0.user-enable-out
net emc-estop-out estop-latch.0.ok-in
net emc-estop-reset iocontrol.0.user-request-enable
net emc-estop-reset estop-latch.0.reset

# connect spindle fwd/rev to I/O controller
net SpindleFwd <= ppmc.0.dout.00.out
net SpindleFwd => motion.spindle-forward
net SpindleRev <= ppmc.0.dout.01.out
net SpindleRev => motion.spindle-reverse

# connect spindle brake to I/O controller
#net SpindleBrakeOn <= ppmc.0.dout.02.out
#net SpindleBrakeOn => motion.spindle-brake

# connect mist/flood coolant to I/O controller
net MistOn <= ppmc.0.dout.03.out
net MistOn => iocontrol.0.coolant-mist
net FloodOn <= ppmc.0.dout.04.out
net FloodOn => iocontrol.0.coolant-flood

# ***Remove section below to revert to original file***
# set scale for 3500 RPM MAX and connect spindle speed to USC DAC
setp ppmc.0.DAC8.00.scale 350.0
newsig spinspeed float
linksp spinspeed <= motion.spindle-speed-out
linksp spinspeed => ppmc.0.DAC8.00.value

And this is my load.hal file:

# sample file pulls all load commands into a single file
# when emc2 starts it loads iocontrol

# kinematics
loadrt trivkins
# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES num_dio=6

# next load the PID module, for four PID loops
loadrt pid num_chan=4

# install Universal PWM Controller driver
# if the PWM controller is not connected to the standard parallel port
# at address 0x378, add port_addr="0x1234" to the following line, separated
# by a space
loadrt hal_ppmc port_addr="0x378" timestamp="0x00" extradac=0x00

# make some signals for the scope for tuning.
loadrt ddt count=4
loadrt estop_latch count=1
loadrt and2 count=1

# set up the realtime thread
# read inputs first
addf ppmc.0.read servo-thread
# then run the motion controller
addf motion-command-handler servo-thread
addf and2.0 servo-thread
addf estop-latch.0 servo-thread
addf motion-controller servo-thread
# then the PID loops
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
# write outputs last
addf ppmc.0.write servo-thread

This is the motion.hal file:

# HAL config file for Pico Systems UPC board
#

# set the PWM frequency to suit Pico's PWM amps (50KHz)
# users with other amps may need to change this
setp ppmc.0.pwm.00-03.freq 50000
# turn on bootstrapping for the MOSFET drivers
# this also depends on the amplifiers
setp ppmc.0.pwm.00.bootstrap TRUE
setp ppmc.0.pwm.01.bootstrap TRUE
setp ppmc.0.pwm.02.bootstrap TRUE
setp ppmc.0.pwm.03.bootstrap TRUE
# set max duty cycle to 95% for the MOSFET drives
# at 50KHz this corresponds to 1 us
setp ppmc.0.pwm.00.max-dc 0.95
setp ppmc.0.pwm.01.max-dc 0.95
setp ppmc.0.pwm.02.max-dc 0.95
setp ppmc.0.pwm.03.max-dc 0.95

# connect position feedback signals to encoders
net Xpos-fb <= ppmc.0.encoder.00.position
net Ypos-fb <= ppmc.0.encoder.01.position
net Zpos-fb <= ppmc.0.encoder.02.position
net Apos-fb <= ppmc.0.encoder.03.position

# get feedback scaling from ini file
setp ppmc.0.encoder.00.scale [AXIS_0]INPUT_SCALE
setp ppmc.0.encoder.01.scale [AXIS_1]INPUT_SCALE
setp ppmc.0.encoder.02.scale [AXIS_2]INPUT_SCALE
setp ppmc.0.encoder.03.scale [AXIS_3]INPUT_SCALE

# connect PID output signals to step generators
net Xoutput => ppmc.0.pwm.00.value
net Youtput => ppmc.0.pwm.01.value
net Zoutput => ppmc.0.pwm.02.value
net Aoutput => ppmc.0.pwm.03.value

# connect axis enables to step generators
net Xenable => ppmc.0.pwm.00.enable
net Yenable => ppmc.0.pwm.01.enable
net Zenable => ppmc.0.pwm.02.enable
net Aenable => ppmc.0.pwm.03.enable

# set output scaling from ini file
setp ppmc.0.pwm.00.scale [AXIS_0]OUTPUT_SCALE
setp ppmc.0.pwm.01.scale [AXIS_1]OUTPUT_SCALE
setp ppmc.0.pwm.02.scale [AXIS_2]OUTPUT_SCALE
setp ppmc.0.pwm.03.scale [AXIS_3]OUTPUT_SCALE

# add a couple of tuning test links
# if these are useful will want to add them to the other axes as well
# or make these setup with the tuning script
net Xoutput ddt.0.in
net Xpos-fb ddt.1.in

And this is the servo.hal file:

# HAL config file for servos -- expanded from core_servo.hal
# for a full four axis setup

# create four position feedback signals

# connect position feedback to PID loop
net Xpos-fb => pid.0.feedback
net Ypos-fb => pid.1.feedback
net Zpos-fb => pid.2.feedback
net Apos-fb => pid.3.feedback

# connect position feedback to motion module
net Xpos-fb => axis.0.motor-pos-fb
net Ypos-fb => axis.1.motor-pos-fb
net Zpos-fb => axis.2.motor-pos-fb
net Apos-fb => axis.3.motor-pos-fb

# create PID to DAC output signals

# connect output signals to output of PID loops
net Xoutput <= pid.0.output
net Youtput <= pid.1.output
net Zoutput <= pid.2.output
net Aoutput <= pid.3.output

# set PID loop output limits to +/-1.00
setp pid.0.maxoutput [AXIS_0]PID_MAX_VEL
setp pid.1.maxoutput [AXIS_1]PID_MAX_VEL
setp pid.2.maxoutput [AXIS_2]PID_MAX_VEL
setp pid.3.maxoutput [AXIS_3]PID_MAX_VEL

# set PID loop gains
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND

setp pid.1.Pgain [AXIS_1]P
setp pid.1.Igain [AXIS_1]I
setp pid.1.Dgain [AXIS_1]D
setp pid.1.bias [AXIS_1]BIAS
setp pid.1.FF0 [AXIS_1]FF0
setp pid.1.FF1 [AXIS_1]FF1
setp pid.1.FF2 [AXIS_1]FF2
setp pid.1.deadband [AXIS_1]DEADBAND

setp pid.2.Pgain [AXIS_2]P
setp pid.2.Igain [AXIS_2]I
setp pid.2.Dgain [AXIS_2]D
setp pid.2.bias [AXIS_2]BIAS
setp pid.2.FF0 [AXIS_2]FF0
setp pid.2.FF1 [AXIS_2]FF1
setp pid.2.FF2 [AXIS_2]FF2
setp pid.2.deadband [AXIS_2]DEADBAND

setp pid.3.Pgain [AXIS_3]P
setp pid.3.Igain [AXIS_3]I
setp pid.3.Dgain [AXIS_3]D
setp pid.3.bias [AXIS_3]BIAS
setp pid.3.FF0 [AXIS_3]FF0
setp pid.3.FF1 [AXIS_3]FF1
setp pid.3.FF2 [AXIS_3]FF2
setp pid.3.deadband [AXIS_3]DEADBAND

# create four position command signals

# connect position commands to motion controller
net Xpos-cmd <= axis.0.motor-pos-cmd
net Ypos-cmd <= axis.1.motor-pos-cmd
net Zpos-cmd <= axis.2.motor-pos-cmd
net Apos-cmd <= axis.3.motor-pos-cmd

# connect position commands to PID input
net Xpos-cmd => pid.0.command
net Ypos-cmd => pid.1.command
net Zpos-cmd => pid.2.command
net Apos-cmd => pid.3.command

# create bit signals to enable/disable the PID loops

# connect the signals to the motion controller
net Xenable <= axis.0.amp-enable-out
net Yenable <= axis.1.amp-enable-out
net Zenable <= axis.2.amp-enable-out
net Aenable <= axis.3.amp-enable-out

# connect the signals to the PID blocks
net Xenable => pid.0.enable
net Yenable => pid.1.enable
net Zenable => pid.2.enable
net Aenable => pid.3.enable

Any help making this happen would be a huge plus in my book. If I can figure this out, we can add the file to Jon's files so that anyone needing this kind of configuration and who may want to use Jon's boards can use do so much easier.

Thanks in advance,

Scot
Last edit: 05 Oct 2019 21:28 by Scot. Reason: I was missing some hal files that will likely help solve my problem.

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

More
05 Oct 2019 21:23 - 05 Oct 2019 21:25 #147222 by OT-CNC
Replied by OT-CNC on topic Lathe gui reconfiguration
Scot,

Can you just attach the whole folder containing the hal files and the ini of your machine and attach as a zip? Not in the body of the post. Looks like there are a number of hal files listed:

# list of hal config files to run through halcmd
# files are executed in the order in which they appear
HALFILE = univpwm_load.hal
HALFILE = univpwm_servo.hal
HALFILE = univpwm_motion.hal
HALFILE = univpwm_io.hal

I'd like to give a stab at it to see if it loads on my sim.
Last edit: 05 Oct 2019 21:25 by OT-CNC. Reason: sp.
The following user(s) said Thank You: Scot

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

Time to create page: 0.162 seconds
Powered by Kunena Forum