Re: [Emc-users] Max speed too fast

2007-08-23 Thread Manfredi Leto
Well, it is hard to say, I think there is a limit to the base period (at 
least I saw that in my machines) and it is about  1 to 15000 ns. If I 
decrease it, everything froze. Said that, an approximated formula that gives 
you an idea of the needed base period is:

BASE_PERIOD = 1 / ( INPUT_SCALE * MAX_VELOCITY * 2 ) * 10^9

The  value of INPUT_SCALE * MAX_VELOCITY is the max number of step per 
second you will need, you double this value to be sure you will be able to 
obtain the step per second you need. The inverse is the time in second 
between a step and the successive at the max speed doubled. You multiply for 
10^9 to obtain ns.

With your data, you should be ok with a Base-Period of 12500, and that 
should be ok for your machine.
Dont' forget to update the STEPGEN_MAXVEL value accordingly to the MAX_VEL 
value. It should be a little more than the MAX_VEL. Also remember that in 
the formula above, you should put the STEPGEN_MAXVEL value and not the 
MAX_VEL...

I hope this helps.

Regards,

Manfredi

My websites: www.m24-pro.com
  www.emc2cnc.altervista.org


From: Cecil Thomas [EMAIL PROTECTED]
Reply-To: Enhanced Machine Controller (EMC) 
emc-users@lists.sourceforge.net
To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net
Subject: [Emc-users] Max speed too fast
Date: Thu, 23 Aug 2007 01:11:15 -0500

I am using EMC2 and a gecko servo drive to drive a servo I have
mounted on my Millrite.
When I set the max speed to 1.0 (I think that is 1 ips or 60 ipm) I
get an error saying that the velocity is too high.
I the motor/encoder/gecko drive require 2000 steps per rev and the
lead screw is 5 tpi and I have a 4 to one timing belt pulley
reduction between the motor and the axis so the input scale is 2000 x
4 x 5 or 40,000 steps per inch.
This requires 40,000 steps per second for 1 inch per second.

I am using a 2 GHZ machine  and I think I can get a higher step per
second output by changing the base period and the associated periods
but I am a little fuzzy on the relationship.  I saw this explained
here sometime in the last few months but I can't find it in my
inbox.  How do I relate max steps per second to base period?   What
is the minimum base period for a given cpu clock speed?

Can someone refresh me on maximum speeds and minimum base periods etc. ?

BTW I really don't need 60 ipm but it looked like a good max speed
and the servo will do it with a squarewave generator input to the
gecko drive.  I could live with half that or so as the max traverse speed.

Thanks,
Cecil


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Curve in place of square edges...

2007-08-23 Thread Tamas Konya
Hi all,

I use the EMC 2.1.6 with a Bridgeport style, three axis BLDC servo system.
The servos are digital types with own position loops. Two parports, software
PID loops and freqgen used, see that picture
http://www.upload-images.net/imagen/390bf13788.jpg for more.

I use this G code to test:

G92.1
G61.1
G10 L2 P2 X0 Y0 Z-0
F500
G55 G1 X0 Y0 Z0
G01 X50 Y0
G01 X50 Y50
G00 X0 Y0
M30

It's qiute accurate, just a little bit slow. But the edges what it makes
likes to a curves not a sharpe edge. After a lot of time to tune up, I have
no idea about it... I try the G61, G61.1, G64, but nothing changed.

When I check the pid.0.error (X axis) and pid.1.error (Y axis) on halscope
it seems to me the axis.1.motor-pos-cmd don't wait to the axis.0 to reach
their destination (X50) and starts to move. So the X and Y axis move the
same time. I think the trajectory planner don't use the
axis.N.motor-pos-fbto wait the exact stop. Just send the command one
after other.


Where is the bug?HAL, parameters, SW or where...



Thx, Tamas Konya
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EDM

2007-08-23 Thread Jim Register
Jon Elson wrote:
 Gene Heskett wrote:
 On Tuesday 21 August 2007, Jon Elson wrote:
I think with a hollow electrode with a drip feed
 scheme through the electrode it would go a lot faster.

 Theres always that 'yabut' Jon, in this case yabut where can I find one of 
 those? :)

How about a syringe and needle?  Back the plunger out, poke a hole in 
the side of the syringe, then slide that into a small T with o-rings 
top and bottom for a rotary coupling.  The syringe body would make an 
insulated holder.  You might have to go to a vet to get a needle long 
enough.

Jim




-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] help

2007-08-23 Thread Christopher Purcell
 Date: Wed, 22 Aug 2007 16:28:19 -0400
 From: Chris Mason [EMAIL PROTECTED]
 Subject: [Emc-users] help
 To: emc-users@lists.sourceforge.net
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=us-ascii

 To all,

 I have downloaded the live cd successfully..according to the mdsum  
 check and
 everything I've seen on the help pages. The cd will not boot, it  
 only gives
 me a blank screen. If I load the cd while the pc is running I get  
 an ubuntu
 screen that says launching browser and then goes away. I have tried  
 loading
 on several cd's and on two different pc's and get the same results.  
 Can
 anyone help me??

 Thank you,

 Chris Mason

