585,930 active members*
3,721 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    56

    Proper Use of TEACH?

    I have the following simple Macro that is intended to read a 2D profile on a Wire EDM. Relay #60 goes to 0 when the wire touches the part.

    [[Find Profile]]
    [Wire On] 'Turn Wire on so Contact Function works
    \10=.02 'Increment in Y
    \11=5 'Number of points
    \12=0 'Counter
    \13=1 'maximum X move
    SLEEP 3 'Wait for wire to get up to speed
    IF #60=0 THEN MESSAGE INITIAL CONTACT ERROR:[Wire Off]:EXIT 'check for initial contact
    MACHHOME1 \677:MACHHOME2 \678 'store starting position
    :FINDXEDGE
    FEEDRATE 5
    'find edge in X
    POSITION 1;{\677+\13} :WAITUNTIL #60=0 :STOP
    FEEDRATE .5
    'back off edge slowly
    POSITION 1;{\677} :WAITUNTIL #60=1 :STOP
    TEACH 'Writes current position to teach.xyz file
    FEEDRATE 20
    'return to starting X
    POSITION 1;{\677} :WAITUNTIL STOP
    :INCREMENTY
    \12=\12+1 :IF \12>=\11 THEN GOTO :FININCREMENTY
    POSITION 2;{\678+(\12*\10)} :GOTO :FINDXEDGE
    :FININCREMENTY
    TEACH OFF
    [Wire Off] 'Turn Wire Off
    MESSAGE PROFILE FINISHED FILE CLOSED

    It all works exactly like I want, except each time the TEACH command is executed, I get an "Unrecognized Command" error. I hit OK, and the program resumes. This continues until the loop is complete.

    The way I interpret the manual, it is supposed to write the current location to a TEACH.XYZ file in the AS3000\WORK directory. I checked for the file and it didn't exist, so I created a blank one and re-ran the program. Same error.

    Are there other parameters or some modal that I need to set to get this command to work? Do I need to manually open the TEACH.XYZ file in the macro? I'll try creating a string variable and manually doing a FILEWRITE if I can't get TEACH to work - but it looks like it should do exactly what I want so I hate not to use it.

  2. #2
    Join Date
    Apr 2003
    Posts
    332
    squarewave,

    The key question is which command gives the "Unrecognized Command" ?

    This simply means you either mis-spelled a command or it doesn't exist in your version.

    We don't see any mis-spelled command at a glance. If it was the Unrecognized TEACH command, then this version dates back a while.

    Using FILEOPEN then FILEWRITE is an alternative to TEACH whereas you would use READOUT or MACHHOME to gather the current position and write them to a file name of your choice. You'll have to write a several line macro to accomplish this, but with the TEACH command it is automatic and opens the file for that was named on the TOOL PARAMETER screen. It gathers position , opens the file, formats the coordinates, checks for errors and writes to the file automatically.

    Tech Support
    CamSoft Corp.
    (951) 674-8100
    [email protected]
    www.cnccontrols.com
    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  3. #3
    Join Date
    Oct 2003
    Posts
    56
    The exact error message has "Fatal Error: Unrecognized Command Please Correct" in the top bar of the window and the single word TEACH in the window itself.

    I guess I was assuming it was a valid command since it is in my book and online help files. My version is 14.2.

    I'll start working on FILEWRITE logic.

    Thanks!

  4. #4
    Join Date
    Mar 2004
    Posts
    1542
    I'm using 15.4, the current version. (Probably a decimal point update sence my disk was sent) That's not very old, I'm sure TEACH was in the commands in version 14.

    Maybe try putting TEACH in an unused Mcode and put up a button to run this Mcode on your interface. Then try to record just for testing. (with the machine stopped at a known point,etc,etc)

    Just a wild guess here, but that error may be coming back from the operating system because the file couldn't be openned.

    Karl

Similar Threads

  1. Help teach G-code for rookie
    By HighOctane in forum G-Code Programing
    Replies: 16
    Last Post: 03-16-2006, 04:18 PM
  2. Proper Method To Shim?(for Tramming)
    By FLUTE HEAD in forum Uncategorised MetalWorking Machines
    Replies: 3
    Last Post: 05-23-2005, 04:46 PM
  3. Proper Planning Prevents Poor Performance
    By CamIam in forum DIY CNC Router Table Machines
    Replies: 2
    Last Post: 04-01-2004, 02:09 PM
  4. Help with picking proper software for computer
    By landart in forum Mach Software (ArtSoft software)
    Replies: 1
    Last Post: 03-29-2004, 09:18 AM
  5. Proper Computer and Chip for Mach 1
    By HomeCNC in forum Mach Software (ArtSoft software)
    Replies: 12
    Last Post: 03-18-2004, 04:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •