Screwcutting

More
30 May 2009 12:56 #369 by welderfabrod
Screwcutting was created by welderfabrod
Hi all new to this site and hope I can get some assistance in setting up a small lathe for screw cutting with EMC2. I retrofitted a Emco Compact 5 lathe a while ago and it has been running fine eversince however I now need to screwcut and am not really conversant enough with HAL to write the file to syncronize the steppers with the spindle.
Basicaly there isn't much left of the Emco controller, just the motor speed controller, and power supply. I also fitted modern 1.8deg steppers using the Camtronics 3 axis board. I have the signals from the index slot and the 100 slots for speed control from the encoder on the spindle connected to pin 11 (index) and pin 10 (speed 100 holes) on the parallel port. These come from the motor speed controller board and are at 5V.
There is a chap who has already done this (lerneaenhydra.net/compact5/) although he has retained much more of the original machine than I have. I downloaded his files and tried to copy just what I needed to screwcut as at the moment I'm not worried about switching the spindle on or speed control through EMC2, I put this in the custom hal file. However when I start EMC2 it fails to load and presents its failure window, in the debug section there are two errors reported.
1) Blocks deprecated, use subcomponents generated by comp instead.
2)HAL: ERROR: Pin motion.spindle.sync not found.
3)Custom Hal:42 link failed. (This I assume is because it can't find the motion.spindle.sync.)

Any help here would be greatly appreciated.
Thanks in advance Rod

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

More
30 May 2009 18:25 - 30 May 2009 18:33 #371 by cmorley
Replied by cmorley on topic Re:Screwcutting
What version of EMC2 are you using?
Are you using stepconf or all hand editing to make your config?
The sample config you are pulling from is quite old (2.1.x) we are at 2.3.1 right now.
somethings have changed. You could look at the sample configs that came with emc
or when You tell us the version you are using I will do my best to help.
Last edit: 30 May 2009 18:33 by cmorley. Reason: add info

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

More
31 May 2009 08:30 #375 by welderfabrod
Replied by welderfabrod on topic Re:Screwcutting
Thanks for that I used Stepconf, I think you're probably right i'm not sure what version of EMC2 I have but it must be later than 2.1 because I downloaded the live CD with Ubuntu 8.04 in January this year.
So I'm going to have another go this morning. I'll also have a look at the online manuals because my manuals are now over a year old. But I'll probably be back, I'm new to Linux also and have probs getting my nc files from W****** XP to my linux box in my workshop which is not connected to the net.

Thanks again Rod

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

More
31 May 2009 12:34 #376 by BigJohnT
Replied by BigJohnT on topic Re:Screwcutting
Here is some info on upgrading without a network connection. There may be more better out there but this is the first one that showed up with google.

wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Ins..._internet_connection

This is the 2.3 location:

linuxcnc.org/emc2/dists/dapper/emc2.3/binary-i386/

I use a usb stick to transfer from my main computer to my plasma cutter.

John

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

More
31 May 2009 15:52 #381 by welderfabrod
Replied by welderfabrod on topic Re:Screwcutting
Thanks John. On Ubuntu 6.06 I could'nt get it to mount a usb stick but I could transfer text files on the floppy. on Ubuntu 8.04 I still can't get it to mount a usb stick and it does'nt even recognise my floppy drive so I 'm a bit stuck at the moment.

However I did manage to get the hal file running (using stepconf) but when I went to test it with G33 in MDI mode I got the "Spindle not turning in G33" message. So I thought I'd try Hal Configuration, Hal Scope and and Hal Meter to see if I could make any sense of it (not much hope there) and here are the results I got.

Hal Configuration
motion.spindle-revs :-Is varying when spindle speed is varied.
motion.spindle-speed-in :-is varying when spindle speed is varied.
parport.0.pin-10-in :- Indicator on and off.
parport.0.pin-11-in :-Indicator on and off at regular'ish intervals.

Hal Scope
spindle-phase-a :-Pulses on screen and varying when spindle speed is varied.
spindle-index :- Pulses on screen.

Hal Meter
spindle-phase-a :-switching between TRUE and FALSE
spindle-index-enable :-FALSE (I assume this would only be TRUE if screwcutting or some other syncronized motion was in use)

spindle-index :-Switching between TRUE and FALSE
spindle-phase-index :-FALSE

Does this mean anything to you.

Rod

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

More
01 Jun 2009 11:27 - 01 Jun 2009 11:40 #385 by BigJohnT
Replied by BigJohnT on topic Re:Screwcutting
welderfabrod wrote:

Thanks John. On Ubuntu 6.06 I could'nt get it to mount a usb stick but I could transfer text files on the floppy. on Ubuntu 8.04 I still can't get it to mount a usb stick and it does'nt even recognise my floppy drive so I 'm a bit stuck at the moment.


I guess I'm lucky I just plug in the usb stick and a few seconds later I'm good to go... Is this the same computer? I wonder if the floppy and usb stick problem are related... Maybe someone who knows more about this can chime in...

welderfabrod wrote:

However I did manage to get the hal file running (using stepconf) but when I went to test it with G33 in MDI mode I got the "Spindle not turning in G33" message. So I thought I'd try Hal Configuration, Hal Scope and and Hal Meter to see if I could make any sense of it (not much hope there) and here are the results I got.

Hal Configuration
motion.spindle-revs :-Is varying when spindle speed is varied.
motion.spindle-speed-in :-is varying when spindle speed is varied.
parport.0.pin-10-in :- Indicator on and off.
parport.0.pin-11-in :-Indicator on and off at regular'ish intervals.

Does this mean anything to you.

Rod


It looks like your spindle speed is working... but perhaps you have not hooked up your encoder from your spindle to motion. I'm just guessing as I have not hooked up one yet! I do have the parts to do so but not the time :(
This is from the motion man file:

motion.spindle-index-enable I/O bit
For correct operation of spindle synchronized moves, this signal must be hooked to the index-enable pin of the spindle encoder.


The easiest place to view the man pages is in the html online docs.
www.linuxcnc.org/docview/html/
They are down close to the bottom in the Commands and userspace components section and the Realtime components and kernel modules section.

And even more reading here about spindle feedback:
www.linuxcnc.org/docview/html//examples_spindle.html#r2
I knew I read it somewhere...

John
Last edit: 01 Jun 2009 11:40 by BigJohnT.

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

More
07 Jun 2009 14:10 #392 by welderfabrod
Replied by welderfabrod on topic Re:Screwcutting
Hi again John have checked the man files against the Stepconf Wizards hal file and everything seems as it should be but I still get the Spindle not turning in G33 error.
I have also checked that I am getting 5V at the port and this is OK. I even checked the output from the sensors and I get the swing to 5V when a hole is under each sensor when I turn the spindle slowly by hand.
The only strange thing I see in the hal file is setp encoder.0.position-scale 0.005000 and I thought this would have been 100 as I set it in StepconfWizard. But It makes no difference if I change this to 100 I still get the same error.
As I said previously the index and count pulses are there on HalScope. So I have no idea where I can go from here. But now really need the screwcutting facility.

Anybody else out there have any ideas.

Rod.

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

More
08 Jun 2009 11:55 #395 by BigJohnT
Replied by BigJohnT on topic Re:Screwcutting
Using pastbin.ca or similar copy your .ini and .hal files and put a link for each one and perhaps someone can spot something missing or configured wrong.

I agree that encoder.0.position-scale should be 100 based on what I've read in the manual.

John

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

More
08 Jun 2009 14:00 #396 by BigJohnT
Replied by BigJohnT on topic Re:Screwcutting
Also, one of the developers suggested that the G33 error is probably caused by not having a SxxM3 in the program before the G33.

John

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

More
08 Jun 2009 14:50 #397 by welderfabrod
Replied by welderfabrod on topic Re:Screwcutting
I thought of about Sxx M3 as one of the developers suggest so did this In MDI before the G33 but am not sure wether it should work in MDI. I going to try a a G76 in auto mode to see if that works as soon as I can get back in the workshop. Meanwhile here's my hal file did this again on Sunday.

Rod

# Generated by stepconf at Sun Jun 7 11:35:48 2009
# 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 traj_period_nsec=[EMCMOT]SERVO_PERIOD key=[EMCMOT]SHMEM_KEY num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg=0x378
setp parport.0.reset-time 500
loadrt stepgen step_type=0,0
loadrt encoder num_chan=1

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf encoder.update-counters base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

addf stepgen.capture-position servo-thread
addf encoder.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread

setp encoder.0.position-scale 100
setp encoder.0.counter-mode 1
net spindle-position encoder.0.position => motion.spindle-revs
net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable
net spindle-phase-a encoder.0.phase-A
net spindle-phase-b encoder.0.phase-B
net spindle-phase-index encoder.0.phase-Z

net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir => parport.0.pin-07-out
net xenable => parport.0.pin-17-out

net spindle-phase-a <= parport.0.pin-10-in
net spindle-index <= 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 19000
setp stepgen.0.dirsetup 16000
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

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

net estop-out <= iocontrol.0.user-enable-out
net estop-out => 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.

Time to create page: 0.172 seconds
Powered by Kunena Forum