I experienced the same problems you describe while trying to install  
EMC2 and Ubuntu 6.06 on an old clunker IBM PC 300 GL Pentium 2 with  
128 MB ram @ 400 MHz. I downloaded the Alternate install CD from  
the Ubuntu site where it is hidden in plain view. The install from  
this source worked perfectly, and once Ubuntu was running I installed  
EMC2. The 128 MB of ram seems perfectly adequate, I have not seen  
anything bad happen in several months of playing with EMC2 that I  
could attribute to memory issues.


[EMAIL PROTECTED]
AIM/iChatAV:   cffrc



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Curve in place of square edges...

2007-08-23 Thread [EMAIL PROTECTED]
I have also noticed a slightly similar thing but in a different context. 
I have a script in which a cut is made by the Y axis then this returns 
by means of a G0 and the work is turned by the A axis. The A axis always 
starts to move just before the Y axis stops. This is on a basic stepper 
machine and I am using the latest EMC2-Ubuntu iso release now - 2.1.6.  
Sorry Ray, didn't mean to break it just yet!!! ;-} lol

-- 

Best wishes,

Ian

Ian W. Wright
Sheffield  UK

The difference between theory and practice is much smaller in theory than in 
practice...


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Curve in place of square edges...

2007-08-23 Thread Sam Sokolik
The lower you have your acceleration set - the more you will see emc2 'blending'
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?TrajectoryControl

If you want it to be exact path you need to use G61.  This will stop at every 
endpoint and follow the path exactly.  You could do a G64 Px.xxx where x.xxx is 
how close you want emc to follow the actual path.  emc will slow down during 
direction changes enough to stay within the tolerance you specify.   

- Original Message - 
  From: Tamas Konya 
  To: emc-users@lists.sourceforge.net 
  Sent: Thursday, August 23, 2007 7:33 AM
  Subject: [Emc-users] Curve in place of square edges...



  Hi all,

  I use the EMC 2.1.6 with a Bridgeport style, three axis BLDC servo system. 
The servos are digital types with own position loops. Two parports, software 
PID loops and freqgen used, see that picture 
http://www.upload-images.net/imagen/390bf13788.jpg for more. 

  I use this G code to test:

  G92.1
  G61.1
  G10 L2 P2 X0 Y0 Z-0
  F500
  G55 G1 X0 Y0 Z0
  G01 X50 Y0
  G01 X50 Y50
  G00 X0 Y0
  M30 

  It's qiute accurate, just a little bit slow. But the edges what it makes 
likes to a curves not a sharpe edge. After a lot of time to tune up, I have no 
idea about it... I try the G61, G61.1, G64, but nothing changed.

  When I check the pid.0.error (X axis) and pid.1.error (Y axis) on halscope it 
seems to me the axis.1.motor-pos-cmd don't wait to the axis.0 to reach their 
destination (X50) and starts to move. So the X and Y axis move the same time. I 
think the trajectory planner don't use the axis.N.motor-pos-fb to wait the 
exact stop. Just send the command one after other.


  Where is the bug?HAL, parameters, SW or where...



  Thx, Tamas Konya




--


  -
  This SF.net email is sponsored by: Splunk Inc.
  Still grepping through log files to find problems?  Stop.
  Now Search log events and configuration files using AJAX and a browser.
  Download your FREE copy of Splunk now   http://get.splunk.com/


--


  ___
  Emc-users mailing list
  Emc-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/emc-users
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Curve in place of square edges...

2007-08-23 Thread Chris Radek
On Thu, Aug 23, 2007 at 08:51:09AM -0500, Sam Sokolik wrote:
 The lower you have your acceleration set - the more you will see emc2 
 'blending'
 http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?TrajectoryControl
 
 If you want it to be exact path you need to use G61.  This will
 stop at every endpoint and follow the path exactly.  You could do
 a G64 Px.xxx where x.xxx is how close you want emc to follow the
 actual path.  emc will slow down during direction changes enough
 to stay within the tolerance you specify.


I tested G61 and did not find any problems.  

If on a servo system you are getting rounded paths still with G61,
your PID tuning probably needs attention.  Check your following
errors.

If you see sharp corners in the backplot but round corners on your
part, it's certainly a tuning problem.

Chris

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] handwheel overrun

2007-08-23 Thread Stuart Stevenson
Gentlemen,
That is the fix.
thank you very much!  :) :)
Stuart

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] How Fast Are Pythons

2007-08-23 Thread Kirk Wallace
My first pass on getting my lathe turret working went okay. It turns out
that shell scripts are way too slow for what I was trying to do. 

The plan was to, using an M101 script, energize the rotator solenoid,
which raises the turret table and starts it rotating. I then monitor the
four bit binary position input for a match between the requested tool
position and the current tool position. As soon as a match occurs, I
activate the stop dog solenoid, wait for the table to settle, deactivate
the rotator solenoid, wait for the table to descend and lock, and
finally deactivate the stop solenoid. On most of the steps, the table
would rotate two or more positions before an action took place.

