Page 1 of 2 12 LastLast
Results 1 to 12 of 15

Thread: work shift program

  1. #1
    Registered
    Join Date
    Jan 2010
    Location
    Norway
    Posts
    88
    Downloads
    0
    Uploads
    0

    Default work shift program

    Since fanuc only has work shift G54-G59 i want to create a program where i can store my work shift coordinates, would this be possible and how would it look like?
    I need this because i have many part's that uses the same work shift's and if i need to change one i would need to manually change them all.
    So let's say work shift program has 20 lines of different work shift's how would i read work shift 4 from main program?

    Similar Threads:


  2. #2
    Registered dcoupar's Avatar
    Join Date
    Mar 2003
    Location
    USA
    Posts
    2709
    Downloads
    0
    Uploads
    0

    Default

    What model Fanuc do you have?

    Does your control have the Custom Macro B option? You could write a custom macro to do this.

    An easier method would be to set the Work Coordinates at the beginning of each program with a G10 command. An example for a Model 21M-B:

    G90
    G10 L2 P1 X-12.437 Y-6.562 (G54)
    G10 L2 P2 x-10.375 Y-6.531 (G55)
    G10 L2 P3 X-8.903 Y-6.533 (G56)



  3. #3
    Registered
    Join Date
    Jan 2010
    Location
    Norway
    Posts
    88
    Downloads
    0
    Uploads
    0

    Default

    I think it has it, might upgrade if not.
    How would such a code look like?
    G10 would work but since i have 5-6 part's using the same work shift i would have 5-6 programs to change for each work shift.



  4. #4
    Registered
    Join Date
    Jan 2010
    Location
    Norway
    Posts
    88
    Downloads
    0
    Uploads
    0

    Default

    Obs forgot model. Fanuc 18i-TB.



  5. #5
    Registered
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    1134
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ProToZyKo View Post
    I think it has it, might upgrade if not.
    How would such a code look like?
    G10 would work but since i have 5-6 part's using the same work shift i would have 5-6 programs to change for each work shift.
    User Macro system variables for G54 - G59 start at #5221 through to #5324. They are allocated in groups of four and increment by 20 for the next Work Shift number as explained in the following example:

    #5221 = G54 X
    #5222 = G54 Y
    #5223 = G54 Z
    #5224 = G54 4TH

    #5241 = G55 X
    #5242 = G55 Y
    #5243 = G55 Z
    #5244 = G55 4TH

    and so it goes on by adding 20 to get the address of the next Work Shift number.

    The approach would be to use Common Variables that are not reset when the power is turned off; these are in the range of #500 to #531 as standard and #532 to #999 are available as an option. You would need to make sure that the Common variables you use are not used by other Macro programs that may be being used by the machine, such as a Tool Change Macro program. Because the variables are common, it means that as well as the variable being able to be read by all programs that use it, it can also be altered by any of the programs that access it.

    You will have sufficient common, nonvolatile, variables to be able to record the values for X,Y and Z for your Work Shifts G54 through to G59 and at the beginning of each program you could have something like the following:
    For G54
    #5221 = #500
    #5222 = #501
    #5223 = #502

    For G55
    #5241 = #503
    #5242 = #504
    #5243 = #505

    The actual values for the respective Work Shifts are recorded in the Macro Variable Table, similar to how you register a value into the tool offset table. When the program executes, these values will by read and allocated to the system variables that correspond to the respective Work Shift numbers. If a Work Shift value needs to be altered, then it is altered in the Macro Variable Table, and the changed variable is read by each of your various programs when they execute.

    Regards,

    Bill



  6. #6
    Registered dcoupar's Avatar
    Join Date
    Mar 2003
    Location
    USA
    Posts
    2709
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ProToZyKo View Post
    Obs forgot model. Fanuc 18i-TB.
    18i-TB? What are you using all those work shifts for on a lathe? How many spindles does it have, anyway?



  7. #7
    Registered
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    1134
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by dcoupar View Post
    18i-TB? What are you using all those work shifts for on a lathe? How many spindles does it have, anyway?
    Good point, I didn't pick up on the control model.

    Regards,

    Bill



  8. #8
    Registered
    Join Date
    Jan 2010
    Location
    Norway
    Posts
    88
    Downloads
    0
    Uploads
    0

    Default

    Will try to explain this the best i can. (not that good on english)
    This is a big lathe, and we produce allot of similar parts, what i do is setting up different axles on the table to put my part's on, so when i go from one part to another i don't have to think about setting my work shift wrong since i have already done in the past.
    I could write all of theese down but i can't risk setting wrong value.
    I only need different work shift's in Z direction.
    Hope you understand better, would be similar to what you would do on a mill with multiple tables.

    Quote Originally Posted by angelw View Post
    Good point, I didn't pick up on the control model.

    Regards,

    Bill




  9. #9
    Registered dcoupar's Avatar
    Join Date
    Mar 2003
    Location
    USA
    Posts
    2709
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ProToZyKo View Post
    Will try to explain this the best i can. (not that good on english)
    This is a big lathe, and we produce allot of similar parts, what i do is setting up different axles on the table to put my part's on, so when i go from one part to another i don't have to think about setting my work shift wrong since i have already done in the past.
    I could write all of theese down but i can't risk setting wrong value.
    I only need different work shift's in Z direction.
    Hope you understand better, would be similar to what you would do on a mill with multiple tables.
    I would add a G10 L2 P1 Znnn.nnnn at the beginning of each program.

    O1234(PART NO. 1)
    G10 L2 P1 Z10.437 (SET G54 Z OFFSET VALUE)
    N1 G0 G40 G97 G99
    ...
    ...
    ...
    M30



  10. #10
    Registered
    Join Date
    Jan 2010
    Location
    Norway
    Posts
    88
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by dcoupar View Post
    I would add a G10 L2 P1 Znnn.nnnn at the beginning of each program.

    O1234(PART NO. 1)
    G10 L2 P1 Z10.437 (SET G54 Z OFFSET VALUE)
    N1 G0 G40 G97 G99
    ...
    ...
    ...
    M30
    Problem here is that if i change my axle stands due to mark's or something else i would need to change the G10 line in every program. As of now that would be around 10 program's, in a few month's maybe 30.



  11. #11
    Registered
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    1134
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ProToZyKo View Post
    Problem here is that if i change my axle stands due to mark's or something else i would need to change the G10 line in every program. As of now that would be around 10 program's, in a few month's maybe 30.
    The Series 18 Control is an easy control to use to touch off a tool and reset the coordinate system for Z when each job it put up.

    However, if you still want to have all previously set Work Shifts globally changed for programs using the same Work Shift number, you could still use the User Macro approach described earlier.

    Because only Z has to be catered for, it will allow you, in some degree, to associate the variable number with the Work Shift number. This would allow 18 distinct different Work Shift job groups to be used and still retain some semblance of association, and no limit to how many programs use that same Work Shift (macro variable) value. Of course good record keeping would have to be in place so that if and when Work Shift had to be altered, the value of the correct, corresponding variable is altered.

    As explained before, the work Shift values would be registered with each corresponding variable and altering the variable would alter the associated Work Shift of programs using that variable.

    You could expand the User Macro approach further by creating a coordinate setting Macro program, so that when you touched off a tool to set, say, G55, then the associated #502, #512, or #522, or whatever variable numbers you use, is automatically set. User Macro programming is limited only by your imagination.

    Regards,

    Bill

    For G54(1)
    #5223 = #501, #511, #521
    For G55(2)
    #5243 = #502, #512, #522
    For G56(3)
    #5263 = #503, #513, #523
    For G57(4)
    #5283 = #504, #514, #524
    For G58(5)
    #5303 = #505, #515, #525
    For G59(6)
    #5323 = #506, #516, #526

    O1111(PART NO. ? USING G54-1)
    #5223 = #501 (SET G54 Z OFFSET VALUE)
    N1 G0 G40 G97 G99
    ...
    G54...
    ...
    M30

    O222(PART NO. ? USING G54-2)
    #5223 = #511 (SET G54 Z OFFSET VALUE)
    N1 G0 G40 G97 G99
    ...
    G54...
    ...
    M30

    O5555(PART NO. ? USING G55-1)
    #5243 = #502 (SET G55 Z OFFSET VALUE)
    N1 G0 G40 G97 G99
    ...
    G55...
    ...
    M30

    O6666(PART NO. ? USING G55-2)
    #5243 = #512 (SET G55 Z OFFSET VALUE)
    N1 G0 G40 G97 G99
    ...
    G55...
    ...
    M30



  12. #12
    Registered
    Join Date
    Jan 2010
    Location
    Norway
    Posts
    88
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by angelw View Post
    This would allow 18 distinct different Work Shift job groups to be used and still retain some semblance of association,
    For G54(1)
    #5223 = #501, #511, #521
    For G55(2)
    #5243 = #502, #512, #522
    For G56(3)
    #5263 = #503, #513, #523
    For G57(4)
    #5283 = #504, #514, #524
    For G58(5)
    #5303 = #505, #515, #525
    For G59(6)
    #5323 = #506, #516, #526
    Gues that i can create 100's of work shift by doing this? No reason to jump 10 variables each time? G54 can use variable 501,502,503,504,505,506 etc etc right?
    Haven't started learning macro yet, good way to start i gues

    Would there be possible todo it like this?
    O5000(WORK SHIFT)
    (PART 1);
    N1G10L2P1Z123;
    (PART 2);
    N2G10L2P1Z234;
    (PART 3);
    N3G10L2P1Z345;
    (PART 4);
    N4G10L2P1Z456;
    etc

    O4000(MAINPROGRAM1)
    GOTO N1 O5000(READ Z ZERO)
    G00G54
    ..........
    M30



Page 1 of 2 12 LastLast

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 from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed