Search Results (Searched for: stepper spindle)
04 Jul 2024 00:13 - 04 Jul 2024 01:21
sherline ballscrew lathe moving 0.99mm for each 1mm...linux or machine issue?
Category: General LinuxCNC Questions
I am running linuxcnc 2.7 for a sherline ballscrew lathe that I just received. They had a disc that came with linux 2.6 but I opted to set things up on my own with stepconf and a parallel port adapter. I hooked everything up and got it all working but am getting a puzzling issue...For ever 1mm I move in Gcode, the machine moves 0.99mm. This means if I move it 5mm it end sup at 4.95, and if I move it 10mm it ends up at 9.9 and so on and so forth. I am using a perpendicular dial test indicator and this is for the Z axis. This would not be typical backlash behavior.
My question is...is this a lathe issue or a linux issue? I am using the sherline high torque stepper motors which are branded as "anaheim automation 23y204D-LW5-01"
EDIT: I used a better dial indicator and the problem was not as bad as I first thought HOWEVER - what I am noticing is that the lathe actually moves shorter only in the forward direction, going backwards it ends up dead on. But no matter how I change my backlash adjustment it does not fix it
EDIT#2: could it actually be due to my dial indicator not being perfectly perpendicular to the saddle?
I borrowed .ini file settings some from the original disc and others made through the stepconf.
-it is hard to find specs on sherlines ballscrews but I found that they said it was a pitch of 2mm
-I have only texted axis #2 so far (in the ini file)
-I purposely # out the backlash comp as I realized it was not backlash
Stepconf settings:
Driver microsteps: 2 (dont know where to find this online for my steppers, so kept generic)
leadscrew pitch: 2mm
pulley teeth: 1:1
Ini file below:
# Generated by stepconf 1.1 at Wed Jul 3 10:51:18 2024
# If you make changes to this file, they will be
# overwritten when you run stepconf again
[EMC]
MACHINE = sherline
DEBUG = 0
[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm 1in 2in 5in 10in
MAX_FEED_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_OVERRIDE = 1.2
DEFAULT_LINEAR_VELOCITY = 2.50
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 25.00
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/mg/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
LATHE = 1
[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 = linuxcnc.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 50000
SERVO_PERIOD = 1000000
[HAL]
HALUI = halui
HALFILE = sherline.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
[HALUI]
# add halui MDI commands here (max 64)
[TRAJ]
AXES = 3
COORDINATES = X Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 2.50
MAX_VELOCITY = 25.00
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 23.75
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 755
SCALE = 400.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -1016.0
MAX_LIMIT = 203.2
HOME_OFFSET = 0.0
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 23.75
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 755
SCALE = 400.0
# BACKLASH = 0.03
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -1016.0
MAX_LIMIT = 431.8
HOME_OFFSET = 0.0
My question is...is this a lathe issue or a linux issue? I am using the sherline high torque stepper motors which are branded as "anaheim automation 23y204D-LW5-01"
EDIT: I used a better dial indicator and the problem was not as bad as I first thought HOWEVER - what I am noticing is that the lathe actually moves shorter only in the forward direction, going backwards it ends up dead on. But no matter how I change my backlash adjustment it does not fix it
EDIT#2: could it actually be due to my dial indicator not being perfectly perpendicular to the saddle?
I borrowed .ini file settings some from the original disc and others made through the stepconf.
-it is hard to find specs on sherlines ballscrews but I found that they said it was a pitch of 2mm
-I have only texted axis #2 so far (in the ini file)
-I purposely # out the backlash comp as I realized it was not backlash
Stepconf settings:
Driver microsteps: 2 (dont know where to find this online for my steppers, so kept generic)
leadscrew pitch: 2mm
pulley teeth: 1:1
Ini file below:
# Generated by stepconf 1.1 at Wed Jul 3 10:51:18 2024
# If you make changes to this file, they will be
# overwritten when you run stepconf again
[EMC]
MACHINE = sherline
DEBUG = 0
[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm 1in 2in 5in 10in
MAX_FEED_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_OVERRIDE = 1.2
DEFAULT_LINEAR_VELOCITY = 2.50
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 25.00
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/mg/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
LATHE = 1
[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 = linuxcnc.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 50000
SERVO_PERIOD = 1000000
[HAL]
HALUI = halui
HALFILE = sherline.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
[HALUI]
# add halui MDI commands here (max 64)
[TRAJ]
AXES = 3
COORDINATES = X Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 2.50
MAX_VELOCITY = 25.00
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 23.75
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 755
SCALE = 400.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -1016.0
MAX_LIMIT = 203.2
HOME_OFFSET = 0.0
[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 23.75
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 755
SCALE = 400.0
# BACKLASH = 0.03
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -1016.0
MAX_LIMIT = 431.8
HOME_OFFSET = 0.0
03 Jul 2024 21:55
Error finishing read! Iter and joint following error in Stepper machine
Category: General LinuxCNC Questions
Hello guys
i am getting some errors related to stopping the movement of the axis suddenly with a Error Finishing read and joint following error although I have a 2000000 servo period.
is there anyway can I improve my ini file to get over this?
would it be ok to increase servo period further?
thank you
i am getting some errors related to stopping the movement of the axis suddenly with a Error Finishing read and joint following error although I have a 2000000 servo period.
is there anyway can I improve my ini file to get over this?
would it be ok to increase servo period further?
thank you
.# Generated by PNCconf at Sat Dec 23 11:16:08 2023
# Using LinuxCNC version: Master (2.9)
# If you make changes to this file, they will be
# overwritten when you run PNCconf again
[EMC]
MACHINE = cbv
DEBUG = 0
VERSION = 1.1
[DISPLAY]
DISPLAY = qtvcp qtplasmac
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/tru/linuxcnc/nc_files
INCREMENTS = 10mm 1mm .1mm .01mm .001mm
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 133.333333
MAX_LINEAR_VELOCITY = 166.666667
MIN_LINEAR_VELOCITY = 0.500000
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
GEOMETRY = xyz
CYCLE_TIME = 100
[FILTER]
PROGRAM_EXTENSION = .ngc,.nc,.tap GCode File (*.ngc, *.nc, *.tap)
ngc = qtplasmac_gcode
nc = qtplasmac_gcode
tap = qtplasmac_gcode
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
RS274NGC_STARTUP_CODE = G21 G40 G49 G80 G90 G92.1 G94 G97 M52P1
SUBROUTINE_PATH = ./:../../nc_files
USER_M_PATH = ./:../../nc_files
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 2000000
[HMOT]
CARD0=hm2_7i96s.0
[HAL]
HALUI = halui
HALFILE = cbv.hal
HALFILE = qtplasmac_comp.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
SHUTDOWN = shutdown.hal
[HALUI]
[KINS]
JOINTS = 3
KINEMATICS = trivkins coordinates=XYZ
[TRAJ]
SPINDLES = 3
COORDINATES = XYZ
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 10.00
MAX_LINEAR_VELOCITY = 100.00
POSITION_FILE = position.txt
NO_FORCE_HOMING = 1
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
#******************************************
[AXIS_X]
# MAX_VEL & MAX_ACC need to be twice the corresponding joint value
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 750.0
OFFSET_AV_RATIO = 0.5
MIN_LIMIT = -0.01
MAX_LIMIT = 2000.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 375.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 62.50
STEPGEN_MAXACCEL = 468.75
P = 1250.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 88.0
MIN_LIMIT = -0.01
MAX_LIMIT = 2000.0
HOME_OFFSET = -5.000000
HOME_SEARCH_VEL = -33.333333
HOME_LATCH_VEL = -0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1
#******************************************
#******************************************
[AXIS_Y]
# MAX_VEL & MAX_ACC need to be twice the corresponding joint value
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 1500.0
OFFSET_AV_RATIO = 0.5
MIN_LIMIT = -0.01
MAX_LIMIT = 3000.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 750.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 125.00
STEPGEN_MAXACCEL = 937.50
P = 1250.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = -88.0
MIN_LIMIT = -0.01
MAX_LIMIT = 3000.0
HOME_OFFSET = -5.000000
HOME_SEARCH_VEL = -33.333333
HOME_LATCH_VEL = -0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2
#******************************************
#******************************************
[AXIS_Z]
# MAX_VEL & MAX_ACC need to be twice the corresponding joint value
MAX_VELOCITY = 200.0
MAX_ACCELERATION = 1300.0
OFFSET_AV_RATIO = 0.5
MIN_LIMIT = -0.0
MAX_LIMIT = 100.01
[JOINT_2]
TYPE = LINEAR
HOME = 100.0
FERROR = 10.0
MIN_FERROR = 1.0
MAX_VELOCITY = 100.0
MAX_ACCELERATION = 650.0
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 125.00
STEPGEN_MAXACCEL = 812.50
P = 1250.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
# these are in nanoseconds
DIRSETUP = 10000
DIRHOLD = 10000
STEPLEN = 5000
STEPSPACE = 5000
STEP_SCALE = 290.0
MIN_LIMIT = -0.0
MAX_LIMIT = 100.01
HOME_OFFSET = 104.000000
HOME_SEARCH_VEL = 10.000000
HOME_LATCH_VEL = 0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 0
#******************************************
02 Jul 2024 08:14
DB 10 - 11 - 12 -13 - 15 Inputs via opto couplers
DB 1 5v output marked as Motor
If I was wiring this, assuming a 3 axis mill with no rotary axis nor a slaved axis as in a gantry:
The enables for X Y Z I would not connect to the stepper motors, most simple machines use this method.
Connector A I would use for the spindle with PWM output on CK, CW for forward and EN for enable. Tho you could use CW for forward and EN for Reverse depending on the spindle itself.
Connector "MOTO" could be used for any needed output.
IMHO the naming convention for the connectors doesn't conform to the "defacto standard", Pins 2-9 for axis x-y-z-a. Honestly this looks like a poorly designed board. The 1N4007 after the 5v regulator with drop that voltage to 4.2 to 4.4 volts.
The 15v reg isn't really required if you were to supply the board with 8 to 9 volts. This would be a product I'd wouldn't be inclined t use. If you have it it should work, but you'll want to keep careful notes of the wiring.
Even the schematic isn't 100% clear What be be assumed to be resistor networks marked RN1 & RN2 are only shown as standard resistor. Generally I like to use buffers for at least all outputs, where as only the step & direction have buffers, the enables don't (which generally are controlling the same type of opto isolator on the stepper driver as the step & direction).
Not too usre if you are in the UK or US but if this is your first build I tend to opto for one of these
cnc4pc.com/c35s-breakout-board.html
I've got one at home I use for testing and found the docs, build quality & design quite good.
Sorry if I sound like a bit of a downer, but just some things I've noted.
Replied by cornholio on topic A Treatsie on the Parallel Port - HP Elitedesk 800 with generic cable
A Treatsie on the Parallel Port - HP Elitedesk 800 with generic cable
Category: Installing LinuxCNC
- A
- EN - enable - DB14 - shared with X enable
- CW - dir - DB-03
- CK - step - DB-02
- Z
- EN - enable - DB-08
- CW - dir - DB-06
- CK - step - DB-07
- Y
- EN - enable - DB-09
- CW - dir - DB-05
- CK - step - DB-04
- X
- EN - enable - DB-14 - shared with A enable
- CW - dir - - DB-17
- CK - setp - DB-16
DB 10 - 11 - 12 -13 - 15 Inputs via opto couplers
DB 1 5v output marked as Motor
If I was wiring this, assuming a 3 axis mill with no rotary axis nor a slaved axis as in a gantry:
The enables for X Y Z I would not connect to the stepper motors, most simple machines use this method.
Connector A I would use for the spindle with PWM output on CK, CW for forward and EN for enable. Tho you could use CW for forward and EN for Reverse depending on the spindle itself.
Connector "MOTO" could be used for any needed output.
IMHO the naming convention for the connectors doesn't conform to the "defacto standard", Pins 2-9 for axis x-y-z-a. Honestly this looks like a poorly designed board. The 1N4007 after the 5v regulator with drop that voltage to 4.2 to 4.4 volts.
The 15v reg isn't really required if you were to supply the board with 8 to 9 volts. This would be a product I'd wouldn't be inclined t use. If you have it it should work, but you'll want to keep careful notes of the wiring.
Even the schematic isn't 100% clear What be be assumed to be resistor networks marked RN1 & RN2 are only shown as standard resistor. Generally I like to use buffers for at least all outputs, where as only the step & direction have buffers, the enables don't (which generally are controlling the same type of opto isolator on the stepper driver as the step & direction).
Not too usre if you are in the UK or US but if this is your first build I tend to opto for one of these
cnc4pc.com/c35s-breakout-board.html
I've got one at home I use for testing and found the docs, build quality & design quite good.
Sorry if I sound like a bit of a downer, but just some things I've noted.
02 Jul 2024 06:27
Replied by hpmax on topic A Treatsie on the Parallel Port - HP Elitedesk 800 with generic cable
A Treatsie on the Parallel Port - HP Elitedesk 800 with generic cable
Category: Installing LinuxCNC
FWIW, I bought two different ones from Amazon so that I could return it if it doesn't work, however, the Startech AX99100 now appears to be "working" so that's good and it seems to have pretty decent performance.
The remaining (off topic) question is, how do I configure it? I appear to have DJK-01A BOB (which may also be called a "Tonsen 4 Aixs [SIC] Con[troller]" it's driving 4 TX14207 stepper motor driver cards, the fourth being to run a "lathe" unit and is "A."
I found this post: www.mycncuk.com/threads/6922-Tonsen-4-Axis-Controller-Bob which includes a schematic.
Is it as simple as CK = Step, and CW = direction. What about enable (is there a separate enable for Y/Z vs A/X)? Is there a way to control the spindle or is that purely from front panel?
That probably explains why my X-axis doesn't work since it's pin 16/17 not 2/3. But not the weird noises from the Y-axis.
The remaining (off topic) question is, how do I configure it? I appear to have DJK-01A BOB (which may also be called a "Tonsen 4 Aixs [SIC] Con[troller]" it's driving 4 TX14207 stepper motor driver cards, the fourth being to run a "lathe" unit and is "A."
I found this post: www.mycncuk.com/threads/6922-Tonsen-4-Axis-Controller-Bob which includes a schematic.
Is it as simple as CK = Step, and CW = direction. What about enable (is there a separate enable for Y/Z vs A/X)? Is there a way to control the spindle or is that purely from front panel?
That probably explains why my X-axis doesn't work since it's pin 16/17 not 2/3. But not the weird noises from the Y-axis.
01 Jul 2024 11:23
I’m staring to think go with kill all drive drives power including spindle drive but leave the control board running and also get it to receive the estop signal.
Also do you know of any good 220v relays that are din mountable that don’t hum loudly when they are on?
Thanks
Replied by Dave2024 on topic Gutting my machine questions
Gutting my machine questions
Category: Driver Boards
Well I’m getting rid of anything and everything VFD related here lol. Its a 100% stepper system. The drives are cheap all though the new spindle drive is pretty nice just is difficult to understand how to configure it and all. I’m pretty sure the spindle drive has some kind of limits functionality that can be programed into it, maybe even an estop command can be sent to it. As far the other drives they only take power and step/dir input.Are the motors brushed DC or brushless, or steppers?
If brushed DC there are also "extreme limits" that also cut power to drives.
I’m staring to think go with kill all drive drives power including spindle drive but leave the control board running and also get it to receive the estop signal.
Also do you know of any good 220v relays that are din mountable that don’t hum loudly when they are on?
Thanks
01 Jul 2024 09:26
Replied by tommylight on topic Gutting my machine questions
Gutting my machine questions
Category: Driver Boards
In general, never ever switch of the DC side of things.
Leaving the controller on even on E-stop is a good advice as you can check what went wrong.
E-stop should kill power to drives and spindle, and must be considered as the last resort in case something goes wrong.
Are the motors brushed DC or brushless, or steppers?
If brushed DC there are also "extreme limits" that also cut power to drives.
Leaving the controller on even on E-stop is a good advice as you can check what went wrong.
E-stop should kill power to drives and spindle, and must be considered as the last resort in case something goes wrong.
Are the motors brushed DC or brushless, or steppers?
If brushed DC there are also "extreme limits" that also cut power to drives.
01 Jul 2024 08:48
Replied by Dave2024 on topic Gutting my machine questions
Gutting my machine questions
Category: Driver Boards
Ok well on the new spindle drive that I’m working with it has something in the manual that talks about estop signal but there’s no documentation on how to use it. The other drives for the stepper motors to the axis's XYZ have no such thing. I really think my machine was originally so old and cheap that the stepper drives didn’t have a control power option built in when manufactured, so it was designed to kill the control board all together instead. I might have to do the same thing here with this estop or do something at least with figuring out how to signal the spindle drive to receive the estop alert then on the control board signal it the estop function but not completely kill the power to it?The ideal setup is estop kills the servo drive motor power input, and spindle power input.
Most servo drives have two power inputs: control power, and motor power
Estop circuit should signal to Linuxcnc that estop has occurred.
Most servo drives will have a digital input that can be configured as estop/fault
27 Jun 2024 22:21
Replied by disneysw on topic Problem with a MESA 7i76
Problem with a MESA 7i76
Category: General LinuxCNC Questions
Sorry to dig up an old thread but I have fried a 7I76 board due to connecting the end stop plug into the spindle connector and shoving 24V where it was never supposed to go!
Mine is a rev C board and PTC4 is badly scorched but still seems to be working. CR17 went short circuit and was burnt to a crisp which in some ways may have been a saving grace.
The FPGA is working and the voltage rails look good but the stepper buffers seem to be damaged.
I know I need to order SSOP versions of the 74ACT541 and 74ACT540 but what values are the PPTC and CR17? What else may have gone?
Finally is the schematic for the 7i76 available?
Mine is a rev C board and PTC4 is badly scorched but still seems to be working. CR17 went short circuit and was burnt to a crisp which in some ways may have been a saving grace.
The FPGA is working and the voltage rails look good but the stepper buffers seem to be damaged.
I know I need to order SSOP versions of the 74ACT541 and 74ACT540 but what values are the PPTC and CR17? What else may have gone?
Finally is the schematic for the 7i76 available?
24 Jun 2024 12:11 - 24 Jun 2024 12:14
Replied by electrosteam on topic Mesa 7i96 Ethernet Socket Problems - LC2.9.2 on Raspberry Pi 4B
Mesa 7i96 Ethernet Socket Problems - LC2.9.2 on Raspberry Pi 4B
Category: Driver Boards
Using the official download image without any modifications.
I cannot find Network Manager on this release.
Used Terminal to launch "menu-config".
Get a dialog box with options to edit entries.
All wifi channels deactivated.
Only one one wired channel activated and edited per:
- Device: eth0 ( ::::: ) as reported by "ip a",
- IPv4 config: Auto,
- Address: 10.10.10.11/8,
- Gateway" 10.10.10.1,
- IPv6: Ignore,
- Automatically connect: [x],
- Available all users: [x].
All workshop equipment and ancillaries de-energized.
Steppers powered off.
VFD in adjacent cubicle powered on, but not operating spindle.
Operation as reported earlier with lost packets.
John.
I cannot find Network Manager on this release.
Used Terminal to launch "menu-config".
Get a dialog box with options to edit entries.
All wifi channels deactivated.
Only one one wired channel activated and edited per:
- Device: eth0 ( ::::: ) as reported by "ip a",
- IPv4 config: Auto,
- Address: 10.10.10.11/8,
- Gateway" 10.10.10.1,
- IPv6: Ignore,
- Automatically connect: [x],
- Available all users: [x].
All workshop equipment and ancillaries de-energized.
Steppers powered off.
VFD in adjacent cubicle powered on, but not operating spindle.
Operation as reported earlier with lost packets.
John.
21 Jun 2024 06:07
If you dont mind me asking what kind of setup for a machine are you running a one of these T6's with? And which motor do you have? Is it the 1kw motor? Im planning on posibly running mine as a spindle for a mill of mine that has a sketchy motor and if ever goes bad I need the T6 with 1Kw motor as a backup
Replied by Dave2024 on topic StepperOnline T6 servo drive
StepperOnline T6 servo drive
Category: PnCConf Wizard
I've got the exact same setup and had the exact same problem. If memory serves it needed to be enabled, I think I just connected a pin to 24+, a wire for 24+ and a gnd wire.
If you can't figure it out I'll open the panel and post a pic.
No need but thanks! I just figured it out on the led screen with the buttons I had to go into PA400 press the set button and change it from 3 to 38 then press the Set button one last time and unplug and replug the power restarting it and it then starts up in SVR-ON mode. Then im now able to use the step/dir signal port to control the motor. Awesome!
If you dont mind me asking what kind of setup for a machine are you running a one of these T6's with? And which motor do you have? Is it the 1kw motor? Im planning on posibly running mine as a spindle for a mill of mine that has a sketchy motor and if ever goes bad I need the T6 with 1Kw motor as a backup
20 Jun 2024 23:38
StepperOnline T6 servo drive was created by Dave2024
StepperOnline T6 servo drive
Category: PnCConf Wizard
Hi, is anyone familiar with the StepperOnline T6 servo drives? I had got one a few weeks ago as they are sold as a complete kit including motor and cables and are supposedly a ready to run kit. Well, I got mine and connected the step/dir wires to a mesa 7i96s then in the Pncconf wizard I go to test the axis and there’s no movement. When I connect to it using the diagnostics cable and Motion Studio configuration software it starts rite up and I’m able to jog it. Does anyone know if there’s some kind of special parameters settings needed on the drive to make it work?
I see in the manual it says something about how “frequency for both input mode signal is 500kHz(Differential), 300kHz(Single-ended).” Is Pncconf using the correct frequency or is that something I should be looking at? Thanks Or how can I set this up as a spindle using step/dir? Thanks
I see in the manual it says something about how “frequency for both input mode signal is 500kHz(Differential), 300kHz(Single-ended).” Is Pncconf using the correct frequency or is that something I should be looking at? Thanks Or how can I set this up as a spindle using step/dir? Thanks
19 Jun 2024 06:42
I have created a distributed motion-controller using this device. Limited to 128 axes but that can be increased if need be
However, I'm a closed-loop servo kinda guy. Can't understand why anyone would be using steppers for machining, etc.
Craig
Replied by Tinine on topic ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
ESP32/S2/S3 LinuxCNC Controller (6 axis hardware step gen), USB plug-and-play
Category: Computers and Hardware
Using the PIO state-machines of the RPi Pico, quad-decode/counting of multiple encoders is a piece of cake.
Idea was inspired by this one.
I have created a distributed motion-controller using this device. Limited to 128 axes but that can be increased if need be
However, I'm a closed-loop servo kinda guy. Can't understand why anyone would be using steppers for machining, etc.
Craig
09 Jun 2024 23:11
Replied by jg00163206 on topic mesa outputs
mesa outputs
Category: General LinuxCNC Questions
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="10.10.10.10" config="num_encoders=1 num_pwmgens=1 num_stepgens=5 sserial_port_0=0xxxxxxx"
setp [HMOT](CARD0).pwmgen.pwm_frequency 20000
setp [HMOT](CARD0).pwmgen.pdm_frequency 6000000
setp [HMOT](CARD0).watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z,pid.s
addf [HMOT](CARD0).read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf [HMOT](CARD0).write servo-thread
setp [HMOT](CARD0).dpll.01.timer-us -50
setp [HMOT](CARD0).stepgen.timer-number 1
# external output signals
# --- SPINDLE-BRAKE ---
net spindle-brake => [HMOT](CARD0).outm.00.out-04
# --- SPINDLE-ENABLE ---
net spindle-enable => [HMOT](CARD0).outm.00.out-05
# external input signals
# --- HOME-X ---
net home-x <= [HMOT](CARD0).gpio.001.in_not
# --- HOME-Y ---
net home-y <= [HMOT](CARD0).gpio.002.in_not
# --- HOME-Z ---
net home-z <= [HMOT](CARD0).gpio.003.in_not
# --- PROBE-IN ---
net probe-in <= [HMOT](CARD0).gpio.004.in
# --- ESTOP-EXT ---
net estop-ext <= [HMOT](CARD0).gpio.005.in_not
#*******************
# AXIS X JOINT 0
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.x.maxerror 0.000500
net x-index-enable => pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-pos-fb => pid.x.feedback
net x-output <= pid.x.output
# Step Gen signals/setup
setp [HMOT](CARD0).stepgen.01.dirsetup [JOINT_0]DIRSETUP
setp [HMOT](CARD0).stepgen.01.dirhold [JOINT_0]DIRHOLD
setp [HMOT](CARD0).stepgen.01.steplen [JOINT_0]STEPLEN
setp [HMOT](CARD0).stepgen.01.stepspace [JOINT_0]STEPSPACE
setp [HMOT](CARD0).stepgen.01.position-scale [JOINT_0]STEP_SCALE
setp [HMOT](CARD0).stepgen.01.step_type 0
setp [HMOT](CARD0).stepgen.01.control-type 1
setp [HMOT](CARD0).stepgen.01.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.01.maxvel [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-output => [HMOT](CARD0).stepgen.01.velocity-cmd
net x-pos-fb <= [HMOT](CARD0).stepgen.01.position-fb
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => [HMOT](CARD0).stepgen.01.enable
# ---setup home / limit switch signals---
net home-x => joint.0.home-sw-in
net x-neg-limit => joint.0.neg-lim-sw-in
net x-pos-limit => joint.0.pos-lim-sw-in
#*******************
# AXIS Y JOINT 1
#*******************
setp pid.y.Pgain [JOINT_1]P
setp pid.y.Igain [JOINT_1]I
setp pid.y.Dgain [JOINT_1]D
setp pid.y.bias [JOINT_1]BIAS
setp pid.y.FF0 [JOINT_1]FF0
setp pid.y.FF1 [JOINT_1]FF1
setp pid.y.FF2 [JOINT_1]FF2
setp pid.y.deadband [JOINT_1]DEADBAND
setp pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.y.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.y.maxerror 0.000500
net y-index-enable => pid.y.index-enable
net y-enable => pid.y.enable
net y-pos-cmd => pid.y.command
net y-pos-fb => pid.y.feedback
net y-output <= pid.y.output
# Step Gen signals/setup
setp [HMOT](CARD0).stepgen.00.dirsetup [JOINT_1]DIRSETUP
setp [HMOT](CARD0).stepgen.00.dirhold [JOINT_1]DIRHOLD
setp [HMOT](CARD0).stepgen.00.steplen [JOINT_1]STEPLEN
setp [HMOT](CARD0).stepgen.00.stepspace [JOINT_1]STEPSPACE
setp [HMOT](CARD0).stepgen.00.position-scale [JOINT_1]STEP_SCALE
setp [HMOT](CARD0).stepgen.00.step_type 0
setp [HMOT](CARD0).stepgen.00.control-type 1
setp [HMOT](CARD0).stepgen.00.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.00.maxvel [JOINT_1]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net y-pos-cmd <= joint.1.motor-pos-cmd
net y-vel-cmd <= joint.1.vel-cmd
net y-output => [HMOT](CARD0).stepgen.00.velocity-cmd
net y-pos-fb <= [HMOT](CARD0).stepgen.00.position-fb
net y-pos-fb => joint.1.motor-pos-fb
net y-enable <= joint.1.amp-enable-out
net y-enable => [HMOT](CARD0).stepgen.00.enable
# ---setup home / limit switch signals---
net home-y => joint.1.home-sw-in
net y-neg-limit => joint.1.neg-lim-sw-in
net y-pos-limit => joint.1.pos-lim-sw-in
#*******************
# AXIS Z JOINT 2
#*******************
setp pid.z.Pgain [JOINT_2]P
setp pid.z.Igain [JOINT_2]I
setp pid.z.Dgain [JOINT_2]D
setp pid.z.bias [JOINT_2]BIAS
setp pid.z.FF0 [JOINT_2]FF0
setp pid.z.FF1 [JOINT_2]FF1
setp pid.z.FF2 [JOINT_2]FF2
setp pid.z.deadband [JOINT_2]DEADBAND
setp pid.z.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.z.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.z.maxerror 0.000500
net z-index-enable => pid.z.index-enable
net z-enable => pid.z.enable
net z-pos-cmd => pid.z.command
net z-pos-fb => pid.z.feedback
net z-output <= pid.z.output
# Step Gen signals/setup
setp [HMOT](CARD0).stepgen.03.dirsetup [JOINT_2]DIRSETUP
setp [HMOT](CARD0).stepgen.03.dirhold [JOINT_2]DIRHOLD
setp [HMOT](CARD0).stepgen.03.steplen [JOINT_2]STEPLEN
setp [HMOT](CARD0).stepgen.03.stepspace [JOINT_2]STEPSPACE
setp [HMOT](CARD0).stepgen.03.position-scale [JOINT_2]STEP_SCALE
setp [HMOT](CARD0).stepgen.03.step_type 0
setp [HMOT](CARD0).stepgen.03.control-type 1
setp [HMOT](CARD0).stepgen.03.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.03.maxvel [JOINT_2]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net z-pos-cmd <= joint.2.motor-pos-cmd
net z-vel-cmd <= joint.2.vel-cmd
net z-output => [HMOT](CARD0).stepgen.03.velocity-cmd
net z-pos-fb <= [HMOT](CARD0).stepgen.03.position-fb
net z-pos-fb => joint.2.motor-pos-fb
net z-enable <= joint.2.amp-enable-out
net z-enable => [HMOT](CARD0).stepgen.03.enable
# ---setup home / limit switch signals---
net home-z => joint.2.home-sw-in
net z-neg-limit => joint.2.neg-lim-sw-in
net z-pos-limit => joint.2.pos-lim-sw-in
#*******************
# SPINDLE
#*******************
setp pid.s.Pgain [SPINDLE_0]P
setp pid.s.Igain [SPINDLE_0]I
setp pid.s.Dgain [SPINDLE_0]D
setp pid.s.bias [SPINDLE_0]BIAS
setp pid.s.FF0 [SPINDLE_0]FF0
setp pid.s.FF1 [SPINDLE_0]FF1
setp pid.s.FF2 [SPINDLE_0]FF2
setp pid.s.deadband [SPINDLE_0]DEADBAND
setp pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp pid.s.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.s.maxerror 0.000500
net spindle-index-enable => pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm => pid.s.command
net spindle-vel-fb-rpm => pid.s.feedback
net spindle-output <= pid.s.output
# Step Gen signals/setup
setp [HMOT](CARD0).stepgen.04.dirsetup [SPINDLE_0]DIRSETUP
setp [HMOT](CARD0).stepgen.04.dirhold [SPINDLE_0]DIRHOLD
setp [HMOT](CARD0).stepgen.04.steplen [SPINDLE_0]STEPLEN
setp [HMOT](CARD0).stepgen.04.stepspace [SPINDLE_0]STEPSPACE
setp [HMOT](CARD0).stepgen.04.position-scale [SPINDLE_0]STEP_SCALE
setp [HMOT](CARD0).stepgen.04.step_type 0
setp [HMOT](CARD0).stepgen.04.control-type 1
setp [HMOT](CARD0).stepgen.04.maxaccel [SPINDLE_0]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.04.maxvel [SPINDLE_0]STEPGEN_MAXVEL
net machine-is-on => [HMOT](CARD0).stepgen.04.enable
net spindle-vel-cmd-rps => [HMOT](CARD0).stepgen.04.velocity-cmd
net spindle-vel-fb-rps <= [HMOT](CARD0).stepgen.04.velocity-fb
# ---setup spindle control signals---
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
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
# ---Setup spindle at speed signals---
sets spindle-at-speed true
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net axis-select-x halui.axis.x.select
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-x-analog halui.axis.x.analog
net x-is-homed halui.joint.0.is-homed
net axis-select-y halui.axis.y.select
net jog-y-pos halui.axis.y.plus
net jog-y-neg halui.axis.y.minus
net jog-y-analog halui.axis.y.analog
net y-is-homed halui.joint.1.is-homed
net axis-select-z halui.axis.z.select
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-z-analog halui.axis.z.analog
net z-is-homed halui.joint.2.is-homed
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net spindle-manual-cw halui.spindle.0.forward
net spindle-manual-ccw halui.spindle.0.reverse
net spindle-manual-stop halui.spindle.0.stop
net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
# ---coolant signals---
net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood
# ---probe signal---
net probe-in => motion.probe-input
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
# ---digital in / out signals---
# ---estop signals---
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in
# ---toolchange signals for custom tool changer---
net tool-number <= iocontrol.0.tool-prep-number
net tool-change-request <= iocontrol.0.tool-change
net tool-change-confirmed => iocontrol.0.tool-changed
net tool-prepare-request <= iocontrol.0.tool-prepare
net tool-prepare-confirmed => iocontrol.0.tool-prepared
heres the hal file.
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="10.10.10.10" config="num_encoders=1 num_pwmgens=1 num_stepgens=5 sserial_port_0=0xxxxxxx"
setp [HMOT](CARD0).pwmgen.pwm_frequency 20000
setp [HMOT](CARD0).pwmgen.pdm_frequency 6000000
setp [HMOT](CARD0).watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.y,pid.z,pid.s
addf [HMOT](CARD0).read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf [HMOT](CARD0).write servo-thread
setp [HMOT](CARD0).dpll.01.timer-us -50
setp [HMOT](CARD0).stepgen.timer-number 1
# external output signals
# --- SPINDLE-BRAKE ---
net spindle-brake => [HMOT](CARD0).outm.00.out-04
# --- SPINDLE-ENABLE ---
net spindle-enable => [HMOT](CARD0).outm.00.out-05
# external input signals
# --- HOME-X ---
net home-x <= [HMOT](CARD0).gpio.001.in_not
# --- HOME-Y ---
net home-y <= [HMOT](CARD0).gpio.002.in_not
# --- HOME-Z ---
net home-z <= [HMOT](CARD0).gpio.003.in_not
# --- PROBE-IN ---
net probe-in <= [HMOT](CARD0).gpio.004.in
# --- ESTOP-EXT ---
net estop-ext <= [HMOT](CARD0).gpio.005.in_not
#*******************
# AXIS X JOINT 0
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.x.maxerror 0.000500
net x-index-enable => pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-pos-fb => pid.x.feedback
net x-output <= pid.x.output
# Step Gen signals/setup
setp [HMOT](CARD0).stepgen.01.dirsetup [JOINT_0]DIRSETUP
setp [HMOT](CARD0).stepgen.01.dirhold [JOINT_0]DIRHOLD
setp [HMOT](CARD0).stepgen.01.steplen [JOINT_0]STEPLEN
setp [HMOT](CARD0).stepgen.01.stepspace [JOINT_0]STEPSPACE
setp [HMOT](CARD0).stepgen.01.position-scale [JOINT_0]STEP_SCALE
setp [HMOT](CARD0).stepgen.01.step_type 0
setp [HMOT](CARD0).stepgen.01.control-type 1
setp [HMOT](CARD0).stepgen.01.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.01.maxvel [JOINT_0]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-output => [HMOT](CARD0).stepgen.01.velocity-cmd
net x-pos-fb <= [HMOT](CARD0).stepgen.01.position-fb
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => [HMOT](CARD0).stepgen.01.enable
# ---setup home / limit switch signals---
net home-x => joint.0.home-sw-in
net x-neg-limit => joint.0.neg-lim-sw-in
net x-pos-limit => joint.0.pos-lim-sw-in
#*******************
# AXIS Y JOINT 1
#*******************
setp pid.y.Pgain [JOINT_1]P
setp pid.y.Igain [JOINT_1]I
setp pid.y.Dgain [JOINT_1]D
setp pid.y.bias [JOINT_1]BIAS
setp pid.y.FF0 [JOINT_1]FF0
setp pid.y.FF1 [JOINT_1]FF1
setp pid.y.FF2 [JOINT_1]FF2
setp pid.y.deadband [JOINT_1]DEADBAND
setp pid.y.maxoutput [JOINT_1]MAX_OUTPUT
setp pid.y.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.y.maxerror 0.000500
net y-index-enable => pid.y.index-enable
net y-enable => pid.y.enable
net y-pos-cmd => pid.y.command
net y-pos-fb => pid.y.feedback
net y-output <= pid.y.output
# Step Gen signals/setup
setp [HMOT](CARD0).stepgen.00.dirsetup [JOINT_1]DIRSETUP
setp [HMOT](CARD0).stepgen.00.dirhold [JOINT_1]DIRHOLD
setp [HMOT](CARD0).stepgen.00.steplen [JOINT_1]STEPLEN
setp [HMOT](CARD0).stepgen.00.stepspace [JOINT_1]STEPSPACE
setp [HMOT](CARD0).stepgen.00.position-scale [JOINT_1]STEP_SCALE
setp [HMOT](CARD0).stepgen.00.step_type 0
setp [HMOT](CARD0).stepgen.00.control-type 1
setp [HMOT](CARD0).stepgen.00.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.00.maxvel [JOINT_1]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net y-pos-cmd <= joint.1.motor-pos-cmd
net y-vel-cmd <= joint.1.vel-cmd
net y-output => [HMOT](CARD0).stepgen.00.velocity-cmd
net y-pos-fb <= [HMOT](CARD0).stepgen.00.position-fb
net y-pos-fb => joint.1.motor-pos-fb
net y-enable <= joint.1.amp-enable-out
net y-enable => [HMOT](CARD0).stepgen.00.enable
# ---setup home / limit switch signals---
net home-y => joint.1.home-sw-in
net y-neg-limit => joint.1.neg-lim-sw-in
net y-pos-limit => joint.1.pos-lim-sw-in
#*******************
# AXIS Z JOINT 2
#*******************
setp pid.z.Pgain [JOINT_2]P
setp pid.z.Igain [JOINT_2]I
setp pid.z.Dgain [JOINT_2]D
setp pid.z.bias [JOINT_2]BIAS
setp pid.z.FF0 [JOINT_2]FF0
setp pid.z.FF1 [JOINT_2]FF1
setp pid.z.FF2 [JOINT_2]FF2
setp pid.z.deadband [JOINT_2]DEADBAND
setp pid.z.maxoutput [JOINT_2]MAX_OUTPUT
setp pid.z.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.z.maxerror 0.000500
net z-index-enable => pid.z.index-enable
net z-enable => pid.z.enable
net z-pos-cmd => pid.z.command
net z-pos-fb => pid.z.feedback
net z-output <= pid.z.output
# Step Gen signals/setup
setp [HMOT](CARD0).stepgen.03.dirsetup [JOINT_2]DIRSETUP
setp [HMOT](CARD0).stepgen.03.dirhold [JOINT_2]DIRHOLD
setp [HMOT](CARD0).stepgen.03.steplen [JOINT_2]STEPLEN
setp [HMOT](CARD0).stepgen.03.stepspace [JOINT_2]STEPSPACE
setp [HMOT](CARD0).stepgen.03.position-scale [JOINT_2]STEP_SCALE
setp [HMOT](CARD0).stepgen.03.step_type 0
setp [HMOT](CARD0).stepgen.03.control-type 1
setp [HMOT](CARD0).stepgen.03.maxaccel [JOINT_2]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.03.maxvel [JOINT_2]STEPGEN_MAXVEL
# ---closedloop stepper signals---
net z-pos-cmd <= joint.2.motor-pos-cmd
net z-vel-cmd <= joint.2.vel-cmd
net z-output => [HMOT](CARD0).stepgen.03.velocity-cmd
net z-pos-fb <= [HMOT](CARD0).stepgen.03.position-fb
net z-pos-fb => joint.2.motor-pos-fb
net z-enable <= joint.2.amp-enable-out
net z-enable => [HMOT](CARD0).stepgen.03.enable
# ---setup home / limit switch signals---
net home-z => joint.2.home-sw-in
net z-neg-limit => joint.2.neg-lim-sw-in
net z-pos-limit => joint.2.pos-lim-sw-in
#*******************
# SPINDLE
#*******************
setp pid.s.Pgain [SPINDLE_0]P
setp pid.s.Igain [SPINDLE_0]I
setp pid.s.Dgain [SPINDLE_0]D
setp pid.s.bias [SPINDLE_0]BIAS
setp pid.s.FF0 [SPINDLE_0]FF0
setp pid.s.FF1 [SPINDLE_0]FF1
setp pid.s.FF2 [SPINDLE_0]FF2
setp pid.s.deadband [SPINDLE_0]DEADBAND
setp pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp pid.s.error-previous-target true
# This setting is to limit bogus stepgen
# velocity corrections caused by position
# feedback sample time jitter.
setp pid.s.maxerror 0.000500
net spindle-index-enable => pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm => pid.s.command
net spindle-vel-fb-rpm => pid.s.feedback
net spindle-output <= pid.s.output
# Step Gen signals/setup
setp [HMOT](CARD0).stepgen.04.dirsetup [SPINDLE_0]DIRSETUP
setp [HMOT](CARD0).stepgen.04.dirhold [SPINDLE_0]DIRHOLD
setp [HMOT](CARD0).stepgen.04.steplen [SPINDLE_0]STEPLEN
setp [HMOT](CARD0).stepgen.04.stepspace [SPINDLE_0]STEPSPACE
setp [HMOT](CARD0).stepgen.04.position-scale [SPINDLE_0]STEP_SCALE
setp [HMOT](CARD0).stepgen.04.step_type 0
setp [HMOT](CARD0).stepgen.04.control-type 1
setp [HMOT](CARD0).stepgen.04.maxaccel [SPINDLE_0]STEPGEN_MAXACCEL
setp [HMOT](CARD0).stepgen.04.maxvel [SPINDLE_0]STEPGEN_MAXVEL
net machine-is-on => [HMOT](CARD0).stepgen.04.enable
net spindle-vel-cmd-rps => [HMOT](CARD0).stepgen.04.velocity-cmd
net spindle-vel-fb-rps <= [HMOT](CARD0).stepgen.04.velocity-fb
# ---setup spindle control signals---
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
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
# ---Setup spindle at speed signals---
sets spindle-at-speed true
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net axis-select-x halui.axis.x.select
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-x-analog halui.axis.x.analog
net x-is-homed halui.joint.0.is-homed
net axis-select-y halui.axis.y.select
net jog-y-pos halui.axis.y.plus
net jog-y-neg halui.axis.y.minus
net jog-y-analog halui.axis.y.analog
net y-is-homed halui.joint.1.is-homed
net axis-select-z halui.axis.z.select
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-z-analog halui.axis.z.analog
net z-is-homed halui.joint.2.is-homed
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net spindle-manual-cw halui.spindle.0.forward
net spindle-manual-ccw halui.spindle.0.reverse
net spindle-manual-stop halui.spindle.0.stop
net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
# ---coolant signals---
net coolant-mist <= iocontrol.0.coolant-mist
net coolant-flood <= iocontrol.0.coolant-flood
# ---probe signal---
net probe-in => motion.probe-input
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
# ---digital in / out signals---
# ---estop signals---
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in
# ---toolchange signals for custom tool changer---
net tool-number <= iocontrol.0.tool-prep-number
net tool-change-request <= iocontrol.0.tool-change
net tool-change-confirmed => iocontrol.0.tool-changed
net tool-prepare-request <= iocontrol.0.tool-prepare
net tool-prepare-confirmed => iocontrol.0.tool-prepared
heres the hal file.
07 Jun 2024 10:48 - 07 Jun 2024 13:08
Replied by cornholio on topic 7i92 configuration with two daughter card
7i92 configuration with two daughter card
Category: Basic Configuration
You will need new firmware for your 7i92. I'm not to sure whether the 7i92 can support 9 stepgens, 2 Spindle encoders with index and 2 smart serial ports. I might be wrong about this, but I think I've heard Pete mention that there is some limitations with the 7i92. This bit struck out in red is incorrect see Pete's post below for correction.
Something that configures the 7i92 that has a 7i76 on one port and a config that matches the 7i78. (possible a Bob type config)
The 7i78 is just a card that conditions the electrical signals from the 7i92, it has no "smarts" it is passive. The FPGA on the port it is connected to provides all the signals.
The 7i76 has 1 encoder with index that is suitable for a spindle and 2 encoders that are suitable for a low speed encoder, eg a MPG. These are enabled by setting the smart serial to mode 2.
It can be a little confusing.
The 7i76 stepper connections and encoder with index & analog spindle controller are controlled directly by the FPGA on the 7i92. The other functions 48 bits of I\O, low speed MPG inputs and analog in are controlled via a MCU on the 7i76 that connects via a smart serial interface that is routed on the PCB. It also has a second smart serial port that is exposed via the connectors.
The 7i78 stepper connections and encoder with index & analog spindle controller are controlled directly by the FPGA on the 7i92. Similar to the 7i76.
And of course the 7i84 is connected via the smart serial interface and has a MCU on the board that controls the I\O.
It took me a while to figure this out and it really kicked in when I started playing with the FPGA firmwares.
Something that configures the 7i92 that has a 7i76 on one port and a config that matches the 7i78. (possible a Bob type config)
The 7i78 is just a card that conditions the electrical signals from the 7i92, it has no "smarts" it is passive. The FPGA on the port it is connected to provides all the signals.
The 7i76 has 1 encoder with index that is suitable for a spindle and 2 encoders that are suitable for a low speed encoder, eg a MPG. These are enabled by setting the smart serial to mode 2.
It can be a little confusing.
The 7i76 stepper connections and encoder with index & analog spindle controller are controlled directly by the FPGA on the 7i92. The other functions 48 bits of I\O, low speed MPG inputs and analog in are controlled via a MCU on the 7i76 that connects via a smart serial interface that is routed on the PCB. It also has a second smart serial port that is exposed via the connectors.
The 7i78 stepper connections and encoder with index & analog spindle controller are controlled directly by the FPGA on the 7i92. Similar to the 7i76.
And of course the 7i84 is connected via the smart serial interface and has a MCU on the board that controls the I\O.
It took me a while to figure this out and it really kicked in when I started playing with the FPGA firmwares.
07 Jun 2024 07:59
Help me setting up My LinuxCNC was created by amanker
Help me setting up My LinuxCNC
Category: Basic Configuration
I am using MKS Octopus Pro Board STM32F429 with Remora SPI and Raspberry PI4.
I wanted to use RPI5 but SPI is not working in LinuxCNC for rpi5. I am also using MPG Pendant (commonly available on eBay with MPG encoder with axis and scale selector and eStop.)
I am able to move steppers but I want to properly setup LinuxCNC with Kinamatics.
Whats Working.
1. Steppers moves
2. Limit/Home switches
3. PWM spindle
4. eStop
5. Touch Probe
I have made my machine to have two configurations. XYZAB(A Rotary on Table & B Rotating Spindle) and XYZAC (Its a common trinunion table)
My Problems.
1. I want to enable or disable my machine with Pendant (eStop Switch) not with GUI.
2. Stepper moves but on higher feed its slows down in middle of movement. Up 1000mm/sec its working. 1000-2200 not moving as expected slows down in middle. above 2200 joint follow error.
3. I want to implement both Kinamatics. XYZAC is available on linuxcnc forum but My type XYZAB config is not available(I googled a lot)
Here are my configuration files
ini file
Hal FIle
mpg.hal
qt_dragon_hd_postgui hal
I wanted to use RPI5 but SPI is not working in LinuxCNC for rpi5. I am also using MPG Pendant (commonly available on eBay with MPG encoder with axis and scale selector and eStop.)
I am able to move steppers but I want to properly setup LinuxCNC with Kinamatics.
Whats Working.
1. Steppers moves
2. Limit/Home switches
3. PWM spindle
4. eStop
5. Touch Probe
I have made my machine to have two configurations. XYZAB(A Rotary on Table & B Rotating Spindle) and XYZAC (Its a common trinunion table)
My Problems.
1. I want to enable or disable my machine with Pendant (eStop Switch) not with GUI.
2. Stepper moves but on higher feed its slows down in middle of movement. Up 1000mm/sec its working. 1000-2200 not moving as expected slows down in middle. above 2200 joint follow error.
3. I want to implement both Kinamatics. XYZAC is available on linuxcnc forum but My type XYZAB config is not available(I googled a lot)
Here are my configuration files
ini file
# Basic LinuxCNC config for testing of Remora firmware
[EMC]
MACHINE = Remora-XY
DEBUG = 5
VERSION = 1.1
[DISPLAY]
DISPLAY = qtvcp qtdragon_hd
#USER_COMMAND_FILE = usercommand_regularmac_800.py
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm
MAX_FEED_OVERRIDE = 1.2
MIN_SPINDLE_0_OVERRIDE = 0.5
MAX_SPINDLE_0_OVERRIDE = 1.5
DEFAULT_SPINDLE_0_SPEED = 1200
SPINDLE_INCREMENT = 200
MIN_SPINDLE_0_SPEED = 200
MAX_SPINDLE_0_SPEED = 1200
MAX_SPINDLE_POWER = 500
DEFAULT_LINEAR_VELOCITY = 15.00
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 40.00
DEFAULT_ANGULAR_VELOCITY = 25.00
MIN_ANGULAR_VELOCITY = 0
MAX_ANGULAR_VELOCITY = 50.00
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = ~/linuxcnc/nc_files
INCREMENTS = Continuous, 50mm, 10mm, 5mm, 1mm, .5mm, .1mm, .05mm, .01mm
#ANGULAR_INCREMENTS = 1,5,10,30,45,90
NGCGUI_SUBFILE_PATH = ~/linuxcnc/nc_files/examples/ngcgui_lib
# pre selected programs tabs
# specify filenames only, files must be in the NGCGUI_SUBFILE_PATH
NGCGUI_SUBFILE = slot.ngc
NGCGUI_SUBFILE = qpocket.ngc
#EMBED_TAB_NAME = Vismach 5 Axis
#EMBED_TAB_COMMAND = qtvcp vismach_5axis_gantry
#EMBED_TAB_LOCATION = tabWidget_utilities
[KINS]
JOINTS = 5
#KINEMATICS =trivkins coordinates=XYZ kinstype=BOTH
KINEMATICS =trivkins coordinates=XYZAC
[FILTER]
PROGRAM_EXTENSION = .py Python Script
py = python
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
SUBROUTINE_PATH = :~/linuxcnc/nc_files/examples/ngcgui_lib:~/linuxcnc/nc_files/examples/ngcgui_lib/utilitysubs; \
~/linuxcnc/nc_files/examples/probe/basic_probe/macros:~/linuxcnc/nc_files/examples/remap-subroutines: \
~/linuxcnc/nc_files/examples/ngcgui_lib/remap_lib
ON_ABORT_COMMAND=O <on_abort> call
RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G64P0.0005 G80 G90 G94 G97 M5 M9
[MDI_COMMAND_LIST]
# for macro buttons
MDI_COMMAND = G0 Z25;X0 Y0;Z0, Goto\nUser\nZero
MDI_COMMAND = G53 G0 Z0;G53 G0 X0 Y0,Goto\nMachn\nZero
[PROBE]
#USE_PROBE = versaprobe
USE_PROBE = basicprobe
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 0
SERVO_PERIOD = 1000000
[HAL]
HALFILE = remora-xyz.hal
HALFILE = mpg.hal
POSTGUI_HALFILE = qtdragon_hd_postgui.hal
#POSTGUI_HALFILE = postgui_call_list.hal
HALUI = halui
[HALUI]
[TRAJ]
COORDINATES = X Y Z A C
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_LINEAR_VELOCITY = 15.00
MAX_LINEAR_VELOCITY = 40.00
NO_FORCE_HOMING = 1
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
TOOL_TABLE = tool.tbl
[AXIS_X]
MAX_VELOCITY = 40.00
MAX_ACCELERATION = 500.0
MIN_LIMIT = 0.0
MAX_LIMIT = 300.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = 0.0
MAX_LIMIT = 300.0
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 500.0
STEPGEN_MAXACCEL = 500.0
SCALE = 1600
FERROR = 2
MIN_FERROR = 2.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0
[AXIS_Y]
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 20.0
MIN_LIMIT = 0.0
MAX_LIMIT = 200.0
[JOINT_1]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = 0.0
MAX_LIMIT = 200.0
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 2000.0
SCALE = 1600.00
FERROR = 9.0
MIN_FERROR = 5.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0
[AXIS_Z]
OFFSET_AV_RATIO = 0.2
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 20.0
MIN_LIMIT = 0
MAX_LIMIT = 200
[JOINT_2]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = 0
MAX_LIMIT = 200
MAX_VELOCITY = 40.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 300.0
SCALE = 1200.00
FERROR = 5
MIN_FERROR = 1.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0
[AXIS_A]
OFFSET_AV_RATIO = 0.2
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 20.0
MIN_LIMIT = 0
MAX_LIMIT = 360
[JOINT_3]
TYPE = ANGULAR
HOME = 0.0
MIN_LIMIT = 0
MAX_LIMIT = 360
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 300.0
SCALE = 71.111
FERROR = 5
MIN_FERROR = 1.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0
[AXIS_C]
OFFSET_AV_RATIO = 0.2
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 20.0
MIN_LIMIT = 0
MAX_LIMIT = 180
[JOINT_4]
TYPE = ANGULAR
HOME = 0.0
MIN_LIMIT = 0
MAX_LIMIT = 180
MAX_VELOCITY = 50.0
MAX_ACCELERATION = 20.0
STEPGEN_MAXACCEL = 300.0
SCALE = 71.111
FERROR = 5
MIN_FERROR = 1.0
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0
HOME_LATCH_VEL = 0
HOME_SEQUENCE = 0
Hal FIle
# load the realtime components
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
#loadrt remora
loadrt remora chip_type=STM SPI_clk_div=32 PRU_base_freq=120000
#loadrt remora chip_type=LPC SPI_clk_div=64
# estop loopback, SPI comms enable and feedback
net user-enable-out <= iocontrol.0.user-enable-out => remora.SPI-enable
net user-request-enable <= iocontrol.0.user-request-enable => remora.SPI-reset
net remora-status remora.SPI-status => iocontrol.0.emc-enable-in
# add the remora and motion functions to threads
addf remora.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf remora.update-freq servo-thread
addf remora.write servo-thread
# Joint 0 setup
setp remora.joint.0.scale [JOINT_0]SCALE
setp remora.joint.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd <= joint.0.motor-pos-cmd => remora.joint.0.pos-cmd
net j0pos-fb <= remora.joint.0.pos-fb => joint.0.motor-pos-fb
net j0enable <= joint.0.amp-enable-out => remora.joint.0.enable
# Joint 1 setup
setp remora.joint.1.scale [JOINT_1]SCALE
setp remora.joint.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net j1pos-cmd <= joint.1.motor-pos-cmd => remora.joint.1.pos-cmd
net j1pos-fb <= remora.joint.1.pos-fb => joint.1.motor-pos-fb
net j1enable <= joint.1.amp-enable-out => remora.joint.1.enable
# Joint 2 setup
setp remora.joint.2.scale [JOINT_2]SCALE
setp remora.joint.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net j2pos-cmd <= joint.2.motor-pos-cmd => remora.joint.2.pos-cmd
net j2pos-fb <= remora.joint.2.pos-fb => joint.2.motor-pos-fb
net j2enable <= joint.2.amp-enable-out => remora.joint.2.enable
# Joint 3 setup
setp remora.joint.3.scale [JOINT_3]SCALE
setp remora.joint.3.maxaccel [JOINT_3]STEPGEN_MAXACCEL
net j3pos-cmd <= joint.3.motor-pos-cmd => remora.joint.3.pos-cmd
net j3pos-fb <= remora.joint.3.pos-fb => joint.3.motor-pos-fb
net j3enable <= joint.3.amp-enable-out => remora.joint.3.enable
# Joint 4 setup
setp remora.joint.4.scale [JOINT_4]SCALE
setp remora.joint.4.maxaccel [JOINT_4]STEPGEN_MAXACCEL
net j4pos-cmd <= joint.4.motor-pos-cmd => remora.joint.4.pos-cmd
net j4pos-fb <= remora.joint.4.pos-fb => joint.4.motor-pos-fb
net j4enable <= joint.4.amp-enable-out => remora.joint.4.enable
# end-stops
net X-min remora.input.0 => joint.0.neg-lim-sw-in
# net X-max remora.input.1 => joint.0.home-sw-in joint.0.pos-lim-sw-in
net Y-min remora.input.2 => joint.1.neg-lim-sw-in
# net Y-max remora.input.3 => joint.1.home-sw-in joint.1.pos-lim-sw-in
net Z-min remora.input.4 => joint.2.neg-lim-sw-in
# net Z-max remora.input.5 => joint.2.home-sw-in joint.2.pos-lim-sw-in
# Probe
net probe-input motion.probe-input <= remora.input.6
# net probe-input => qtdragon.led-probe
# Spindle
loadrt pwmgen output_type=0
addf pwmgen.update servo-thread
addf pwmgen.make-pulses servo-thread
net spindle-speed-cmd spindle.0.speed-out => pwmgen.0.value
net spindle-on spindle.0.on => pwmgen.0.enable
net spindle-pwm pwmgen.0.pwm => remora.output.0
# Set the spindle's top speed in RPM
setp pwmgen.0.scale 12000
# net spindle-speed-feedback spindle.0.speed-out-rps => spindle.0.speed-in
mpg.hal
# Jog Pendant
loadrt PRUencoder names=encoder.0
addf PRUencoder.capture-position servo-thread
setp encoder.0.position-scale 400.0
# connect the hal encoder to linuxcnc
net encoder-count <= remora.PV.0 => encoder.0.raw_count
loadrt conv_float_s32 count=1
addf conv-float-s32.0 servo-thread
loadrt mux4 count=1
addf mux4.0 servo-thread
# If your MPG outputs a quadrature signal per click set x4 to 1
# If your MPG puts out 1 pulse per click set x4 to 0
#setp encoder.0.x4-mode 0
# For velocity mode, set to 1
# In velocity mode the axis stops when the dial is stopped
# even if that means the commanded motion is not completed,
# For position mode (the default), set to 0
# In position mode the axis will move exactly jog-scale
# units for each count, regardless of how long that might take,
setp joint.0.jog-vel-mode 1
setp joint.1.jog-vel-mode 1
setp joint.2.jog-vel-mode 1
setp joint.3.jog-vel-mode 1
setp joint.4.jog-vel-mode 1
# This sets the scale that will be used based on the input to the mux4
setp mux4.0.in0 0.1
setp mux4.0.in1 0.01
setp mux4.0.in2 0.001
# The inputs to the mux4 component
net scale1 mux4.0.sel0 <= remora.input.10
net scale2 mux4.0.sel1 <= remora.input.9
# The output from the mux4 is sent to each axis jog scale
net mpg-scale <= mux4.0.out
net mpg-scale => joint.0.jog-scale axis.x.jog-scale
net mpg-scale => joint.1.jog-scale axis.y.jog-scale
net mpg-scale => joint.2.jog-scale axis.z.jog-scale
net mpg-scale => joint.3.jog-scale axis.a.jog-scale
net mpg-scale => joint.4.jog-scale axis.c.jog-scale
# The MPG inputs
#net mpg-a encoder.0.phase-A <= remora.input.7
#net mpg-b encoder.0.phase-B <= remora.input.8
# The Axis select inputs
net mpg-x joint.0.jog-enable axis.x.jog-enable <= remora.input.11
net mpg-y joint.1.jog-enable axis.y.jog-enable <= remora.input.12
net mpg-z joint.2.jog-enable axis.z.jog-enable <= remora.input.13
net mpg-a joint.3.jog-enable axis.a.jog-enable <= remora.input.14
net mpg-c joint.4.jog-enable axis.c.jog-enable <= remora.input.15
# The encoder output counts to the axis. Only the selected axis will move.
net encoder-count conv-float-s32.0.in
net encoder-counts conv-float-s32.0.out
#net encoder-counts <= encoder.0.counts
net encoder-counts => joint.0.jog-counts axis.x.jog-counts
net encoder-counts => joint.1.jog-counts axis.y.jog-counts
net encoder-counts => joint.2.jog-counts axis.z.jog-counts
net encoder-counts => joint.3.jog-counts axis.a.jog-counts
net encoder-counts => joint.4.jog-counts axis.c.jog-counts
qt_dragon_hd_postgui hal
# load components
########################################################################
loadrt logic names=logic-and personality=0x102
addf logic-and servo-thread
# load a summing component for adding spindle lift and Z compensation
loadrt scaled_s32_sums
addf scaled-s32-sums.0 servo-thread
loadusr -Wn z_level_compensation z_level_compensation
# method parameter must be one of nearest(2), linear(1), cubic (0)
setp z_level_compensation.fade-height 0.0
setp z_level_compensation.method 1
# connect signals
########################################################################
net spindle-speed-limited => spindle.0.speed-out-rps => spindle.0.speed-in
# the unlink pin commands are only used, because they are connected
# in core_sim.hal and we use this file to simulate
unlinkp iocontrol.0.tool-change
unlinkp iocontrol.0.tool-changed
unlinkp iocontrol.0.tool-prep-number
net tool-change hal_manualtoolchange.change <= iocontrol.0.tool-change
net tool-changed hal_manualtoolchange.changed <= iocontrol.0.tool-changed
net tool-prep-number hal_manualtoolchange.number <= iocontrol.0.tool-prep-number
net eoffset-clear axis.z.eoffset-clear
net eoffset-counts axis.z.eoffset-counts
setp axis.z.eoffset-scale .001
net eoffset-total axis.z.eoffset
net eoffset-total qtdragon.eoffset-value
setp axis.z.eoffset-enable True
## external offsets for spindle pause function
##################################################
net eoffset-clear qtdragon.eoffset-clear
net eoffset-spindle-count <= qtdragon.eoffset-spindle-count
net spindle-pause qtdragon.spindle-inhibit spindle.0.inhibit
net probe-input qtdragon.led-probe
## Z level compensation
####################################################
net eoffset-clr2 z_level_compensation.clear => logic-and.in-01
net xpos-cmd z_level_compensation.x-pos <= joint.0.motor-pos-cmd
net ypos-cmd z_level_compensation.y-pos <= joint.1.pos-cmd
net zpos-cmd z_level_compensation.z-pos <= joint.2.pos-cmd
net z_compensation_on z_level_compensation.enable-in <= qtdragon.comp-on
net eoffset-zlevel-count z_level_compensation.counts => qtdragon.eoffset-zlevel-count
net eoffset-spindle-count scaled-s32-sums.0.in0
net eoffset-zlevel-count scaled-s32-sums.0.in1
setp scaled-s32-sums.0.scale0 1000
net eoffset-counts scaled-s32-sums.0.out-s
Time to create page: 1.144 seconds