So, I went back to my pre-feedback plan. I setup the script to only
rotate the table one position - rotate, sleep .1, stop, sleep .1,
de-rotate, sleep .1, de-stop, check for match, repeat till done or
tender. It actually works pretty well.

The problem is that scripts are interpreted or compiled while the
program executes. Python is the same way, I believe, so it would have
the same speed issues?

I may convert my script to C and then call the C program from an M101
script.

Kirk Wallace


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] loading emc-unbuntu

2007-08-23 Thread Chris Mason
Kirk,

I now have a cd that works. It boots on one pc but not the one I want to use
it on. The problematic pc just goes to a blank screen as soon as the boot
sequence starts. I have formatted the hard drive on this pc and it was
having registry problems before...windows xp. So my problem is specific to
this pc. Any suggestions?

cm

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kirk Wallace
Sent: Tuesday, August 21, 2007 1:39 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] loading emc-unbuntu

Hello Chris, I assume you downloaded an .iso file? This file is an image
of the CD that you want. Many times when you create a CD, the CD burning
software just copies the file to the CD as a file. What is needed is for
the CD burning software to be told to use the .iso to create the new
(boot-able) CD from the information within the .iso file. If you look at
a directory of your new disk and only see one .iso file, then you need
to create another CD using the create CD from an image file feature of
your CD burning software.

This link might get you started:

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?BurnIsoImage

Kirk Wallace
~~
On Tue, 2007-08-21 at 13:01 -0400, Chris Mason wrote:
 I have downloaded the software on two different cd's. Neither will
 boot the machine nor can I get the files to do anything in windows xp.
 Help!!
 cm




-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] intro and question about Jeff Epler's Etch CNC servo driver board

2007-08-23 Thread Sebastian Kuzminsky
Hi folks, I'm new here.  My name is Sebastian Kuzminsky, I live
in Boulder, Colorado.  I'm a software guy with a little electronics
experience.  For my day job I do mostly kernel and network programming
in Linux.

I'm just starting to play around with machine tools and CAD software.
I've cut some metal on the big knee mills and the lathes at work, and
I've drawn up some simple parts in CAD and fabricated them on a Stratasys
3d printer (also at work).

I've been thinking of buying a small benchtop mill for the garage
(probably an X2) and doing a CNC conversion.  Being a Linux guy, EMC is
the obvious choice for the machine controller.  I'm very impressed with
what I've seen of EMC so far, and I'm excited to start playing with it in
real mode instead of just simulation.

My first milestone is going to be just getting EMC to spin a small
DC motor with an encoder.  I'm using Jeff Epler's Etch servo driver
schematic.  Thanks Jeff for publishing that!

I have a Pittman 8322 motor with a 256-line encoder.  The motor is rated
for 19 VDC, stall current is 2.5 A, and peak torque is a whopping 7 oz*in.
I got it used, but Pittman is great about publishing specs.

I got some free L298 samples from STM.

I've got a computer with a parallel port, with the Ubuntu 6.06 + EMC
2.1.6 live CD installed on the hard disk.


Ok, after all that blabber here come my questions.


My plan is to use a regular ATX computer power supply and drive the motor
on 12 V, which I believe should work, it just won't get the peak rpm 
torque from the motor.  Which is fine for right now.  This way I can
also supply 5 VDC to the control side of the L298, so I wont need the
LM340 5-volt regulator.  So far so good?

About the circuit, what is the purpose of resistors R1-R4?  They look like
pull-up resistors for the encoder outputs.  I believe that the encoder on
the Pittman motor (a HEDS-9100 from HP) drives its outputs high and low,
without the need for any pulling, and I think that's pretty standard
for other encoders too.  Are the pull-ups there to provide a sensible
value when the encoder is powered off?  Or maybe the circuit is designed
to interface to some other kind of encoder which tri-states its output
lines instead of driving high?

I have only a vague understanding of back EMF off electric motors.
I believe that the diodes D2-D9 are there to protect the L298 and
the power supply from back EMF.  Is that right?  How does that work?
(I know, vague question, sorry.)

If I hook up a power supply to the servo drive circuit, then also connect
the computer's parallel port to the drive circuit, isn't that creating
a giant ground loop?  The house wiring ground goes through the computer
power supply, out the parallel port, to the drive circuit ground, which
is also connected to the motor power supply ground, and back to the
house wiring ground.  Isn't that bad?  Is it something to worry about?
Should there be optical isolation somewhere to interrupt the ground loop?


Ok that's all for now!


-- 
Sebastian Kuzminsky

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] loading emc-unbuntu

2007-08-23 Thread Chris Mason
I'll have to get back to you w/that info.   What's smp?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stephen Wille
Padnos
Sent: Thursday, August 23, 2007 12:59 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] loading emc-unbuntu

Chris Mason wrote:

The ubuntu logo does not show up. The pc has over 600mb of RAM and is
running two 500mhz intels. It boots windows xp disk w/no problems. I think
bill gates doesn't want me to switch.
  

Heh - that reminds me.  I don't think anyone has asked what your 
hardware is :)

I see now that it's an SMP machine.  Could you fill us in on the HD, 
CD-ROM, chipset, CPU type (looks like P3 to me), video controller chip, etc?

Thanks
- Steve


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] loading emc-unbuntu

2007-08-23 Thread Stephen Wille Padnos
Chris Mason wrote:

I'll have to get back to you w/that info.   What's smp?
  

Symmetrical Multi-Processing - more than one CPU

- Steve


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Curve in place of square edges...

2007-08-23 Thread Tamas Konya
Hi,

 Thanks everybody the answers. I made a picture about pid.0.error (X-axis),
pid.1.error (Y-axis), axis.0.motor-pos-cmd and axis.0.motor-pos-cmd. You can
see it in: http://www.upload-images.net/imagen/c6ebc76f47.png , an other
after the acceleration changed smaller value:
http://www.upload-images.net/imagen/f8e3a1376b.png The red and blue are the
error signals, green and violet are the motor position commands. You can see
the second axis starts moving before the first stop.
 Sure, the machine has a continuous following error, but I though the EMC2
will tolerate it. If the trajectory planner use the feedback signal to
detect the exact stop in place of own position output, it could work.
 So, it's seems to me, I have to reduce the following error to get sharp
edge. Like Chris sad, I have to tune my PID more strong, than I get worse
accuracy :(  (Backplot has sharpe edge.)

Thx,

 Tamas


On 8/23/07, Chris Radek [EMAIL PROTECTED] wrote:

 On Thu, Aug 23, 2007 at 08:51:09AM -0500, Sam Sokolik wrote:
  The lower you have your acceleration set - the more you will see emc2
 'blending'
  http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?TrajectoryControl
 
  If you want it to be exact path you need to use G61.  This will
  stop at every endpoint and follow the path exactly.  You could do
  a G64 Px.xxx where x.xxx is how close you want emc to follow the
  actual path.  emc will slow down during direction changes enough
  to stay within the tolerance you specify.


 I tested G61 and did not find any problems.

 If on a servo system you are getting rounded paths still with G61,
 your PID tuning probably needs attention.  Check your following
 errors.

 If you see sharp corners in the backplot but round corners on your
 part, it's certainly a tuning problem.

 Chris

 -
 This SF.net email is sponsored by: Splunk Inc.
 Still grepping through log files to find problems?  Stop.
 Now Search log events and configuration files using AJAX and a browser.
 Download your FREE copy of Splunk now   http://get.splunk.com/
 ___
 Emc-users mailing list
 Emc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/emc-users

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How Fast Are Pythons

2007-08-23 Thread ben lipkowitz
This really sounds like a perfect job for classicladder. If you arent 
interested in learning ladder logic, then writing a custom hal component 
might be easier, since you seem comfortable with C. I think the issue here 
is that your script is not running realtime, and so the timing is off.

As you can see, sleep isn't always real accurate:

$ firefox; time sleep 0.1
real0m0.313s

A C or python program would have the same problem:
#include unistd.h
int main(){ usleep(10); }

$time ./test
real0m0.151s

import time
time.sleep(0.1)

$time python test.py
real0m0.140s

you could also try running your script with a higher priority. (renice) 
btw you are actually having a problem right? or are you just informing us 
of what you did?

   --fenn

 My first pass on getting my lathe turret working went okay. It turns out
 that shell scripts are way too slow for what I was trying to do.

 The plan was to, using an M101 script, energize the rotator solenoid,
 which raises the turret table and starts it rotating. I then monitor the
 four bit binary position input for a match between the requested tool
 position and the current tool position. As soon as a match occurs, I
 activate the stop dog solenoid, wait for the table to settle, deactivate
 the rotator solenoid, wait for the table to descend and lock, and
 finally deactivate the stop solenoid. On most of the steps, the table
 would rotate two or more positions before an action took place.

 So, I went back to my pre-feedback plan. I setup the script to only
 rotate the table one position - rotate, sleep .1, stop, sleep .1,
 de-rotate, sleep .1, de-stop, check for match, repeat till done or
 tender. It actually works pretty well.

 The problem is that scripts are interpreted or compiled while the
 program executes. Python is the same way, I believe, so it would have
 the same speed issues?

 I may convert my script to C and then call the C program from an M101
 script.

 Kirk Wallace


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] intro and question about Jeff Epler's Etch CNC servo driver board

2007-08-23 Thread Jeff Epler
On Thu, Aug 23, 2007 at 10:40:02AM -0600, Sebastian Kuzminsky wrote:
 About the circuit, what is the purpose of resistors R1-R4?  They look like
 pull-up resistors for the encoder outputs.

The encoder I had used OC drivers, so the resistors were the recommended
circuit.  If your encoder has push-pull drivers, then the resistor may
be inappropriate or unneeded.

If in doubt, refer to the documentation for your encoder and follow its
recommended circuit design.

 I have only a vague understanding of back EMF off electric motors.
 I believe that the diodes D2-D9 are there to protect the L298 and
 the power supply from back EMF.  Is that right?  How does that work?
 (I know, vague question, sorry.)

The reasons are exactly the same as for a reverse diode in a simple
relay: when the H-bridge switch turns off, the voltage across the
inductor rises.  The diode allows this voltage to be dumped into the
supply rails, limiting the reverse voltage across the switch to a diode
drop.  The other reason is simply that this is the recommended setup in
the L298 datasheet.

 If I hook up a power supply to the servo drive circuit, then also connect
 the computer's parallel port to the drive circuit, isn't that creating
 a giant ground loop?  The house wiring ground goes through the computer
 power supply, out the parallel port, to the drive circuit ground, which
 is also connected to the motor power supply ground, and back to the
 house wiring ground.  Isn't that bad?  Is it something to worry about?
 Should there be optical isolation somewhere to interrupt the ground loop?

This setup, without isolation or attention to grould looks has worked OK
in the etch-servo (though honestly there's no way I will tell if some
quadrature transitions were lost, as sloppy as that machine is).  It also
worked OK for a sherline lathe retrofit, though noise reared its head
when using an SSR to switch the spindle motor on and off.  That may or
may not scale to larger systems with bigger voltages, currents, and
noise sources.  For a real machine, you want to pay careful attention to
grounding and isolation for safety reasons as well as reliability
reasons, and I do not have the depth of knowledge to answer those
questions well.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] loading emc-unbuntu

2007-08-23 Thread [EMAIL PROTECTED]
Chris,

How about putting the hard drive from the bad machine into the good 
machine and trying to install onto it there? The other thing would be to 
get hold of a low level disk repair program and run it on the disk from 
the suspect machine. If you install the Linux as the only OS on the 
machine it should reformat the whole disk and probably get rid of any 
problems generated on there by windoze.

-- 
Best wishes,

Ian

Ian W. Wright
Sheffield  UK

The difference between theory and practice is much smaller in theory than in 
practice...


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] loading emc-unbuntu

2007-08-23 Thread Stephen Wille Padnos
Chris Mason wrote:

Can you recommend a low level (downloadable) program for cleaning the disk.
I'd rather not swap disks around and all that if I can avoid it. I have a
feeling that you are right and windows somehow left some crap on the system
that I can't seem to shake. 
  

I'm sure that's not the problem, with one possible exception.

Since you don't get any video from early in the boot sequence, this has 
nothing to do with what's on disk.  I suspect you'd get the same result 
with no hard disk in the machine.

You said The problematic pc just goes to a blank screen as soon as the 
boot sequence starts.

Does that mean that you see the CD boot menu giving you various options 
(boot Ubuntu, boot in safe graphics mode, run memtest, etc), or does it 
not even show you that?  If you don't get the boot menu from the CD, 
then I'd just double-check that the BIOS is set to boot from CD *before* 
hard disk.  Older BIOSes were'nt very good at going on to other boot 
options if the chosen boot media didn't work.  The reason you'd have the 
blank screen would be that the partition table (which is probably still 
valid) would still be set to boot from the first partition, but there's 
nothing there to boot.  This situation should result in an error, but 
who knows.

A longshot, but I thought I'd mention it :)

- Steve


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] loading emc-unbuntu

2007-08-23 Thread Chris Mason
When the pc first starts to boot (black screen/white letters), it
acknowledges that the cd is in and seems to be reading it (some verbage that
I don't remember but it seems to know linux is in there). Right after this
is when the ubuntu screen appears on the working pc.this is when the
screen goes blank on the target pc.by the way,the blank screen seems to
have a brown hue...not a totally black screen. The bios has several
options to boot fromtwo of the options begin w/cdrom and are followed by
other drives.it gives a sequence of drives to boot from. 

cm

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stephen Wille
Padnos
Sent: Thursday, August 23, 2007 3:17 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] loading emc-unbuntu

Chris Mason wrote:

Can you recommend a low level (downloadable) program for cleaning the disk.
I'd rather not swap disks around and all that if I can avoid it. I have a
feeling that you are right and windows somehow left some crap on the system
that I can't seem to shake. 
  

I'm sure that's not the problem, with one possible exception.

Since you don't get any video from early in the boot sequence, this has 
nothing to do with what's on disk.  I suspect you'd get the same result 
with no hard disk in the machine.

You said The problematic pc just goes to a blank screen as soon as the 
boot sequence starts.

