Discussion:
[Emc-users] loadrt abs component not working
Tom
2008-12-03 01:48:34 UTC
Permalink
I am using the Mesa 5i20 & 7i33 DAC board combination to retrofit a Kasuga mill.
I am controlling a VFD that takes the standard 0-10V speed reference plus start
and reverse.
I am currently working my way thru the problem of outputting a speed command
/voltage signal that does not switch to a negative integer/value when I hit M4.
I am trying to use the abs component to strip the negative value from the
floating point speed command integer coming out of motion.spindle-speed-out.

Below are the corresponding statements from my m5i20_io.hal file:

# Set up spindle speed control
loadrt abs count=1
net spindle-rpm-cmd motion.spindle-speed-out
linkps abs.0.in <= spindle-rpm-cmd
newsig abs-spindle float
linkps abs.0.out => abs-spindle
linksp abs-spindle => m5i20.0.dac-03-value
net SpindleOn motion.spindle-on
linksp SpindleOn => m5i20.0.dac-03-enable
setp m5i20.0.dac-03-gain [SPINDLE]DAC_SCALE #from 5i20ini file#
setp m5i20.0.dac-03-offset 80


Looking at the Halmeter pins/signals, the abs component shows up with 3 pins but
integer values that appear on the abs.0.in pin never come out on the abs.0.out
pin. Zip, nada, no output. Is is as if the abs component needs a parameter or
argument that I am not aware of to make it function. Is there something I am
missing here?

Thanks for your help.
Tom
Stephen Wille Padnos
2008-12-03 01:57:25 UTC
Permalink
Tom wrote:

>I am using the Mesa 5i20 & 7i33 DAC board combination to retrofit a Kasuga mill.
>I am controlling a VFD that takes the standard 0-10V speed reference plus start
>and reverse.
>I am currently working my way thru the problem of outputting a speed command
>/voltage signal that does not switch to a negative integer/value when I hit M4.
>I am trying to use the abs component to strip the negative value from the
>floating point speed command integer coming out of motion.spindle-speed-out.
>
>Below are the corresponding statements from my m5i20_io.hal file:
>
># Set up spindle speed control
>loadrt abs count=1
>net spindle-rpm-cmd motion.spindle-speed-out
>linkps abs.0.in <= spindle-rpm-cmd
>newsig abs-spindle float
>linkps abs.0.out => abs-spindle
>linksp abs-spindle => m5i20.0.dac-03-value
>net SpindleOn motion.spindle-on
>linksp SpindleOn => m5i20.0.dac-03-enable
>setp m5i20.0.dac-03-gain [SPINDLE]DAC_SCALE #from 5i20ini file#
>setp m5i20.0.dac-03-offset 80
>
>
>Looking at the Halmeter pins/signals, the abs component shows up with 3 pins but
>integer values that appear on the abs.0.in pin never come out on the abs.0.out
>pin. Zip, nada, no output. Is is as if the abs component needs a parameter or
>argument that I am not aware of to make it function. Is there something I am
>missing here?
>
>
You need to add the abs function to your servo thread:
addf abs.0 servo-thread
(change the names as appropriate for your setup)

- Steve
Chris Radek
2008-12-03 01:58:52 UTC
Permalink
On Wed, Dec 03, 2008 at 01:48:34AM +0000, Tom wrote:
>
> Looking at the Halmeter pins/signals, the abs component shows up with 3 pins but
> integer values that appear on the abs.0.in pin never come out on the abs.0.out
> pin. Zip, nada, no output. Is is as if the abs component needs a parameter or
> argument that I am not aware of to make it function. Is there something I am
> missing here?

You need to add the abs component to a thread for it to run.

something like addf abs.0 servo-thread.
Tom
2008-12-03 06:49:12 UTC
Permalink
Chris & Stephen,

Thank you guys, that did it.

Although I read the Hal manual and did the tutorials, I am still grappling with the notion of threads. I appreciate your help!

Tom


--- On Tue, 12/2/08, Chris Radek <***@timeguy.com> wrote:
From: Chris Radek <***@timeguy.com>
Subject: Re: [Emc-users] loadrt abs component not working
To: "Enhanced Machine Controller (EMC)" <emc-***@lists.sourceforge.net>
Date: Tuesday, December 2, 2008, 6:58 PM

On Wed, Dec 03, 2008 at 01:48:34AM +0000, Tom wrote:
>
> Looking at the Halmeter pins/signals, the abs component shows up with 3
pins but
> integer values that appear on the abs.0.in pin never come out on the
abs.0.out
> pin. Zip, nada, no output. Is is as if the abs component needs a parameter
or
> argument that I am not aware of to make it function. Is there something I
am
> missing here?

You need to add the abs component to a thread for it to run.

something like addf abs.0 servo-thread.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
John Thornton
2008-12-03 12:18:17 UTC
Permalink
By coincidence I was just working on adding a bit to the manual on components and threads
and how to make it all work together.

John

On 2 Dec 2008 at 22:49, Tom wrote:

> Chris & Stephen,
>
> Thank you guys, that did it.
>
> Although I read the Hal manual and did the tutorials, I am still
> grappling with the notion of threads. I appreciate your help!
>
> Tom
>
>
Loading...