584,862 active members*
6,003 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Fadal > Macro commands not working over DNC
Page 1 of 2 12
Results 1 to 20 of 40
  1. #1
    Join Date
    Jun 2012
    Posts
    516

    Macro commands not working over DNC

    I have a CNC88, 1992, 1400-4 processor.

    all the fadal manuals that I have found state that macro commands are available in Auto, MDI, via DNC, and at the command line.

    I have some programs that use macros, which work great in Auto mode running from the machine's memory, but the macro statements in the same programs are ignored when run via DNC.

    More specifically, it seems that any statement with a # in front of it e.g.
    #PRINT "VARIABLE 1: ", V1
    #INPUT V99
    #V1=1.5
    #V5=V1-V3
    #FY1=FY1+V5

    these all get ignored when running DNC, but run ok in Auto from internal memory.

    it seems that the R variables still work when running DNC because I have a probing routine that stores a hole center in R1 and R2, then I rapid to R1, R2 as follows

    G0 X+R1 Y+R2

    this command gets executed correctly via DNC.

    All # type of statements get ignored via DNC - even though the manual says that they should work.... wtf

    any experience on this?

  2. #2
    Join Date
    Jun 2012
    Posts
    516

    Re: Macro commands not working over DNC

    I can re-confirm that macro statements are completely ignored by my control when running via DNC. I can run for example

    N10 # ANY STUPID GIBBERISH I WANT

    and the control just passes right by without throwing an error.

    is this because my 1400-4 processor is outdated and isn't up to spec with what is stated in the fadal manuals?

  3. #3
    Join Date
    Jun 2012
    Posts
    516

    Re: Macro commands not working over DNC

    even the 'legacy CNC88' manuals explicitly state that macro statements are available for use when in DNC mode.. the manual says so in the Communications section when it talks about DNC, and it also says so in the Macro section.

    there are some rules about DNC that I have never followed
    - 'comments are not allowed', my g-code has lots of comments which use the * symbol
    - no O numbers, my post spits out O numbers
    - no M30 at the end of the program, my post puts that out too.
    - line numbers are optional, my post spits out line numbers (not always consecutively)

    could it be my code isn't DNC format correct?

    speaking of formats, I run my code in format 2, maybe macros only work via DNC in format 1 (seems unlikely)?

    I am wondering if the control ignoring the macro commands when in DNC mode is some kind of setting, has to do with the baud rate?, might be NCFadal doing something weird / adding data that I don't know about? are the line numbers messing it up? as in - maybe if it sees the line number first, it doesnt count the # as the first character?

    I did try deleting a line number earlier and the machine stopped where it was and just said 'ERROR' with no further information.

    it's pretty baffling that the damn macro statements don't work over DNC

  4. #4
    Join Date
    Sep 2008
    Posts
    54

    Re: Macro commands not working over DNC

    I've had this same issue but with the engraving cycles. Running in format 1. I ended up just running the engraving as a seperate program stored on the machine and dnc'd the rest of the program like normal.

    Someday I hope to put a probe on mine like it seems you just did.

    Sorry I couldn't be more helpful.

    Sent from my SPH-L720 using Tapatalk 2

  5. #5
    Join Date
    Jun 2012
    Posts
    516

    Re: Macro commands not working over DNC

    Quote Originally Posted by rbjem View Post
    I've had this same issue but with the engraving cycles. Running in format 1. I ended up just running the engraving as a seperate program stored on the machine and dnc'd the rest of the program like normal.

    Someday I hope to put a probe on mine like it seems you just did.

    Sorry I couldn't be more helpful.

    Sent from my SPH-L720 using Tapatalk 2
    intersting about the fixed engraving subroutine - because I can run the L9101 (probe) fixed routine during a DNC program ok. Over DNC I cannot run subprograms via G98, and the manual says that there are no subroutines allowed - just fixed subs.

    As for probes, if I can get this macro DNC thing worked out, the probes will be excellent. hopefully my posts on the other thread about the probe install will help others either realize that it's not so hard, or be a good reference when you decide to put probes on the machine. I am wondering if the $200 probe on ebay that refers to mach 3 would be good? its so cheap that its worth a go if you're interested in probing. the renishaw system is a simple concept, built into a very well thought out design and very well made hardware.


    back on macro via DNC though - it just kills me that the old manuals and new manuals both say that you can do macro code via DNC. they don't even imply it; they out right / explicitly state that you can.

    I'll test out the formatting today, like getting rid of comments and line numbers. I just find it hard to believe that it will make a difference. maybe format 1 will allow it?

  6. #6
    Join Date
    Jun 2012
    Posts
    516

    Re: Macro commands not working over DNC

    I tried DNC with the formatting rules listed in the manual, and listed below here by me.

    the program that I ran is:

    Code:
    G90 G17 G40 G80 G00
    M64 M66
    G00 E1 G90 X3.95 Y-1.5
    G43 H21 Z1.5
    Z0.0759
    X4.55 Y-1.5
    L9101 R1+9. R2+.0024 X.001 Y-.0021
    L9101 R1+1. X4.7992 Y-1.5 F50. P1
    G0 X3.95 Y-1.5
    X3.65 Y-0.9804
    L9101 R1+9. R2+.0024 X.001 Y-.0021
    L9101 R1+1. X3.5254 Y-0.7646 F50. P2
    G0 X3.95 Y-1.5
    X3.65 Y-2.0196
    L9101 R1+9. R2+.0024 X.001 Y-.0021
    L9101 R1+1. X3.5254 Y-2.2354 F50. P3
    L9101 R1+2.
    G0 X+R1 Y+R2
    #V1=FX1
    #V2=FY1
    #V3=3.95
    #V4=-1.5
    #V5=R1-V3
    #V6=R2-V4
    #FX1=FX1+V5
    #FY1=FY1+V6
    G0 Z1.5
    M05 
    G00 G90
    G49 Z0
    E0 X0 Y0
    M6 T21
    E1
    the program just terminates when it reaches the first # line, and the machine is just left sitting where it was at the time, and the command line pops up. I switched to format 1 in setp and ran this agian, no change - terminates abruptly at the first # line

    I also found that my control won't display the macro variable values when you enter DV from the command line.

    Additionally, at the very bottom of the MU function, I found what I believe is the software version? on my machine its: 91.2W-3, format 2. Another piece of info is that I cannot run DNC any faster than 34k baud; the manuals say that you can select faster from the command line by typing CB, 11 or CB, 12. my control just gives an error 'parameter error' when I try to do this. I am concerned that my machine must be from some kind of 'transition' year where my control is mashed together with various revisions of PCBs, and an old piece of software.

    can anyone let me know what this version number means? I have a 1400-4 cpu. thanks.

  7. #7
    Join Date
    Jun 2012
    Posts
    516

    upgrading the software eeprom on the 1400-4 board

    looks like you can shove a different software eeprom onto the 1400 board. I'm wondering, what are the consequences of updating the software?

    it seems obvious that I'll need to backup my setp, backlash, and ball screw pitch correction values.

    is there other data that needs to be transferred into the new software?

    anybody know which is the newest software that is compatible with the 1400-4? there are some pcb-0094's on ebay right now with the 96 version software (hopefully that'd bring me more up to date and allow me to use macros over DNC)


    looks like my eeprom board is a 1610-0, sys91 board. the next board that I see is the sys96 board which is the one that I found on ebay. it is unclear about which board will go onto which processor, but there is a 1400-4 board on ebay that has a sys96 software board plugged into it in the pictures.

    after digging around some more it looks like the 1610-0 card was used with the 1400-2 processor. I am suspicious that the previous owner of my machine upgraded to the 1400-4 cards. all the cards in the machine (like the axis controllers, etc) are the -4 versions. maybe they upgraded the processor, but never put on the newer 1610 software upgrade eeprom?

  8. #8
    Join Date
    Jun 2007
    Posts
    3757

    Re: Macro commands not working over DNC

    Only a guess, but you might try initializing V1..V6, R1,R2 and FX1,FY1 to some value VERY early in the program before other internal (invisible to you) temporary variables are created.
    Using a variable, before declaring it, in most languages can do strange things, as the variables have random values or just don't exist.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  9. #9
    Join Date
    Jun 2012
    Posts
    516

    Re: Macro commands not working over DNC

    Quote Originally Posted by neilw20 View Post
    Only a guess, but you might try initializing V1..V6, R1,R2 and FX1,FY1 to some value VERY early in the program before other internal (invisible to you) temporary variables are created.
    Using a variable, before declaring it, in most languages can do strange things, as the variables have random values or just don't exist.
    this is a good thought. trouble is, is that the program will just exit if I try to do:

    #CLEAR V1-V6

    .. stupid DNC. it exits on seeing the # symbol when there are no line numbers in the file. if there are line numbers, it just skips over all the ones with # in it.

    I bought the system 96 software eeprom and intend to upgrade next week - i started another thread for that topic - seems different enough. I hope i am not making a big assumption here - but it seems that my system 91 eeprom is just too old to be compliant even with the 'legacy cnc88' manual

  10. #10
    Join Date
    Jun 2007
    Posts
    3757

    Re: Macro commands not working over DNC

    Not #CLEAR. Try V1=0, etc.
    #CLEAR probably removes/deallocates the variable from memory and frees up a memory slot.

    edit:
    EXAMPLE:
    #CLEAR This zeroes all macro variables
    # CLEAR V1 This line will zero only variable
    # CLEAR V1-V20 This line will zero variable
    # CLEAR V3-V7,V15,V30,V45-V60 This line
    then V15 and V30, then V45 through V60
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  11. #11
    Join Date
    Jun 2012
    Posts
    516

    Re: Macro commands not working over DNC

    Quote Originally Posted by neilw20 View Post
    Not #CLEAR. Try V1=0, etc.
    #CLEAR probably removes/deallocates the variable from memory and frees up a memory slot.
    its like I said earlier though, I can program:

    #HEFFALUMPS AND WOOZLES

    and the program will either skip the line if there are line numbers, or it will exit if there are not line numbers. anything with a # doesn't get used when run over DNC, works great when run from internal memory

  12. #12
    Join Date
    Jun 2007
    Posts
    3757

    Re: Macro commands not working over DNC

    Try V1=0, etc without the #.
    I just had a look in old Bosch manuals, and it requires all the variables, etc to initialized before executable code, and this I remember from using DNC stuff.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  13. #13
    Join Date
    Jun 2012
    Posts
    516

    Re: Macro commands not working over DNC

    Quote Originally Posted by neilw20 View Post
    Try V1=0, etc without the #.
    I just had a look in old Bosch manuals, and it requires all the variables, etc to initialized before executable code, and this I remember from using DNC stuff.
    I have to admit that I have not tried to run the macro statements without the # sign. the idea freaks me out because if you were to do for example, a math operation like V1=V2*V3, it should make a comment out of the V3 portion.

    I will try this immediately though - in a sense, declaring the variables at the start.

  14. #14
    Join Date
    Jun 2012
    Posts
    516

    Re: Macro commands not working over DNC

    Quote Originally Posted by mflux_gamblej View Post
    I have to admit that I have not tried to run the macro statements without the # sign. the idea freaks me out because if you were to do for example, a math operation like V1=V2*V3, it should make a comment out of the V3 portion.

    I will try this immediately though - in a sense, declaring the variables at the start.
    I tried some different things:

    V1=0

    #V1=0

    N40 #V1=0

    N40 V1=0

    I tried all these kinds of calls with the SETP parameter for line numbers in order set to On, and Off.

    the lines without # stop the program and say 'ERROR'
    the lines with # but with no line numbers stop the program and say 'ERROR'
    the lines with # but with line numbers just get skipped entirely.

    I also learned something interesting, when you have the SETP parameter for lines in order set to off / not in order, when you load a program into the CNC memory (not DNC, just a transfer) it adds line numbers, even though there may already be line numbers.

    I found that any line, when run from memory, that has two line numbers e.g. N10 N310 #V1=0 (or any other macro statement) gets ignored by the control, but lines with two line numbers e.g. N10 N320 G0 X0, get executed. interesting.

    problem still not solved tho

  15. #15
    Join Date
    Jun 2007
    Posts
    3757

    Re: Macro commands not working over DNC

    RTFM.
    Read The F#$%#$%^&riendly Manual in detail. It will clearly state the rules somewhere hidden in all the miscellaneous cr4p.
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  16. #16
    Join Date
    Jun 2012
    Posts
    516

    Re: Macro commands not working over DNC

    Quote Originally Posted by neilw20 View Post
    RTFM.
    Read The F#$%#$%^&riendly Manual in detail. It will clearly state the rules somewhere hidden in all the miscellaneous cr4p.
    believe me I have. I've read all the fadal manuals that I can find including a 1980's paper copy. if it were that simple, the problem wouldn't have been posted here.. hopefully the software update next week will put this to rest.

  17. #17
    Join Date
    Jun 2007
    Posts
    3757

    Re: Macro commands not working over DNC

    EXAMPLE:
    N12 R8+50.0 This is variable R8 defined as 50.0
    N13 F+R8 The R8 transfers a value of 50.0 for the feed rate

    Note:
    Variables must be defined in the beginning of the program or just before
    they are used in the program. Variables are modal and retain their values
    after the termination of a program, after an HO, and after exiting from MDI.
    R variables do not have table storage like macro V variables. The
    programmer should always specify a value for an R variable; otherwise, the
    last programmed value will be used and will result in unpredictable
    machining.
    It appears that comments are anything after, and including '('

    Black boxes below are PDF's Full manual and Macro section
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  18. #18
    Join Date
    Jun 2012
    Posts
    516

    Re: Macro commands not working over DNC

    Quote Originally Posted by neilw20 View Post
    EXAMPLE:
    N12 R8+50.0 This is variable R8 defined as 50.0
    N13 F+R8 The R8 transfers a value of 50.0 for the feed rate

    Note:
    Variables must be defined in the beginning of the program or just before
    they are used in the program. Variables are modal and retain their values
    after the termination of a program, after an HO, and after exiting from MDI.
    R variables do not have table storage like macro V variables. The
    programmer should always specify a value for an R variable; otherwise, the
    last programmed value will be used and will result in unpredictable
    machining.
    It appears that comments are anything after, and including '('

    Black boxes below are PDF's Full manual and Macro section

    thanks for the links - i already have these manuals and have read that paragraph before though. interestingly the R words seem to work over DNC, but any macro statement involving a # doesnt. and you have to use # to use any variables like V1, or more importantly FX1, FY1. I said below that the R words work. I use the L9101 R+1., and L9101 R+2. fixed subs already over DNC, and I use the R values generated by those subs just after they are run as in G0 X+R1. Y+R2. and that works just fine.

    I need to use the V variables, and the FX, FY etc. variables over DNC, or I cannot do enough math, and cannot store the results of the math in the fixture offsets. I don't want to be rude, but I spelled all this out already in this thread in as much detailed language as I know how to generate.

    I am suspicious that the macro codes do work over DNC for those with a slightly newer software version - which is more likely to be up to date with the manuals.

  19. #19
    Join Date
    Jun 2007
    Posts
    3757

    Re: Macro commands not working over DNC

    Now I've had a look in the manual, you really are pushing it up hill with a paddle. Life was not so easy in those days!! And I remember it, but the Bosch controller was fairly friendly in comparison.

    From page 401. The signs don't make sense? Compare line 13 and 15? They were the good old days. !!

    EXAMPLE:
    N13 R1 + 10. R2 + 5. (R1 AND R2 ARE ASSIGNED VALUES
    N14 R3 + 7.5 R4 + 5.5 R5+ 0 (R3, R4 AND R5ARE ASSIGNED VALUES
    N15 X - R1 Y + R2. G1 F34. (THIS LINE READS X10. Y5. G1 F34.
    N16 X + R3. I - R4 J - R5 G3 (THIS LINE READS X7.5 I5.5 J0 G3

    Good luck. Is it possible to keep the calculations at the pre-dnc end of the world, even if a little bit long and stringy, repetitive code?
    Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.

  20. #20
    Join Date
    Jun 2012
    Posts
    516

    Re: Macro commands not working over DNC

    Quote Originally Posted by neilw20 View Post
    Now I've had a look in the manual, you really are pushing it up hill with a paddle. Life was not so easy in those days!! And I remember it, but the Bosch controller was fairly friendly in comparison.

    From page 401. The signs don't make sense? Compare line 13 and 15? They were the good old days. !!

    EXAMPLE:
    N13 R1 + 10. R2 + 5. (R1 AND R2 ARE ASSIGNED VALUES
    N14 R3 + 7.5 R4 + 5.5 R5+ 0 (R3, R4 AND R5ARE ASSIGNED VALUES
    N15 X - R1 Y + R2. G1 F34. (THIS LINE READS X10. Y5. G1 F34.
    N16 X + R3. I - R4 J - R5 G3 (THIS LINE READS X7.5 I5.5 J0 G3

    Good luck. Is it possible to keep the calculations at the pre-dnc end of the world, even if a little bit long and stringy, repetitive code?
    thats got to be a typo right? the minus sign makes the variable negative.

    I will have trouble using internal memory, even if I buy an upgrade as my 1400-4 processor will only handle up to 422K. some of the g-code files that I use are up to 5 MB, and the probing routines will only make them bigger. There are memory upgrades up to 16MB, but those only work with the 1400-5 processor, and an upgrade to that -5 system requires replacing Many boards not just the processor so it'd cost me $6K or something. So, while all the macro stuff works great from internal memory, it's not brilliant. I could certainly run the probing stuff from internal memory as long as it was a pre-cutting setup probe cycle (no in program probing, which is a huge disadvantage). then I'd run the cutting over DNC as usual.

    Here are a couple of screen shots from the older 'legacy cnc88' manual which should be more appropriate for my use vs. the other modern fadal manuals that are widely available on every fadal vendor website; that being said the text from this 'old' manual and the text form the newest manuals are word for word the same. also, most things haven't changed a bit since day 1 - the paper manuals that I have that came with my machine are from the late 80's and they have word for word text in them to vs. the new manuals on the vast majority of sections, including probing! my 80's manual doesn't even have a macros section though.

    the two screen shots show where the 'old' manual says that macro variables are allowed in DNC its very explicitly stated that macros should work via DNC. one is in the macro section, the other is in the DNC section.

    Attachment 232280

    Attachment 232282

    hopefully my intuition that my software is too old is correct, and that the newer software will do what tthe manuals say it will do. we shall see next week. or maybe what the manual should have said was, marcors are allowed in DNC, but won't do sh*t for you! who knows. it'd be great if someone with a newer fadal would go test this out for me. just DNC a file:

    %
    N01 #V1=2.0120
    N02 #PRINT "V1: ", V1
    N03 #INPUT V99
    %

    the program should display

    V1: 2.0120

    then you hit enter and then the program should exit back to the command line. no machine motion will happen at all. if it prints out that statement, then macros work for you over DNC, if it doesnt, then macros don't work over DNC for you (or for me). your machine must have software newer than 91.2w-3, or the test is of no value - should be easy, my machine is old.

Page 1 of 2 12

Similar Threads

  1. Replies: 2
    Last Post: 12-19-2012, 01:28 PM
  2. Replies: 3
    Last Post: 02-13-2012, 07:20 PM
  3. Dos Commands
    By LYN BYRD in forum Milltronics
    Replies: 12
    Last Post: 08-01-2011, 04:21 PM
  4. G2 and G3 Commands
    By Bohemund in forum G-Code Programing
    Replies: 19
    Last Post: 05-28-2007, 03:12 PM
  5. EMC & the G28/G30 Home commands
    By Javelin276 in forum LinuxCNC (formerly EMC2)
    Replies: 1
    Last Post: 07-18-2005, 09:13 PM

Tags for this Thread

Posting Permissions

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