Does that mean that you see the CD boot menu giving you various options 
(boot Ubuntu, boot in safe graphics mode, run memtest, etc), or does it 
not even show you that?  If you don't get the boot menu from the CD, 
then I'd just double-check that the BIOS is set to boot from CD *before* 
hard disk.  Older BIOSes were'nt very good at going on to other boot 
options if the chosen boot media didn't work.  The reason you'd have the 
blank screen would be that the partition table (which is probably still 
valid) would still be set to boot from the first partition, but there's 
nothing there to boot.  This situation should result in an error, but 
who knows.

A longshot, but I thought I'd mention it :)

- Steve


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Max speed too fast

2007-08-23 Thread Cecil Thomas
Thanks for the help.
I set my base period to 15,000,  servo period to 60,000 and traj 
period to 600,000.
I lowered my max vel to .75 (45 inches per minute, plenty fast 
enough).  Everything seems happy except the realtime error which I 
have not run to ground yet.
The RT error was there at the larger periods as well.  I installed a 
video board and attempted to kill the MOBO video but the RT error lives on.

Thanks,
Cecil


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] loading emc-unbuntu

2007-08-23 Thread Stephen Wille Padnos
OK.

It now sounds to me like the video card is some extremely strange beast 
(at least relative to the Linux world :) ), or something like the 
multiprocessor thing is causing issues.

I'll be interested in seeing the hardware specs wheen you get them 
later.  I think you may need to install from either the stock Ubuntu CD 
or the alternate install CD.  There are instructions on this wiki page 
for installing EMC2 on standard Ubuntu 6.06:
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Installing_EMC2#On_Ubuntu_5_10_or_6_06_using_precompiled_EMC2_packages
That install process should work, though it will be a little harder (and 
requires the computer to be connected to the internet).

- Steve

Chris Mason wrote:

When the pc first starts to boot (black screen/white letters), it
acknowledges that the cd is in and seems to be reading it (some verbage that
I don't remember but it seems to know linux is in there). Right after this
is when the ubuntu screen appears on the working pc.this is when the
screen goes blank on the target pc.by the way,the blank screen seems to
have a brown hue...not a totally black screen. The bios has several
options to boot fromtwo of the options begin w/cdrom and are followed by
other drives.it gives a sequence of drives to boot from. 

cm

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stephen Wille
Padnos
Sent: Thursday, August 23, 2007 3:17 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] loading emc-unbuntu

Chris Mason wrote:

  

Can you recommend a low level (downloadable) program for cleaning the disk.
I'd rather not swap disks around and all that if I can avoid it. I have a
feeling that you are right and windows somehow left some crap on the system
that I can't seem to shake. 
 



I'm sure that's not the problem, with one possible exception.

Since you don't get any video from early in the boot sequence, this has 
nothing to do with what's on disk.  I suspect you'd get the same result 
with no hard disk in the machine.

You said The problematic pc just goes to a blank screen as soon as the 
boot sequence starts.

Does that mean that you see the CD boot menu giving you various options 
(boot Ubuntu, boot in safe graphics mode, run memtest, etc), or does it 
not even show you that?  If you don't get the boot menu from the CD, 
then I'd just double-check that the BIOS is set to boot from CD *before* 
hard disk.  Older BIOSes were'nt very good at going on to other boot 
options if the chosen boot media didn't work.  The reason you'd have the 
blank screen would be that the partition table (which is probably still 
valid) would still be set to boot from the first partition, but there's 
nothing there to boot.  This situation should result in an error, but 
who knows.

A longshot, but I thought I'd mention it :)

- Steve


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

  


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Max speed too fast

2007-08-23 Thread Stephen Wille Padnos
Cecil Thomas wrote:

Thanks for the help.
I set my base period to 15,000,  servo period to 60,000 and traj 
period to 600,000.
  

Ack!

Unless you're running a servo machine at 1000m/min (yes, 1 kilometer per 
minute), you don't need a 60 microsecond servo rate.  For most normal 
machines - those that go less than ~500 IPM - the 1,000,000 (1 ms) servo 
rate is plenty fast.  There is no need to maintain the exact ratio 
between base, servo, and traj.  You can also set traj period back to 10 
ms, or set it the same as the servo rate (1 ms).

That should clear up the unexpected realtime delay errors - those are 
in the TRAJ thread (I think), and look for a 20% variance in thread 
period - which is only 12 microseconds with the settings you changed to.

- Steve

I lowered my max vel to .75 (45 inches per minute, plenty fast 
enough).  Everything seems happy except the realtime error which I 
have not run to ground yet.
The RT error was there at the larger periods as well.  I installed a 
video board and attempted to kill the MOBO video but the RT error lives on.
  

Hmmm.  Maybe going back to the 1ms / 10ms servo/traj periods won't clear 
up the error then.  Take a look at the actual thread times printed in 
dmesg.  If you have numbers 2 ms or so, it's not likely to be a 
problem.  If the error is something like 50 or more ms, then it is 
likely to be a problem, and we'll have to debug more.

Thanks,
Cecil
  

Hope this helps
- Steve


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] loading emc-unbuntu

