PathPilot Lathe with 6 place turret
01 Apr 2017 15:48 #90712
by PCW
Replied by PCW on topic PathPilot Lathe with 6 place turret
No, you can make 2 FPGA step/dir pins for stepgen 3 usable as GPIO by setting num_stepgens to 3
(thus enabling stepgens 0,1,2 and leaving the FPGA pins for stepgen3 as GPIO), but the stepgen pins on
the 7I76 are output only.
If you need a few 5V inputs, the easiest thing is probably to use the 5I25s P2 connector either
directly (if you are brave) or with a cheap parallel port breakout to protect the FPGA card if you
make a wiring mistake.
(thus enabling stepgens 0,1,2 and leaving the FPGA pins for stepgen3 as GPIO), but the stepgen pins on
the 7I76 are output only.
If you need a few 5V inputs, the easiest thing is probably to use the 5I25s P2 connector either
directly (if you are brave) or with a cheap parallel port breakout to protect the FPGA card if you
make a wiring mistake.
The following user(s) said Thank You: brianTruck
Please Log in or Create an account to join the conversation.
- brianTruck
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 104
- Thank you received: 7
01 Apr 2017 16:47 #90715
by brianTruck
Replied by brianTruck on topic PathPilot Lathe with 6 place turret
The area of linuxcnc that has always confused me is the pin connections. Take this code here,
..
# GUI sets tool changer type in lathe tool changer comp
net gui-tool-changer-type tormachltc.0.tool-changer-type => tormach.tool-changer-type
It looks to me that the like the data from gui-tool-changer-type and tormachltc.0.toolchanger-type are being sent to a comp called tormach.tool-changer-type (That doesn't exists). But the comment says the opposite.
Can anyone clarify whats really happening here ?
Thanks'
Brian
..
# GUI sets tool changer type in lathe tool changer comp
net gui-tool-changer-type tormachltc.0.tool-changer-type => tormach.tool-changer-type
It looks to me that the like the data from gui-tool-changer-type and tormachltc.0.toolchanger-type are being sent to a comp called tormach.tool-changer-type (That doesn't exists). But the comment says the opposite.
Can anyone clarify whats really happening here ?
Thanks'
Brian
Please Log in or Create an account to join the conversation.
01 Apr 2017 17:41 #90720
by PCW
Replied by PCW on topic PathPilot Lathe with 6 place turret
net gui-tool-changer-type tormachltc.0.tool-changer-type => tormach.tool-changer-type
Means output hal pin tormachltc.0.tool-changer-type drives the input hal pin tormach.tool-changer-type
via the signal gui-tool-changer-type
The hal pins come from components, the signal "gui-tool-changer-type" is created by the net command
and could be anything as long as its connected the same. that is:
net blue-wire-with-white-stripe tormachltc.0.tool-changer-type => tormach.tool-changer-type
is functionally identical to
net gui-tool-changer-type tormachltc.0.tool-changer-type => tormach.tool-changer-type
as long as the signal gui-tool-changer-type is not referenced anywhere else in the hal file
Means output hal pin tormachltc.0.tool-changer-type drives the input hal pin tormach.tool-changer-type
via the signal gui-tool-changer-type
The hal pins come from components, the signal "gui-tool-changer-type" is created by the net command
and could be anything as long as its connected the same. that is:
net blue-wire-with-white-stripe tormachltc.0.tool-changer-type => tormach.tool-changer-type
is functionally identical to
net gui-tool-changer-type tormachltc.0.tool-changer-type => tormach.tool-changer-type
as long as the signal gui-tool-changer-type is not referenced anywhere else in the hal file
The following user(s) said Thank You: brianTruck
Please Log in or Create an account to join the conversation.
- brianTruck
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 104
- Thank you received: 7
01 Apr 2017 18:47 #90722
by brianTruck
Replied by brianTruck on topic PathPilot Lathe with 6 place turret
Thanks'
That means they wrote the comment backwards.
# GUI sets tool changer type in lathe tool changer comp
because,
lathe tool changer comp = tormachltc
tormach.tool-changer-type = checkbox in GUI
Brian
That means they wrote the comment backwards.
# GUI sets tool changer type in lathe tool changer comp
because,
lathe tool changer comp = tormachltc
tormach.tool-changer-type = checkbox in GUI
Brian
Please Log in or Create an account to join the conversation.
- brianTruck
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 104
- Thank you received: 7
01 Apr 2017 22:05 #90738
by brianTruck
Replied by brianTruck on topic PathPilot Lathe with 6 place turret
I'm trying to implement Andy's turret code and I get a error.
# Tool Changer
# type of tool changer is set by the UI via tormachltc.0.tool-changer-type
# 0 - manual
# 1 - gang
# 3 - 8 position ATC
setp hm2_5i25.0.stepgen.01.control-type 1
loadrt mux4 names=mux.turret-speed
addf mux.turret-speed servo-thread
setp mux.turret-speed.in0 0
setp mux.turret-speed.in1 100
setp mux.turret-speed.in2 0
setp mux.turret-speed.in3 -20
net turret-on oracchanger.run mux.turret-speed sel0 # <<<<< this line
net turret-dir oracchanger.forward mux.turret-speed sel1
net turret-speed mux.turret-speed.out hm2_5i25.stepgen.01.velocity-cmd
# You might want to link this to tool-change request
# And possibly turn the stepper drive off when not actually changing tools
setp hm2_5i25.stepgen.01.enable 1
this is the error >>>>>Signal 'turret-on' of type 'bit' cannot add pin 'mux.turret-speed.out' of type 'float'
Thanks'
Brian
# Tool Changer
# type of tool changer is set by the UI via tormachltc.0.tool-changer-type
# 0 - manual
# 1 - gang
# 3 - 8 position ATC
setp hm2_5i25.0.stepgen.01.control-type 1
loadrt mux4 names=mux.turret-speed
addf mux.turret-speed servo-thread
setp mux.turret-speed.in0 0
setp mux.turret-speed.in1 100
setp mux.turret-speed.in2 0
setp mux.turret-speed.in3 -20
net turret-on oracchanger.run mux.turret-speed sel0 # <<<<< this line
net turret-dir oracchanger.forward mux.turret-speed sel1
net turret-speed mux.turret-speed.out hm2_5i25.stepgen.01.velocity-cmd
# You might want to link this to tool-change request
# And possibly turn the stepper drive off when not actually changing tools
setp hm2_5i25.stepgen.01.enable 1
this is the error >>>>>Signal 'turret-on' of type 'bit' cannot add pin 'mux.turret-speed.out' of type 'float'
Thanks'
Brian
Please Log in or Create an account to join the conversation.
02 Apr 2017 00:48 #90747
by rodw
Replied by rodw on topic PathPilot Lathe with 6 place turret
Brian, you have a type mismatch error. Hal won't let you take a bit (on/off) and send it to a float. There are some type conversion components.
linuxcnc.org/docs/html/hal/components.html#_type_conversion
If you really want to do this, tryIt looks like it will do the trick!
linuxcnc.org/docs/html/hal/components.html#_type_conversion
If you really want to do this, try
conv_s32_float
The following user(s) said Thank You: brianTruck
Please Log in or Create an account to join the conversation.
02 Apr 2017 00:49 #90749
by rodw
Replied by rodw on topic PathPilot Lathe with 6 place turret
Oops, looks like you need to do it in 2 steps with this first.
Sorry
conv_bit_s32
Sorry
The following user(s) said Thank You: brianTruck
Please Log in or Create an account to join the conversation.
- brianTruck
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 104
- Thank you received: 7
02 Apr 2017 12:53 #90760
by brianTruck
Replied by brianTruck on topic PathPilot Lathe with 6 place turret
hi rodw,
Thanks for the info, I started implementing the conversion when I realized that it is really looking for a bit if typed right.
net turret-on oracchanger.run mux.turret-speed.sel0
mux.turret-speed is looking for float
sel0 is looking a true or false and by adding "." it works
Thanks
Brian
Thanks for the info, I started implementing the conversion when I realized that it is really looking for a bit if typed right.
net turret-on oracchanger.run mux.turret-speed.sel0
mux.turret-speed is looking for float
sel0 is looking a true or false and by adding "." it works
Thanks
Brian
Please Log in or Create an account to join the conversation.
- brianTruck
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 104
- Thank you received: 7
02 Apr 2017 15:37 - 02 Apr 2017 15:38 #90773
by brianTruck
Replied by brianTruck on topic PathPilot Lathe with 6 place turret
Now I'm to the point of testing the turret. Here is the code I'm starting with.
# Tool Changer
# type of tool changer is set by the UI via tormachltc.0.tool-changer-type
# 0 - manual
# 1 - gang
# 3 - 8 position ATC
setp hm2_5i25.0.stepgen.01.control-type 1
loadrt mux4 names=mux.turret-speed
addf mux.turret-speed servo-thread
setp mux.turret-speed.in0 0
setp mux.turret-speed.in1 1000
setp mux.turret-speed.in2 0
setp mux.turret-speed.in3 -200
net turret-on oracchanger.run mux.turret-speed.sel0
net turret-dir oracchanger.forward mux.turret-speed.sel1
net turret-speed mux.turret-speed.out => hm2_5i25.0.stepgen.01.velocity-cmd
# And possibly turn the stepper drive off when not actually changing tools
setp hm2_5i25.0.stepgen.01.enable 1
loadrt timedelay2 count=1
addf timedelay2.0 servo-thread
# will wait 5 secs approx and turn motor off after reversing against stop
#setp timedelay2.0.on-delay 5
net tool-change iocontrol.0.tool-change => oracchanger.toolchange
net xhomed axis.0.homed => oracchanger.ishomedX
net zhomed axis.2.homed => oracchanger.ishomedZ
net tool-changed iocontrol.0.tool-changed <= oracchanger.toolchanged
net tool-number iocontrol.0.tool-prep-number => oracchanger.toolnumber
net tool-oldnumber iocontrol.0.tool-number => oracchanger.currenttoolnumber
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net sig1 oracchanger.opto1 <= hm2_5i25.0.7i76.0.0.input-05
net sig2 oracchanger.opto2 <= hm2_5i25.0.7i76.0.0.input-06
net sig3 oracchanger.opto3 <= hm2_5i25.0.7i76.0.0.input-07
net delaystart timedelay2.0.in <= oracchanger.delaystart
net delaydone timedelay2.0.out => oracchanger.delaydone
Here is a list of problems:
* doesn't home prior to tool change
* had to comment out delay, isn't recognized as valid function call (setp timedelay2.0.on-delay 5).
* you can hear the turret stepper pulsing, but it takes 3 minutes to ramp up to any moment.
Any suggestion would be greatly appreciated.
Thanks'
Brian
# Tool Changer
# type of tool changer is set by the UI via tormachltc.0.tool-changer-type
# 0 - manual
# 1 - gang
# 3 - 8 position ATC
setp hm2_5i25.0.stepgen.01.control-type 1
loadrt mux4 names=mux.turret-speed
addf mux.turret-speed servo-thread
setp mux.turret-speed.in0 0
setp mux.turret-speed.in1 1000
setp mux.turret-speed.in2 0
setp mux.turret-speed.in3 -200
net turret-on oracchanger.run mux.turret-speed.sel0
net turret-dir oracchanger.forward mux.turret-speed.sel1
net turret-speed mux.turret-speed.out => hm2_5i25.0.stepgen.01.velocity-cmd
# And possibly turn the stepper drive off when not actually changing tools
setp hm2_5i25.0.stepgen.01.enable 1
loadrt timedelay2 count=1
addf timedelay2.0 servo-thread
# will wait 5 secs approx and turn motor off after reversing against stop
#setp timedelay2.0.on-delay 5
net tool-change iocontrol.0.tool-change => oracchanger.toolchange
net xhomed axis.0.homed => oracchanger.ishomedX
net zhomed axis.2.homed => oracchanger.ishomedZ
net tool-changed iocontrol.0.tool-changed <= oracchanger.toolchanged
net tool-number iocontrol.0.tool-prep-number => oracchanger.toolnumber
net tool-oldnumber iocontrol.0.tool-number => oracchanger.currenttoolnumber
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net sig1 oracchanger.opto1 <= hm2_5i25.0.7i76.0.0.input-05
net sig2 oracchanger.opto2 <= hm2_5i25.0.7i76.0.0.input-06
net sig3 oracchanger.opto3 <= hm2_5i25.0.7i76.0.0.input-07
net delaystart timedelay2.0.in <= oracchanger.delaystart
net delaydone timedelay2.0.out => oracchanger.delaydone
Here is a list of problems:
* doesn't home prior to tool change
* had to comment out delay, isn't recognized as valid function call (setp timedelay2.0.on-delay 5).
* you can hear the turret stepper pulsing, but it takes 3 minutes to ramp up to any moment.
Any suggestion would be greatly appreciated.
Thanks'
Brian
Last edit: 02 Apr 2017 15:38 by brianTruck.
Please Log in or Create an account to join the conversation.
- brianTruck
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 104
- Thank you received: 7
02 Apr 2017 21:13 - 02 Apr 2017 21:15 #90782
by brianTruck
Replied by brianTruck on topic PathPilot Lathe with 6 place turret
Ok,
Turret running at full speed now. I'm getting a opto sensor doesn't match truth table error almost as soon as it start's moving.
Still getting timing delay error (type mismatch) ,that why it's commented out. This is probably why opto error.
######################################################################
# Tool Changer
#######################################################################
# 0 - manual
# 1 - gang
# 3 - 8 position ATC
setp hm2_5i25.0.stepgen.01.control-type 1
setp hm2_5i25.0.stepgen.01.position-scale [AXIS_1]STEP_SCALE
# stepper driver timing parameters
setp hm2_5i25.0.stepgen.01.steplen [AXIS_1]STEPLEN
setp hm2_5i25.0.stepgen.01.stepspace [AXIS_1]STEPSPACE
setp hm2_5i25.0.stepgen.01.dirhold [AXIS_1]DIRHOLD
setp hm2_5i25.0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
setp hm2_5i25.0.stepgen.01.maxvel [AXIS_1]STEPGEN_MAX_VEL
setp hm2_5i25.0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAXACCEL
loadrt mux4 names=mux.turret-speed
addf mux.turret-speed servo-thread
setp mux.turret-speed.in0 0
setp mux.turret-speed.in1 .1
setp mux.turret-speed.in2 0
setp mux.turret-speed.in3 -2
net turret-on oracchanger.run mux.turret-speed.sel0
net turret-dir oracchanger.forward mux.turret-speed.sel1
net turret-speed mux.turret-speed.out hm2_5i25.0.stepgen.01.velocity-cmd
# And possibly turn the stepper drive off when not actually changing tools
setp hm2_5i25.0.stepgen.01.enable 1
loadrt timedelay2 count=1
#addf timedelay2 servo-thread
# will wait 5 secs approx and turn motor off after reversing against stop
#setp timedelay2.on-delay 5
net tool-change iocontrol.0.tool-change => oracchanger.toolchange
net xhomed axis.0.homed => oracchanger.ishomedX
net zhomed axis.2.homed => oracchanger.ishomedZ
net tool-changed iocontrol.0.tool-changed <= oracchanger.toolchanged
net tool-number iocontrol.0.tool-prep-number => oracchanger.toolnumber
net tool-oldnumber iocontrol.0.tool-number => oracchanger.currenttoolnumber
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net sig1 oracchanger.opto1 <= hm2_5i25.0.7i76.0.0.input-05-not
net sig2 oracchanger.opto2 <= hm2_5i25.0.7i76.0.0.input-06-not
net sig3 oracchanger.opto3 <= hm2_5i25.0.7i76.0.0.input-07-not
#net delaystart timedelay2.in <= oracchanger.delaystart
#net delaydone timedelay2.out => oracchanger.delaydone
Still isn't homing before tool change.
Brian
Turret running at full speed now. I'm getting a opto sensor doesn't match truth table error almost as soon as it start's moving.
Still getting timing delay error (type mismatch) ,that why it's commented out. This is probably why opto error.
######################################################################
# Tool Changer
#######################################################################
# 0 - manual
# 1 - gang
# 3 - 8 position ATC
setp hm2_5i25.0.stepgen.01.control-type 1
setp hm2_5i25.0.stepgen.01.position-scale [AXIS_1]STEP_SCALE
# stepper driver timing parameters
setp hm2_5i25.0.stepgen.01.steplen [AXIS_1]STEPLEN
setp hm2_5i25.0.stepgen.01.stepspace [AXIS_1]STEPSPACE
setp hm2_5i25.0.stepgen.01.dirhold [AXIS_1]DIRHOLD
setp hm2_5i25.0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
setp hm2_5i25.0.stepgen.01.maxvel [AXIS_1]STEPGEN_MAX_VEL
setp hm2_5i25.0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAXACCEL
loadrt mux4 names=mux.turret-speed
addf mux.turret-speed servo-thread
setp mux.turret-speed.in0 0
setp mux.turret-speed.in1 .1
setp mux.turret-speed.in2 0
setp mux.turret-speed.in3 -2
net turret-on oracchanger.run mux.turret-speed.sel0
net turret-dir oracchanger.forward mux.turret-speed.sel1
net turret-speed mux.turret-speed.out hm2_5i25.0.stepgen.01.velocity-cmd
# And possibly turn the stepper drive off when not actually changing tools
setp hm2_5i25.0.stepgen.01.enable 1
loadrt timedelay2 count=1
#addf timedelay2 servo-thread
# will wait 5 secs approx and turn motor off after reversing against stop
#setp timedelay2.on-delay 5
net tool-change iocontrol.0.tool-change => oracchanger.toolchange
net xhomed axis.0.homed => oracchanger.ishomedX
net zhomed axis.2.homed => oracchanger.ishomedZ
net tool-changed iocontrol.0.tool-changed <= oracchanger.toolchanged
net tool-number iocontrol.0.tool-prep-number => oracchanger.toolnumber
net tool-oldnumber iocontrol.0.tool-number => oracchanger.currenttoolnumber
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net sig1 oracchanger.opto1 <= hm2_5i25.0.7i76.0.0.input-05-not
net sig2 oracchanger.opto2 <= hm2_5i25.0.7i76.0.0.input-06-not
net sig3 oracchanger.opto3 <= hm2_5i25.0.7i76.0.0.input-07-not
#net delaystart timedelay2.in <= oracchanger.delaystart
#net delaydone timedelay2.out => oracchanger.delaydone
Still isn't homing before tool change.
Brian
Last edit: 02 Apr 2017 21:15 by brianTruck.
Please Log in or Create an account to join the conversation.
Moderators: cncbasher
Time to create page: 0.097 seconds