5 Axis ParPort Stepper Setup with RTCP

More
10 Sep 2015 16:43 #62375 by marq_torque
Hello All members.


This is my first thread in this legendary forum, i am following threads since long. now i have started building one machine and need help as follow.

Machine is having 4 Axis out of which two are linear Axis, two are rotary axis.

1) X = Gantry
2) Z = Vertical Axis
3) B/A = Rotary swivel head
4) C = Rotary table.

now i coming on point. i am not pro EMC CNC user. i have run configuration with three axis and four axis. that is satisfactory. but at this special machine i am stuck at configuring Stepper motor outputs with ParPort and given 5Axis INI and HAL file. because its configured with Mesa electronics. and i want to use with Par port and stepper with different type of Joint as sample 5 axis setup give C axis in Z axis. while i need C axis on fixed Rotary table there is Y axis. x Axis will always run in center of Rotary table.


Looking fro some hints clues.


thanks all member for keeping this community so strong.
Attachments:

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

More
10 Sep 2015 19:25 #62383 by andypugh
The first question would be about how you want to control the machine. If you want RTCP then you will need to use a special kinematics module.

if you can write a kinematics module then hand-coding a parallel-port HAL file should be trivial.

To get started, create a 6-axis machine and ignore the Y. That should get you close.
The following user(s) said Thank You: marq_torque

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

More
10 Sep 2015 19:38 #62385 by marq_torque
Thanks andypugh for quick reply,


i am noob for writing new configuration, though i did modification for sample 4Axis mill and did my machine working but didnt teased kinematics yet. yes i tried sample 5 axis configuration but its configured to run with mesa cards, i dont know how to replace mesa configuration with PP and modify that machine kinematics as i need only A/U, B/V axis i think. may b A/W, B/W i am totally new.... i tried to look into ini and hal file didnt get idea where to start...

and yes can you guide me how to start from 6 axis ??

Regards,
Ankit Mistry

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

More
10 Sep 2015 19:46 #62387 by andypugh
I just checked, and stepconf can't make a 6-axis config. So:
www.linuxcnc.org/docs/html/config/stepconf.html

Create a 5-axis config, then edit the INI and HAL files to add the extra axes, using the structure created by Stepconf for guidance.
The following user(s) said Thank You: marq_torque

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

More
10 Sep 2015 19:47 #62389 by marq_torque
and yes about RTCP, Z and X will compensate tool length offset and will follow part geometry by shifting programing positions. and C has to do nothing with compensation in C there will be start degree and end degree thats it sort of Y axis with donut shape, in short sweep angle of B/A axis will be definite, regardless of tool offset.

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

More
10 Sep 2015 20:08 - 10 Sep 2015 20:19 #62390 by marq_torque
i manually tried adding 5th axis in Hal and ini, but it ended with error, may be interface. let me post error message

Debug file information:
HAL: ERROR: duplicate component name 'inihal'
ini_hal_init: ERROR: hal_init() failed
HAL: ERROR: duplicate component name 'inihal'
ini_hal_init: ERROR: hal_init() failed
HAL: ERROR: duplicate component name 'inihal'
ini_hal_init: ERROR: hal_init() failed
HAL: ERROR: duplicate component name 'inihal'
ini_hal_init: ERROR: hal_init() failed
HAL: ERROR: duplicate component name 'inihal'
ini_hal_init: ERROR: hal_init() failed
A configuration error is preventing LinuxCNC from starting.
More information may be available when running from a terminal.
6666
PID TTY STAT TIME COMMAND
6729
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components







I replaced Y With Z, Z with B axis, A axis with C axis
Last edit: 10 Sep 2015 20:19 by marq_torque.

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

More
10 Sep 2015 20:23 #62391 by andypugh
Don't delete any entries from the INI file, create duplicates for the extra axes/joints. You need a full set of 6 axes in the INI.

In the HAL connect motors 0, 2, 3, 4, 5 to the required parallel port stepper pins.

Set [TRAJ]AXES to 6, set [TRAJ]COORDINATES to XZABC

www.linuxcnc.org/docs/html/config/ini-config.html
The following user(s) said Thank You: marq_torque

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

More
10 Sep 2015 20:34 #62393 by marq_torque
i have pasted my hal file can you confirm if any mistakes ? i did added b and c axis


