The "I" macro variable


Results 1 to 17 of 17

Thread: The "I" macro variable

  1. #1
    Registered
    Join Date
    Feb 2005
    Location
    USA
    Posts
    143
    Downloads
    0
    Uploads
    0

    Question The "I" macro variable

    Hello guys.
    I am trying to write a program that uses the I macro variable. Not I as in IJK, this is I as in IO.
    Section 18 of the manual says that the I(x) macro will return the state of various inputs to the control and I am looking specifically at I(7), the touch probe state.
    (I am aware of and do not want to use G31, G31.1, L9101, etc - simply want to know the status of the probe without making a move)

    I've tried a bunch of things to get the value of I(7) into a variable, including
    V5=I(7) like written in the manuals, and V5=I7 like referencing a fixture offset "FX3" for example. Anyway, it just keeps barfing on the code telling me that I have an error.

    I know there must be a way to accesss these functions, else why would they be in the manual ?

    One thing I think of now that I didnt try would be
    #IF ( I7 ) THEN GOTO :TURNONPROBE

    Any thoughts oh great gurus ?? Maybe my brain just isn't working but I could use a little pointer here!


    Similar Threads:


  2. #2
    Registered fizzissist's Avatar
    Join Date
    Apr 2006
    Location
    USA
    Posts
    3206
    Downloads
    0
    Uploads
    0

    Default

    I think the easiest thing for us gurus (...place ROFLMAO smiley here...) would be for you to place what code you've got so far here so we can see if it's a simple syntax issue...

    Looks to me like I(7) is the probe, an absolute, and changing the number is a hard function change, so you don't really treat "I" like a variable in the sense of assigning a changing value.

    Me thinks an If-Then GoTo statement should work, but the TURNONPROBE is where the I(7) would be invoked....

    Neil?????



  3. #3
    Mfg Engineer Scott_bob's Avatar
    Join Date
    Nov 2003
    Location
    United States
    Posts
    459
    Downloads
    0
    Uploads
    0

    Default

    another common issue with the Fadal macro is this little command:

    WAIT

    I forget the proper syntax, but you should be able to see that in your manual. It seems that sometimes the processor needs a delay which the "wait" command provides. Give this a try, remember one change at a time so you can figure out what is going on.

    Scott_bob


  4. #4
    Registered fizzissist's Avatar
    Join Date
    Apr 2006
    Location
    USA
    Posts
    3206
    Downloads
    0
    Uploads
    0

    Default

    If you have someone else running the parts, you could program in a variable 'G4 Pnn' (pause) command, where 'nn' is set to change relative to the number of cycles, or the operator inputs his age....us older guys get a longer pause...
    Haven't figured out how to make it a random number, but that could drive an operator nuts!

    Actually, you may have a point, where the system needs some time to react...but since I'm not using my probe that way, I should just shut up and let somebody address this that knows...



  5. #5
    Registered
    Join Date
    Feb 2005
    Location
    USA
    Posts
    143
    Downloads
    0
    Uploads
    0

    Default

    Ok guys I can give a little more info for this one. First off this is on a legacy 88HS (which I really like BTW)

    The I(x) function is supposed to return a 1 or 0 based on the status of various control inputs. Like : is the probe touching ? is the door open ? is there enough lube in the reservoir ? is the spindle oriented ? toolchanger home ? etc....

    I(x) is only an input. Can not assign it a value. Related values: O(x) are outputs, and G(x) is status of modal g-codes.


    In my specific application, I have a probe that will turn itself off after a couple of minutes. One of those Renishaws with a centrifrugal switch- to turn it on you run it at 400RPM for a second, then stop and lock the spindle.
    When the probe turns itself off, it goes into a "TOUCH" state. When it is on and clear of the workpiece, it is "NO TOUCH".

    So my goal is to look at the state of the probe, and if it is on then I don't need to reinitialize it. Not a huge deal but it can save perhaps 10 seconds per part - and there are enough parts to make that savings very attractive.

    The I(7) will also let me verify that the probe has turned on. Currently I use a really clunky routine for that, and getting it down to one line would be sweet.

    English bastardized code, showing what I'd like to accomplish:
    Code:
    L0100 (Subroutine: is probe on? if not turn it on
     M6T18 (load probe into spindle
     :IsItOn
     #WAIT;  ( be sure the evaluation is done realtime, not buffered
       IF (probe = touch) then goto :TurnOnProbe
        IF (probe = notouch ) then goto :AlreadyOn
         :TurnOnProbe
         S350 M3
         G4 P1000
         M19
         goto :IsItOn (verify that it turned on)
       :AlreadyOn
     M17 (end of L100)
    Would also add something saying after 3 failed attempts wait for the operator, etc.

    I have no problem with the gotos, subs, etc. Actually pretty proud about writing smart programs - wrote one last week that probed and identified the workpiece as one of 4 different parts and machined to suit. Just having a devil of a time getting it to acknowledge the I(x) variable!

    I have tried the following code with no luck.
    #V5=I7 ; letter-number like used with D, P, or FX array variables
    #V5=I(7) ; letter-number in parenthesis like the example in the book

    I'll give it three more headsmacks before I call Fadal. Mostly cuz I'm embarassed that I am missing like one charachter or something and Neal will laugh at me :-)



  6. #6
    Registered
    Join Date
    Feb 2005
    Location
    USA
    Posts
    143
    Downloads
    0
    Uploads
    0

    Default

    If you have someone else running the parts, you could program in a variable 'G4 Pnn' (pause) command, where 'nn' is set to change relative to the number of cycles, or the operator inputs his age....us older guys get a longer pause...
    Haven't figured out how to make it a random number, but that could drive an operator nuts!
    Not to derail my own thread, buuuuuutttttt:

    Code:
    #R9=CP
    G4P+R9
    CP is the clock value for total time the control is on :-)
    I use CR (total time in run mode) to generate serial numbers for parts.
    CC is the time spent so far on the current part.

    HTH!



  7. #7
    Registered Neal's Avatar
    Join Date
    Mar 2003
    Location
    Chatsworth, Ca
    Posts
    900
    Downloads
    0
    Uploads
    0

    Default

    Shizzlemah--
    I don't laugh at people (well maybe a little). Play with this concept:
    #v32= I(7)
    #IF V32=0 THEN GOTO :CONTINUE
    #IF V32=1 THEN GOTO :TURNONPROB
    Neal



  8. #8
    Registered
    Join Date
    Feb 2005
    Location
    USA
    Posts
    143
    Downloads
    0
    Uploads
    0

    Default

    N1 O1111 (I(X) TEST
    N2 #PRINT I(7)

    or

    N2 #V32=I(7)

    or

    N2 #V32=I7

    or

    N2 #O(2)=1

    or

    N2 #V32 = G(1)

    all give me "Illegal Expression In Line"

    Anyone have an actual code snippet that I can try ??

    This is on version 96.1B4-3 if that matters.


    PS: Neal, you can laugh, esp when I order that 4meg ram upgrade!



  9. #9
    Mfg Engineer Scott_bob's Avatar
    Join Date
    Nov 2003
    Location
    United States
    Posts
    459
    Downloads
    0
    Uploads
    0

    Default

    Shizzy,

    That's when I'll laugh...
    Let's see you could fly round trip 1st class, from New York to LA for what Fadal wants for that 4 Meg upgrade...

    Scott_bob


  10. #10
    Registered
    Join Date
    Feb 2005
    Location
    USA
    Posts
    143
    Downloads
    0
    Uploads
    0

    Default Actually

    I'll be buying the memory - That's the funny part! 4 Meg for the price of 10 Gig. But what can I say, this Fadal makes money and hasn't been down at all in the 2 years it's been here.

    Although I'd really freakin' love to save 8-10 seconds on each part with the damn I(7) variable....



  11. #11
    Registered Chi-town CNC's Avatar
    Join Date
    Dec 2006
    Location
    USA
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default Error when trying to #PRINT I(7)

    I have 4 fadals in the shop. 2 of them give an error when #PRINT I(1) for example is programmed. 2 of them work fine. Of the 2 that display the value, one is a CNC 88 HS and the other is a "Multi Processor CNC" that I am unsure of its actual model. The remaining 2 that don't work are CNC 88 HS.

    All four of the machines can use Macro language, so I'm a bit stumped too. Factory Option???

    Jet engine is next!
    http://www.floridaame.org/GalleryPages/g1m0186.htm


  12. #12
    Registered
    Join Date
    Mar 2010
    Location
    milwaukee,wi,usa
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default

    it may have something to do with want version software and cpu are in the machines,sometimes the factory had to write several verisons of software untill all the little glitches were corrected.look at the cpu and see what type it is and what software module is on it.



  13. #13
    Member
    Join Date
    Oct 2008
    Location
    United States
    Posts
    1632
    Downloads
    0
    Uploads
    0

    Default Re: The "I" macro variable

    Anyone figure this out? Same issue, trying to read the status of the user inputs.
    V30=I(7) Illegal Expression.



  14. #14
    Member
    Join Date
    Oct 2008
    Location
    United States
    Posts
    1632
    Downloads
    0
    Uploads
    0

    Default Re: The "I" macro variable

    Anyone figure this out?&nbsp; Same issue, trying to read the status of the user inputs.<br>V30=I(7)&nbsp; &nbsp;Illegal Expression.

    Mine is software version 94.1P-3 on a -4 CPU board.



  15. #15
    Member
    Join Date
    Oct 2008
    Location
    United States
    Posts
    1632
    Downloads
    0
    Uploads
    0

    Default Re: The "I" macro variable

    FYI,
    I had to upgrade to 101.4 for the I() and O() words to work.



  16. #16
    Member RaptorRed10's Avatar
    Join Date
    Jun 2018
    Posts
    7
    Downloads
    3
    Uploads
    0

    Default Re: The "I" macro variable

    Re 101.4 upgrade, was this done on the 1400-4 or did you need to upgrade to a -5?



  17. #17
    Member
    Join Date
    Oct 2008
    Location
    United States
    Posts
    1632
    Downloads
    0
    Uploads
    0

    Default Re: The "I" macro variable

    I installed it on a -4 cpu and it worked fine.



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

The &quot;I&quot; macro variable

The &quot;I&quot; macro variable