On 11 Dec 2017, at 05:50, Gene Heskett wrote: > Greetings all; > > I had this working as late as 2 or 3 weeks ago. But now its not, and its > apparently only the first of the MDI_COMMAND defines in the HALUI section > of the .ini file. I can see the debug msg's from the rest of them > > The first define is: > > MDI_COMMAND=o<_newcamsw> call > > Which checks a memory value to see if its been run, if true moves the > machine back it its starting coordinates and turns the led4, an > underline under the button red in the gui. > > If false, it stores the coordinates, then moves the machine to tooltable > entry 99 in relative mode, then restores absolute and turns that led > green with a sets led4 true. > > I've been over this file, and no place can I see why it should return: > unknown word starting with an e > in the axis error space. The file: > > o<_newcamsw> SUB > ( toggles machine from normal position to camera offsets ) > ( also drives the led tally's in the gui to show status to operator ) > (msg,got to line 4) > o1000 IF [#3998 GT 0.50000] > ( its in camera position already put it back to normal ) > (msg,restoring normal pos) > o<_camoff> CALL > #3998 = 0.0000000 > ( turn camsw & camstore underline led red ) > sets led4 false > Does that last line need paraentheses? Sorry; I'm not familiar with the 'sets' command, so apologies if this is way off. It's just that S might be interpreted as a command letter, so the ets is an unexpected word starting with e. Or is it the last s of sets?
Same thing further down, at sets led4 true. Marcus > o1000 ELSE > > (msg,got to line 15) > (msg,putting in camera pos) > ( save current coordinate ) > g92 x0 y0 z0 ( sets all coordinate systems so current machine position is > 0,0,0 ) > (msg,initial camon move started ) > g92.2 ( reset any g92 offsets in effect to 0,0,0) > #<_CamOfsX> = #5211 ( get offsets from #5211,#5212 ) > #<_CamOfsY> = #5212 > (debug,OfsX=#<_CamOfsX>) > (debug,OfsY=#<_CamOfsY>) > g92.1 ( clear the whole #5211-#5220 in memory ) > ( introduce CAM offset by getting it from the tool table entry ) > g43 h99 > (calculate offset as don't know how to read it directly ) > g92 x0 y0 z0 ( do the coordnate reset again? ) > g92.2 (ditto) > #<_CamOfsX> = [#<_CamOfsX> - #5211] > #<_CamOfsY> = [#<_CamOfsY> - #5212] > (debug,CamOfsX=#<_CamOfsX>) > (debug,CamOfsY=#<_CamOfsY>) > g92.1 > (debug,CAMoffsets X=#<_CamOfsX>, Y=#<_CamOfsY>) > (finally, move cam for offset) > g91 g0 x#<_CamOfsX> y#<_CamOfsY> > g90 (make sure we are in absolute motion mode) > ( turn led4 underline for camon and camstore green to indicate active ) > sets led4 true > 3998 = 1.00000 > > (msg,camon move completed) > o1000 ENDIF > o<_newcamsw> ENDSUB > m2 > > If not here, or in postgui.hal, this file: > > # the following is added to your postgui.hal file. > # This must be loaded after the pyvcp buttons are created. > > # spindle dial & status display > net rpms <= scaleX60.out => pyvcp.spindle_rpm > net hard-spndl-pwr => pyvcp.on-led > net spindle-cw => pyvcp.fwd-led > net spindle-ccw => pyvcp.rev-led > > # camview stuff, new 2017 version here > net forOnNet pyvcp.checkbutton1 forOn.in forOff.in > # camera position toggle, should call _newcamsw.ngc > # MDI commands start at 00 in the order listed in the ini file. > net cam1 forOn.out halui.mdi-command-00 # move to tool > 99 for camera usage. or back if on > net cam2 pyvcp.button1 halui.mdi-command-01 # Save most > recent camera offset point, shove 4th off end of array > net cam3 pyvcp.button2 halui.mdi-command-02 # center based > on 3 points > net cam4 pyvcp.button3 halui.mdi-command-03 # center based > on 4 points > > # align stuff. Fiddles with coordinate mapping rotations > # find 1st target on workpiece by moving machine and record it. > net align-start halui.mdi-command-04 pyvcp.align-start > # find possible miss aligned y at far edge and record it > net align-y halui.mdi-command-05 pyvcp.align-y > # ditto for x > net align-x halui.mdi-command-06 pyvcp.align-x > # restore the normal mapping, but no clue if its working. > net clear-offset halui.mdi-command-07 pyvcp.clear-offset > > # hook up tally for in cam position, using sets's elsewhere to turn it > # red/green > > net led4 pyvcp.camactive # that leds control pin, high = green > # same idea for led6/led7 camcentered3 and camcentered4 > # tally its done > net led5 pyvcp.camcentered3 > net led6 pyvcp.camcentered4 > # and not done yet, need a horizontal scale to show how many points > # are stored by _camstore.ngc > > A work in progress. But where is the error? > > Its late and I've been looking for this since dinner. > > Thanks for any hints. > > 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> > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
