585,922 active members*
3,784 visitors online*
Register for free
Login
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2010
    Posts
    21

    Citizen A220 sub-programs

    Has any out there running a Citizen A220 experienced problems getting a sub-program to work. I load the main program and the sub-program in the control. I call the sub-program up in the main program with a M98 P1162. I have the sub-program,O1162, loaded in the control, but when the program gets to M98 P1162 it alarms out saying the file doesn't exist. The information in the sub-program is only in $1 and I wrote it using WIN-CNC. W doesn't my program see the sub-program?

    Main programsection)

    (LETTERING-1ST SEGMENT)
    M5
    M18C0.
    M80 S3=4500
    T909(1/32 BALL)
    G50 W-.5905
    G98
    M98 P1162
    G50 W.5905
    M82
    G99


    Sub-program:
    O1162(C)
    (C)G0C-23.291Z.6394
    H11.6455W.0833
    G1X.3075F5.
    H-11.6455F2000.
    H11.6455
    H-11.6455W-.0208
    W-.0416F5.
    H11.6455W-.0208F2000.
    H23.291
    H11.6455W.0208
    W.0416F5.
    H-11.6455W.0208F2000.
    G0X.4075
    M99

  2. #2
    Join Date
    Jun 2010
    Posts
    49

    sub prg

    I do not see it in the posted example but man readables at the end of the m98p line sometimes cause the machine to see it as part of the program name that you are trying to call up.Precent signs in the wrong place can cause issues as well.I have opened the program in notepad and found characters not shown in win-cnc.Also I have seen multiple asteriks in man readables that have caused issues as well.
    Good luck

  3. #3
    Join Date
    Oct 2008
    Posts
    31
    You could try using simple macro command and use a subroutine rather than loading external subprogram. This way all data is kept in one program - eg

    (LETTERING-1ST SEGMENT)
    M5
    M18C0.
    M80 S3=4500
    T909(1/32 BALL)
    G50 W-.5905
    G98

    #500=0 - Set up variable argument
    GOTO100 - Jump to line N100
    N200 - After subroutine is run machine jumps back to here

    G50 W.5905
    M82
    G99


    End of $1 program

    N100
    (C)G0C-23.291Z.6394
    H11.6455W.0833
    G1X.3075F5.
    H-11.6455F2000.
    H11.6455
    H-11.6455W-.0208
    W-.0416F5.
    H11.6455W-.0208F2000.
    H23.291
    H11.6455W.0208
    W.0416F5.
    H-11.6455W.0208F2000.
    G0X.4075

    IF[#500EQ0]GOTO200 - We set #500 to 0 earlier so argument is correct

    If you see macro softkey under offset page you have macro option enabled

    good luck

  4. #4
    Join Date
    Mar 2010
    Posts
    21
    Thanks for the response to my problem. What are "man readables"? I think there is something the machine sees that I do not see on the screen. I do need to add a percent sign at the end of the sub-program that WIN-CNC outputs. I talked to the distributer aplications engineer and he doesn't see a problem with the code but experienced the same problem on his machine when I sent him my programs. He loaded my programs on his machine, physically deleted the M98 P line and rewrote the code on the machine and it worked fine. I don't want to have to do that everytime I want to run a sub-routine. If the code looks good on the computer, it should work on the machine.

  5. #5
    Join Date
    Mar 2010
    Posts
    21
    Thank UK-Engineer,

    I ended up writing the programs like you had suggested and it worked good. The sub-programs are text that change all the time and I don't want to have to keep editing the main program. For now the program is working fine but I really want to know why my machine won't read a simple M98 command. Sometimes it works and sometimes it doesn't. There must be something behind the scene that I'm not seeing. Thanks again for your help.

  6. #6
    Join Date
    Oct 2008
    Posts
    31
    Typical A20 inch machining data - raw data viewed in windows notepad or similar (you won't see #016,#020 on screen only values in mc data screen)

    D
    #016=0000007500 - Bar size
    #020=0000001000 - Tool pos pnt
    #024=0000015000 - Mc Length
    #028=0000001000 - Pcs per chuck
    #032=0000001000 - Cut off tool
    #036=0003000000 - Cut off rpm
    #040=0000000020 - Cut off feed
    #044=-000000800 - Cut off end point
    #076=0000000000 - Front mc holder name
    #048=0000005000 - Back drill holder
    #052=0000004000 - Back spindle
    #060=0000601000 - Back chuck extend length
    #064=0000201000 - Back work extend length
    #068=0000000000 - Unused

    the control on your machine is quite intolerant if some of the above data is incorrect.

    If i was to hazard a guess as to your M98 problem i'd say it was some of this data was in wrong format or even missing from your subprogram

Similar Threads

  1. Citizen A220 External M Code Relays
    By danrudolph in forum CITIZEN Machines
    Replies: 5
    Last Post: 02-04-2019, 04:55 PM
  2. Citizen L20
    By humbertocnc2007 in forum CNC Swiss Screw Machines
    Replies: 8
    Last Post: 06-19-2012, 01:31 AM
  3. Citizen L20
    By Tornos100 in forum CNC Swiss Screw Machines
    Replies: 1
    Last Post: 04-24-2010, 06:52 AM
  4. Citizen L20,L25
    By humbertocnc2007 in forum CNC Swiss Screw Machines
    Replies: 6
    Last Post: 02-18-2010, 01:17 PM
  5. Citizen E32J Fanuc 6T sample programs
    By championfine in forum CNC Swiss Screw Machines
    Replies: 3
    Last Post: 01-14-2010, 05:07 PM

Posting Permissions

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