2007-08-23 Thread Chris Mason
I'm fairly sure the video card is an oxygen. The system was built for
cad/cam several years ago but is still very fast for what I use it for. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stephen Wille
Padnos
Sent: Thursday, August 23, 2007 3:33 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] loading emc-unbuntu

OK.

It now sounds to me like the video card is some extremely strange beast 
(at least relative to the Linux world :) ), or something like the 
multiprocessor thing is causing issues.

I'll be interested in seeing the hardware specs wheen you get them 
later.  I think you may need to install from either the stock Ubuntu CD 
or the alternate install CD.  There are instructions on this wiki page 
for installing EMC2 on standard Ubuntu 6.06:
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Installing_EMC2#On_Ubuntu_5_10_
or_6_06_using_precompiled_EMC2_packages
That install process should work, though it will be a little harder (and 
requires the computer to be connected to the internet).

- Steve

Chris Mason wrote:

When the pc first starts to boot (black screen/white letters), it
acknowledges that the cd is in and seems to be reading it (some verbage
that
I don't remember but it seems to know linux is in there). Right after this
is when the ubuntu screen appears on the working pc.this is when the
screen goes blank on the target pc.by the way,the blank screen seems to
have a brown hue...not a totally black screen. The bios has several
options to boot fromtwo of the options begin w/cdrom and are followed
by
other drives.it gives a sequence of drives to boot from. 

cm

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stephen Wille
Padnos
Sent: Thursday, August 23, 2007 3:17 PM
To: Enhanced Machine Controller (EMC)
Subject: Re: [Emc-users] loading emc-unbuntu

Chris Mason wrote:

  

Can you recommend a low level (downloadable) program for cleaning the
disk.
I'd rather not swap disks around and all that if I can avoid it. I have a
feeling that you are right and windows somehow left some crap on the
system
that I can't seem to shake. 
 



I'm sure that's not the problem, with one possible exception.

Since you don't get any video from early in the boot sequence, this has 
nothing to do with what's on disk.  I suspect you'd get the same result 
with no hard disk in the machine.

You said The problematic pc just goes to a blank screen as soon as the 
boot sequence starts.

Does that mean that you see the CD boot menu giving you various options 
(boot Ubuntu, boot in safe graphics mode, run memtest, etc), or does it 
not even show you that?  If you don't get the boot menu from the CD, 
then I'd just double-check that the BIOS is set to boot from CD *before* 
hard disk.  Older BIOSes were'nt very good at going on to other boot 
options if the chosen boot media didn't work.  The reason you'd have the 
blank screen would be that the partition table (which is probably still 
valid) would still be set to boot from the first partition, but there's 
nothing there to boot.  This situation should result in an error, but 
who knows.

A longshot, but I thought I'd mention it :)

- Steve


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

  


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   

Re: [Emc-users] loading emc-unbuntu

2007-08-23 Thread Stephen Wille Padnos
Chris Mason wrote:

I'm fairly sure the video card is an oxygen. The system was built for
cad/cam several years ago but is still very fast for what I use it for. 
  

It should work in the VESA/BIOS mode the boot CD uses, but it may not.  
I don't think 3DLabs was ever very good with Linux drivers, so you may 
be out of luck there.

CAD cards (especially ones that are only expected to work under Windows) 
often don't implement much of the VESA spec - I guess they figure the 
card will be put in text mode for the BIOS, the 320x200 mode Windows 
shows during boot, then some high resolution driver-managed mode.  
Anything else would be superfluous.

- Steve


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] loading emc-unbuntu

2007-08-23 Thread Stephen Wille Padnos
Chris Mason wrote:

How about switching out the video card?
  

That's a good option.  Some old Matrox card (G400 or G450 are good, G200 
is passable) would be excellent.

- Steve


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How Fast Are Pythons

2007-08-23 Thread Kirk Wallace
On Thu, 2007-08-23 at 17:24 +, ben lipkowitz wrote:
 This really sounds like a perfect job for classicladder. If you arent 
 interested in learning ladder logic, then writing a custom hal component 
 might be easier, since you seem comfortable with C. I think the issue here 
 is that your script is not running realtime, and so the timing is off.

The turret rotates at about one revolution per second, giving 125ms per
tool position. My guess is that if I can process four or five position
samples in that time, it should work. The problem is that, I think it is
taking around 200ms to do it. If I were using a precompiled program, I
think I should be able to do tens or hundreds of samples per position
even in userspace(?).
 
 As you can see, sleep isn't always real accurate:

It should be accurate enough were I would like to use it - that being,
just after solenoid commands to let the mechanical parts to come to
equilibrium. Originally, I had no sleep between rotate, sample,
activate stop. After the stop, sleeps for the park procedure were all
minimum times.
 
 $ firefox; time sleep 0.1
 real0m0.313s
 
 A C or python program would have the same problem:
 #include unistd.h
 int main(){ usleep(10); }
 
 $time ./test
 real0m0.151s
 
 import time
 time.sleep(0.1)
 
 $time python test.py
 real0m0.140s
 
 you could also try running your script with a higher priority. (renice) 
 btw you are actually having a problem right? or are you just informing us 
 of what you did?
 
