Newbie Correct format for conditional expressions


Results 1 to 5 of 5

Thread: Correct format for conditional expressions

  1. #1
    Member
    Join Date
    Feb 2008
    Location
    Libya
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default Correct format for conditional expressions

    Hi,
    I'm trying to implement software to simulate Fanuc macro B. I read many Fanuc documentation however none gave much information about constructing valid conditional expressions in formal way. Can anybody who has access to Fanuc controller check if expressions such are valid?

    IF [#2 - #3 GT 5 * #4] GOTO 1
    IF [#2 - #3 GT 5 ] GOTO 1
    IF [ #3 GT 5 * #4] GOTO 1

    I know that if the 1st expression is written as [[#2 - #3] GT [5 * #4]] it would sure be valid. I'm asking just in attempt to decipher the underlying format rules which Fanuc keeps as top secret!

    Similar Threads:


  2. #2
    Member
    Join Date
    Feb 2008
    Location
    Libya
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default Re: Correct format for conditional expressions

    Anybody can help?



  3. #3
    Member
    Join Date
    Dec 2005
    Location
    US
    Posts
    504
    Downloads
    0
    Uploads
    0

    Default Re: Correct format for conditional expressions

    In my limited macro-b experience, Fanuc is very particular on syntax, especially the proper use of brackets. I don't think your non-bracketed examples would be allowed by the control. Personally, if I was writing an interpreter or simulator I'd enforce strict syntax so when the program is moved to the machine it is guaranteed to run.

    Do you have a copy of the book Fanuc CNC Custom Macros by Peter Smid?



  4. #4
    Member
    Join Date
    Feb 2008
    Location
    Libya
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default Re: Correct format for conditional expressions

    Thanks for the response and advice. I have Smid's book and a few others however I can't find a source that documents the syntax precisely like programming languages' docs. Fanuc docs lacks a lot of detail about macro programming. For example how AND, OR, XOR deal with negative arguments or argument that is bigger than can be fit in 32-bit integer..etc



  5. #5
    Member
    Join Date
    Feb 2008
    Location
    Libya
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default Re: Correct format for conditional expressions

    Useless forum indeed or possibly I should have picked more suitable username



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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Correct format for conditional expressions

Correct format for conditional expressions