# Generated by stepconf 1.1 at Thu Sep 10 13:58:36 2015
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x378 out 1 out"
setp parport.0.reset-time 3500
loadrt stepgen step_type=0,0,0,0
loadrt abs count=1
loadrt pwmgen output_type=1

addf parport.0.read base-thread
addf parport.1.read base-thread
addf stepgen.make-pulses base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf parport.1.write base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
addf pwmgen.update servo-thread
addf abs.0 servo-thread

net spindle-cmd <= motion.spindle-speed-out => pwmgen.0.value
net spindle-on <= motion.spindle-on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm
setp pwmgen.0.pwm-freq 100.0
setp pwmgen.0.scale 1166.66666667
setp pwmgen.0.offset 0.114285714286
setp pwmgen.0.dither-pwm true
net spindle-at-speed => motion.spindle-at-speed
net spindle-cw <= motion.spindle-forward

net xstep => parport.0.pin-01-out
setp parport.0.pin-01-out-reset 1
net xdir => parport.0.pin-02-out
net zstep => parport.0.pin-03-out
setp parport.0.pin-03-out-reset 1
net zdir => parport.0.pin-04-out
net bstep => parport.0.pin-05-out
setp parport.0.pin-05-out-reset 1
net bdir => parport.0.pin-06-out
net cstep => parport.0.pin-07-out
setp parport.0.pin-07-out-reset 1
net cdir => parport.0.pin-08-out
net spindle-cw => parport.0.pin-09-out
net spindle-pwm => parport.0.pin-14-out


net estop-ext <= parport.0.pin-10-in
net all-home <= parport.0.pin-11-in



setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 15200
setp stepgen.0.dirsetup 15200
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable
net all-home => axis.0.home-sw-in

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 15200
setp stepgen.1.dirsetup 15200
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable
net all-home => axis.1.home-sw-in

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 15200
setp stepgen.2.dirsetup 15200
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable
net all-home => axis.2.home-sw-in

setp stepgen.3.position-scale [AXIS_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 0
setp stepgen.3.dirhold 15200
setp stepgen.3.dirsetup 15200
setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL
net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd
net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb
net astep <= stepgen.3.step
net adir <= stepgen.3.dir
net aenable axis.3.amp-enable-out => stepgen.3.enable
net all-home => axis.3.home-sw-in

setp stepgen.4.position-scale [AXIS_4]SCALE
setp stepgen.4.steplen 1
setp stepgen.4.stepspace 0
setp stepgen.4.dirhold 15200
setp stepgen.4.dirsetup 15200
setp stepgen.4.maxaccel [AXIS_4]STEPGEN_MAXACCEL
net bpos-cmd axis.4.motor-pos-cmd => stepgen.4.position-cmd
net bpos-fb stepgen.e.position-fb => axis.4.motor-pos-fb
net bstep <= stepgen.e.step
net bdir <= stepgen.e.dir
net benable axis.e.amp-enable-out => stepgen.4.enable
net all-home => axis.e.home-sw-in

setp stepgen.5.position-scale [AXIS_5]SCALE
setp stepgen.5.steplen 1
setp stepgen.5.stepspace 0
setp stepgen.5.dirhold 15200
setp stepgen.5.dirsetup 15200
setp stepgen.5.maxaccel [AXIS_5]STEPGEN_MAXACCEL
net cpos-cmd axis.5.motor-pos-cmd => stepgen.5.position-cmd
net cpos-fb stepgen.e.position-fb => axis.5.motor-pos-fb
net cstep <= stepgen.e.step
net cdir <= stepgen.e.dir
net cenable axis.e.amp-enable-out => stepgen.5.enable
net all-home => axis.e.home-sw-in

net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

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

More
10 Sep 2015 20:59 #62395 by andypugh
You haven't allocated parport pins to astep and adir.

Otherwise, that part looks OK. If it isn't loading then I would suspect the INI file is where the problem lies.
The following user(s) said Thank You: marq_torque

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

More
10 Sep 2015 21:05 #62396 by marq_torque
I dont want to configure A axis, i want to configure B axis, so is it necessary to put A information ?

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

Time to create page: 0.647 seconds
Powered by Kunena Forum