On Sunday 03 March 2019 06:39:24 Gene Heskett wrote:

> On Sunday 03 March 2019 05:11:50 Gene Heskett wrote:
> > On Sunday 03 March 2019 04:28:31 andy pugh wrote:
> > > On Sun, 3 Mar 2019 at 01:03, Gene Heskett <[email protected]>
>
> wrote:
> > > > so how do I move the motion.analog-out-01 FP variable to a
> > > > global variable for later use in my gcode? Even if its only 1
> > > > line later...
> > >
> > > Do you really mean analog-OUT? The analog-out HAL pins are
> > > controlled by M68, copying a value from a G-code variable to a HAL
> > > pin. So, your "M68 E1 Q#<_off_angle>" sets motion.analog-out-01 to
> > > be equal to the value of your G-code variable #<_off_angle> so
> > > that you can use that value in HAL.
> > >
> > > So, can you explain if the FP value in question is calculated in
> > > G-code and sent to HAL, or comes from HAL and you want it in the
> > > G-code?
> >
> > Sent to hal using the M68 E# Q#variable. This according to the docs
> > is availabe instantly at motion.analog-out-0#, so this is not a
> > startup only thing.  But its sent from a subroutine called by some
> > gui buttons. But the variable its intended to modify in the main
> > code doesn't exist if the main program has not been executed, so I
> > need a way to move that fp value to the gcode for use in a G10 L2 P0
> > r#variable statement as the main program starts up. I can see that
> > fp value with a halmeter, at motion.analog-out-0#, so why can't I
> > then assign it to a gcode variable?
> >
> > > Your " #<_angle> = motion.analog-out-01" is just completely wrong,
> > > you can't insert HAL labels in G-code like that. There _is_ a way
> > > to read HAL pins in G-code but you get the values at
> > > program-start, not the live value while the program is running.
> >
> > This is live while lcnc is running. Data generated by clicking on
> > the alignX pyvcp button after recording the initial locations vars
> > with align-start. This problem has resulted in the align kit I sent
> > you already being obsolete.
> >
> > > And there is no point reading the value of the motion.analog-out
> > > pins as they only ever have values that are already in the G-code.
> >
> > But that gcode that sets it is in a subroutine, part of the axis
> > gui, completely independent of the gcode in the main program, and
> > apparently cannot create a globally defined var from that subroutine
> > for use in the main program. Or maybe it can but if the subroutine
> > hasn't been invoked, then the main program exits on loading because
> > that var does not exist. BTDT.
> >
> > I've got to make it immune to chicken v egg problems. Or, if I can
> > create and set it in the subroutine, maybe a main program
> > conditional test based on EXISTS might be a way around it? Not been
> > tried yet.
> >
> > Thanks Andy.
> >
> > Cheers, Gene Heskett
>
> And of course there is always RTFM. Somebody should invent a
> searchable pdf format. :(
>
> from the documentation pdf: See section 5.5.7.
>
> I'll give that a shot when I wake up next. Mainline code gets messier
> but it looks like it will work to do what I want.
>
Except it won't. #<-value_returned> is read only and can't be zeroed out 
once <_value> has been used, so just how DO you use the globals <_value> 
and <_value_returned> to control what the code does?

Looks like it will work if I explicitly return 0.00000000 for no 
correction. If angle (g10 l2 p0 r10 for instance, the backplot doesn't 
rotate but the backplot cut pattern does. A week ago the backplot did 
rotate and the cut pattern followed exactly, but now only the cut 
pattern rotates.  There is probably a reason.

??? confusing at best.

Now I need to see if I can get an rpm tally out of this POS VFD as I've a 
non-functioning tach ATM.  I think theres an output, but the 7i76's 
digitizer is only 8 bit and not isolated. Thats not accurate enough to 
feed a PID.  And it takes time... Bringing up a new machine can be quite 
a project. 6 weeks later I still have no air controls or misters etc. Or 
limit/home switches. With no radio shacks left, no local place to get 
this stuff either.

Thanks Andy.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to