--fenn

I still have a problem, sort of. I had to fall back on a less desirable
method to get it to work. It now does a complete single tool position
change using only solenoid commands and sleep - no position processing.
After the turret parks, I sample the position and if the requested
position and current position don't match, I have it jump to the next
position, park and test again until I get a match. What I would prefer,
is to process the location during rotation and only stop and park after
I get a match.

Bottom line (I think), how can I get enough processing done in 30ms to
decode and match two (32 bit unsigned?) words?

(By the way, this is how I decode the position bits:
halcmd show inputs
grep and cut
change each bit, ones, twos, fours, eights from T or F to 1 or 0
current_tool=$((ones+(2*twos)+(4*fours)+(8*eights)))
I visit Grandma on the way)

Kirk Wallace



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How Fast Are Pythons

2007-08-23 Thread Stephen Wille Padnos
Kirk Wallace wrote:

On Thu, 2007-08-23 at 17:24 +, ben lipkowitz wrote:
  

This really sounds like a perfect job for classicladder. If you arent 
interested in learning ladder logic, then writing a custom hal component 
might be easier, since you seem comfortable with C. I think the issue here 
is that your script is not running realtime, and so the timing is off.



The turret rotates at about one revolution per second, giving 125ms per
tool position. My guess is that if I can process four or five position
samples in that time, it should work. The problem is that, I think it is
taking around 200ms to do it. If I were using a precompiled program, I
think I should be able to do tens or hundreds of samples per position
even in userspace(?).
  

As you can see, sleep isn't always real accurate:



It should be accurate enough were I would like to use it - that being,
just after solenoid commands to let the mechanical parts to come to
equilibrium. Originally, I had no sleep between rotate, sample,
activate stop. After the stop, sleeps for the park procedure were all
minimum times.
  

$ firefox; time sleep 0.1
real0m0.313s

A C or python program would have the same problem:
#include unistd.h
int main(){ usleep(10); }

$time ./test
real0m0.151s

import time
time.sleep(0.1)

$time python test.py
real0m0.140s

you could also try running your script with a higher priority. (renice) 
btw you are actually having a problem right? or are you just informing us 
of what you did?

   --fenn



I still have a problem, sort of. I had to fall back on a less desirable
method to get it to work. It now does a complete single tool position
change using only solenoid commands and sleep - no position processing.
After the turret parks, I sample the position and if the requested
position and current position don't match, I have it jump to the next
position, park and test again until I get a match. What I would prefer,
is to process the location during rotation and only stop and park after
I get a match.

Bottom line (I think), how can I get enough processing done in 30ms to
decode and match two (32 bit unsigned?) words?

(By the way, this is how I decode the position bits:
halcmd show inputs
grep and cut
change each bit, ones, twos, fours, eights from T or F to 1 or 0
current_tool=$((ones+(2*twos)+(4*fours)+(8*eights)))
I visit Grandma on the way)

Kirk Wallace
  

OK - I see some room for improvement here :)

First, there's a HAL component called weighted_sum - use that to 
generate positions from the input bits.  You may want to stick a 
debounce on the input bits as well - they're bound to be a little noisy.

There's also a component called modmath - if the turret can be indexed 
in both directions, you can use this component to tell you which way is 
the shortest from the current position to the requested one.  If the 
turret can't move in both directions, then you can do the whole thing 
with HAL components - no classicladder needed.  You'll have to write a 
simple component to compare two s32 numbers (strange but true - there's 
an 8-bit pattern match with cascade input component, but no integer 
comparison :) )  Look at something like xor2.comp for an example of a 
simple .comp component.

use debounce / weighted_sum to get a stable position reading (current_tool)
use tool_change AND NOT (requested_tool == current_tool) to enable the 
turret to index
(AND and NOT are both HAL components already, and there are other logic 
components)

I think that's about it.  Another option is to just write a .comp to do 
it all - take in 4 bits, the requested tool number, and the 
tool-prep/tool-change signals, output tool_prepped/tool_changed and 
turret controls.  The comp preprocessor really helps make this kind of 
HAL component easy to write.

- Steve


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] synchronized axes.

2007-08-23 Thread Dave Engvall
Hi all,

I have an application that needs (eventually) 4 axes.

Two are X and Y and the other pair need to track (rotationally) with  
in a few degrees or better.
Rotational speeds are from zero to 1800 rpm for one axis and either  
1:1 or 2:1 for the other.
The speed of rotation and the vectorized X and Y velocity need to  
track each other.

There are two modes of motion. (1) is driven by an operator moving  
the carriage(s) in X and Y and (2) X and Y will be under
G-code control.

Now that I've got everyone scratching their heads I'll fess up. Think  
long arm sewing machine for quilting.
The rotational axes are the needle and the bobbin.  The tracking give  
constant stitch length.

I'm open to suggestions on how to  tackle this under emc.

Thanks in advance.

Dave


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users