Re: [Emc-users] HAL Error, what did I do wrong?

2007-08-04 Thread RogerN

- Original Message - 
From: "Kirk Wallace" <[EMAIL PROTECTED]>
To: "Enhanced Machine Controller (EMC)" 

Sent: Saturday, August 04, 2007 2:37 AM
Subject: Re: [Emc-users] HAL Error, what did I do wrong?




> Would the analog signal from tachometer be easier to use for feedback?
>
> Kirk Wallace
>

It might be easier as far as tuning but I don't have any analog inputs. 
I got the closed loop speed control working last night but it needs 
changes.  The best I got so far is the use ff0 and set a value that gets 
me close to the command speed and an I gain of .001 homes the speed in 
real close in a few seconds.  I want to try to replace my lowpass filter 
on rpm feedback with a limit2.  My large negative spike when trying to 
thread was limited in rate of change but lowpass kept it in the loop for 
a while and threading didn't work.  More experimenting to come!

Roger Neal



-
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] HAL Error, what did I do wrong?

2007-08-04 Thread Kirk Wallace
On Sat, 2007-08-04 at 01:41 -0500, RogerN wrote:
> - Original Message - 
> From: "John Kasunich" <[EMAIL PROTECTED]>
> To: "Enhanced Machine Controller (EMC)" 
> 
> Sent: Friday, August 03, 2007 11:21 AM
> Subject: Re: [Emc-users] HAL Error, what did I do wrong?
> >
> > This is a head-scratcher.
... snip
> I added another limit 2.0 to the feedback rpm going into the pid loop. 
> I limited the rate of change to 3000 rpm / sec figuring 3 rpm per 1ms 
> servo thead fperiod.  So now my negative spike generated from threading 
> resetting the spindle position will be limited to 3 rpm in one servo 
> period.  If this thing is tunable I should have a pretty nice closed 
> loop spindle control... hopefully!
> 
> Thanks again
> 
> Roger Neal

Would the analog signal from tachometer be easier to use for feedback?

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] HAL Error, what did I do wrong?

2007-08-03 Thread RogerN

- Original Message - 
From: "John Kasunich" <[EMAIL PROTECTED]>
To: "Enhanced Machine Controller (EMC)" 

Sent: Friday, August 03, 2007 11:21 AM
Subject: Re: [Emc-users] HAL Error, what did I do wrong?
>
> This is a head-scratcher.



>
> What version are you running?
>
> Do you have any other addf commands in your file that end in zero?
>
> Try removing the comment after the addf command?
>
> Let me know what you find out.
>
> Regards,
>
> John Kasunich
>

Thanks once again John, I removed the comment after the addf and got it 
to run.  I thought the position error had to do with PID position but I 
know I commanded moves to 0 without error.  I was running 2.1.branch but 
changed 2.1.7 when it was released a couple of days ago.  I'm seeing 
numbers in my Axis Hal configuration watch window.  Now to connect the 
analog out to the drives analog in and see if I can tune it.

I added another limit 2.0 to the feedback rpm going into the pid loop. 
I limited the rate of change to 3000 rpm / sec figuring 3 rpm per 1ms 
servo thead fperiod.  So now my negative spike generated from threading 
resetting the spindle position will be limited to 3 rpm in one servo 
period.  If this thing is tunable I should have a pretty nice closed 
loop spindle control... hopefully!

Thanks again

Roger Neal


-
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] HAL Error, what did I do wrong?

2007-08-03 Thread John Kasunich
RogerN wrote:
> I got my filtered speed feedback working by copying and modifying parts 
> of nist lathe and sim lathe.  Tonight I tried to add PID control to the 
> spindle and can't get it to run.  I get this error -
> 
> HAL: ERROR: bad position: 0
> 
> Here is what I added tonight (beside adding another PID loop (count=4) 
> and such to core servo.hal).
> 
>  Start of drive speed control
> loadrt limit2 count=1
> addf limit2.0 servo-thread # Limit spindle rpm rate of change to 300 RPM 

This is a head-scratcher.

The error message is almost certainly coming from an "addf" command.
"addf" allows you to optionally specify a position in the thread where
you would like the function to be (1 = first function in the thread,
2 = 2nd function, -2 = 2nd from the end, etc.).  That error message
is issued if you try to set the position to zero, as in:

addf limit2.0 servo-thread 0

Obviously you aren't doing that.  I thought maybe the comment was being
mishandled and turned into a "0" somehow, but I've tried here on both
CVS head and version 2.1.7, and comments after an addf command are fine.

What version are you running?

Do you have any other addf commands in your file that end in zero?

Try removing the comment after the addf command?

Let me know what you find out.

Regards,

John Kasunich

-
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] HAL Error, what did I do wrong?

2007-08-02 Thread RogerN
I got my filtered speed feedback working by copying and modifying parts 
of nist lathe and sim lathe.  Tonight I tried to add PID control to the 
spindle and can't get it to run.  I get this error -

HAL: ERROR: bad position: 0

Here is what I added tonight (beside adding another PID loop (count=4) 
and such to core servo.hal).

 Start of drive speed control
loadrt limit2 count=1
addf limit2.0 servo-thread # Limit spindle rpm rate of change to 300 RPM 
per sec

setp limit2.0.min 0
setp limit2.0.max 3000
setp limit2.0.maxv 10 # For testing, I plan to change to around 
300rpm/sec later,
  # this is so I can watch with hal tools

newsig spindle-ramp float
linksp motion.spindle-speed-out => limit2.0.in
linkps limit2.0.out => spindle-ramp

newsig vfd-command float

linksp spindle-rpm-filtered => pid.3.feedback
linksp vfd-command <= pid.3.output
setp pid.3.maxoutput 10

# Tune gains to minimize following error but be slow responding to
#  the huge negative spike when threading resets spindle position
# I plan to use mostly I gain to
setp pid.3.Pgain 1
setp pid.3.Igain .01
setp pid.3.Dgain 0
setp pid.3.bias 0
setp pid.3.FF0 0
setp pid.3.FF1 0
# deadband should be just over 1 count
setp pid.3.deadband 5
linksp spindle-ramp => pid.3.command
linksp motion.spindle-on => pid.3.enable

###

Does anyone here know what I did wrong?

Thanks!
Roger Neal


-
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