585,902 active members*
4,396 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008
    Posts
    4

    help with macros

    I need to determine for sure whether or not my machines are capable of using macros.
    I tried putting the statement #501=#501+1 into all of the controls and it worked on some and not on others. I know this would be how a fanuc control would read in a macro since I've done the most programming on a fanuc but I'm not sure about the others. Should this statement work in most controls?

    The machines I have (and thier controls):
    Horizontal MCs:
    OKK KCH-500 (OKK Neomatic)
    Mazak Mazatech H-400 (Mazatrol M32)
    Cincinati 10HCR (Vickers Acramatic 2100)
    Enshu JE80S (Fanuc Series 18i-MB)
    Vertical MCs:
    Cincinati Lancer (Cincinati Milacron Acramatic 2100)
    Cincinati Arrow (Cincinati Milacron Acramatic 2100)
    Horizontal Lathes:
    OKUMA LB15C (OSP5020L)
    OKUMA LB15U (OSP5020L)
    OKUMA Cadet (OSP700L)
    OKUMA L470M (OSP-P200L)
    Gantry Style MC:
    Okuma MCM-B (Okuma OSP7000M)

    Thanks for any help you can provide!

  2. #2
    Join Date
    Feb 2006
    Posts
    992
    well simple test just type in #100 in MDI and start, if you don't get an alarm then machine has macro option. However double check with your manual, because some machine has difference format. For example, Fadel is v1=xxx and for Seimen @K1=xx so check your manual for further detail.

    I havn't use Okuma before, so I don't know.......
    The best way to learn is trial error.

  3. #3
    Join Date
    Apr 2006
    Posts
    822
    All Okuma machines have what is called "User task 1"
    This gives you basic "macro" style programming abilities but can be a little bit restrictive at times.
    Most of the Okuma machines I have worked with have had "User Task 2" as a added option, thus giving access to more features.
    I can not remember what the differences are off the top of my head, but depending on what it is you wish to do I do not think it should be too much of a problem. If I remember I will find out for you.
    Okuma does not use the #100 type of construct for its variables, it uses "common varaibles" by way of V1..V32 for variable 1 through to V32 (this being on the lathes that we have) and VC1..VC200 on the mills. One older mill only has VC1..VC128 but that is more than enough anyway.
    You can also use user created variable names within your program if you do not need to "keep" your variables after the program has run.
    User defined names can be no longer than 4 characters long and mus start with an Alpha character not a number. i.e. TEST is fine but 1TXT is not.
    There is a few other things with naming variables that also put a stop to the system real quick, like starting variables with the letter "O", there are others but I do not recall the list at home here.
    Passing variables into a sub routine is very easy, returning results is not.
    If I need to return a value I usually use a common variable to do so.
    User variable names are only "visible" within the program that is using it at the time same as for subroutines, i.e. the variable SIZE in the main program can be different to the the variable "SIZE" in a subroutine. Thus you can pass a value into a sub program like
    N100 SIZE=100.25 (CREATE AND SET A VARIABLE CALLED SIZE)
    N102 CALL OMILL SIZE=SIZE and the sub program variable is passed the information from the calling program.
    Mind you, you can also call the sub like this:
    N100 CALL OMILL SIZE=100.25 and this would be the same.
    Use of the Common Variables is simple.
    Assumming you have a number set in the parameter page for the common variables on Variable 1 then you can position the machine thus:
    G0 X=VC1 or G0 X=V1 (depending on your machine)
    All the usuall maths functions are available within the Okuma User Task language, but I seem to recall that Trig functions are only available in User Task 2. Easy to test tho... in MDI type in VC1=SIN[30] press write and cycle start and see what comes up in VC1 if the machine does not alarm out you are in luck... otherwise?
    Hope this helps
    Brian.

Similar Threads

  1. macros
    By bob@apc in forum Mazak, Mitsubishi, Mazatrol
    Replies: 2
    Last Post: 02-04-2008, 06:42 PM
  2. Help with macros
    By afterburn25 in forum Haas Mills
    Replies: 4
    Last Post: 04-09-2007, 02:19 PM
  3. Macros
    By cncfreak in forum Uncategorised CAM Discussion
    Replies: 24
    Last Post: 05-06-2005, 11:04 PM
  4. macros
    By toyoda in forum Uncategorised CAM Discussion
    Replies: 0
    Last Post: 05-30-2004, 10:56 AM
  5. Macros
    By MachineSMM in forum Uncategorised CAM Discussion
    Replies: 2
    Last Post: 06-20-2003, 06:41 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
  •