Manually setting the current Work Offset with a variable


Results 1 to 16 of 16

Thread: Manually setting the current Work Offset with a variable

  1. #1
    Member joemach's Avatar
    Join Date
    Jan 2023
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Manually setting the current Work Offset with a variable

    Can someone please tell me how to set the current Work Offset manually using a variable?

    I need to do what G15 H=VC27 would do if it worked that way.

    As I recall, there is a way using VSOFT=VC127 or something similar, but I can't find it.

    Thanks!

    Similar Threads:


  2. #2
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    hy joemach i never tried G15 H=variable, even when working with multiple wsc, but i believe you that it may not work i also searched for vsoft, but i could not find any details on it

    however, is possible to use multiple the origins, even if G15 is used only once inside the program

    i believe there are multiple fixtures, and you wish to restart after a random interruption ? please, in order to give a specific solution, i need more details on your setup / kindly

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  3. #3
    Member OkumaWiz's Avatar
    Join Date
    Apr 2009
    Location
    United States
    Posts
    1262
    Downloads
    0
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    What you are looking is for is VZOFZ[1]=123.456 or VZOFY[1]=123.456...
    They can be put into a program to set the work offsets if you like.

    You can find a lot more if you look in your manuals for the system variables.

    Best regards,

    Experience is what you get just after you needed it.


  4. #4
    Member joemach's Avatar
    Join Date
    Jan 2023
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    I have been looking through the manuals, but I cannot find out how to set the current value of "H" in G15 using a variable.

    I don't want to set the numeric value that is stored in "H", I want to select which work offset the OSP control is currently using, like if I set VC7=81 then wrote "G15 H=VC7" to get the same result as typing "G15 H81"
    I know that the above example doesn't work, but how would this be done on a Okuma OSP control?

    It sounds simple, but I cannot find how to do this in any of the Okuma Manuals we have and I've spent countless hours looking.



  5. #5
    Flies Fast Superman's Avatar
    Join Date
    Dec 2008
    Location
    Antarctica
    Posts
    3109
    Downloads
    0
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    Have you tried G15 H[VC7] ?



  6. #6
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    hy joemach don't worry anymore, there are solutions, with different creation time, code size and impact on your existing program

    please, i need to understand what is going on, what made you look towards H=VC* maybe something can be done before g15 h= ? kindly

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  7. #7
    Member joemach's Avatar
    Join Date
    Jan 2023
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    Quote Originally Posted by Superman View Post
    Have you tried G15 H[VC7] ?
    This is correct.
    I overlooked the easy way to do it.

    Thanks Superman!


    Follow up question.

    How do I see which is the current Work offset the control is using? (as in which G15 H# is active)
    I've looked at all of the position screens, looked in the manuals but I can't find it.



  8. #8
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    hy joemach try vacod ...
    g15 h[vc7]
    vc1=vacod ( should return vc7 )

    please, how do you end up needing this custom initialization ? and from where do you know of vsoft ? kindly

    Have you tried G15 H[VC7] ?
    that is briliant superman i never used [] without + or =, etc; i wonder if N[] works, so to achieve programable adresses


    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  9. #9
    Member joemach's Avatar
    Join Date
    Jan 2023
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    Quote Originally Posted by deadlykitten View Post
    hy joemach try vacod ...
    g15 h[vc7]
    vc1=vacod ( should return vc7 )

    please, how do you end up needing this custom initialization ? and from where do you know of vsoft ? kindly



    that is briliant superman i never used [] without + or =, etc; i wonder if N[] works, so to achieve programable adresses
    Thanks, but is there a way to see what it is just by looking at a display on the control?
    Like on out Haas machines, I can look at the Current Position/Active Codes screen and it says "G154 P70" or whatever the current G154 is.

    One (hopefully) on last thing we struggle with on all of our Okumas:

    When we change a Subprogram and copy the new one into the control, the Main Programs still see the old one.
    Even if we completely delete the Subprogram from the MD1 location, the Main Program still "sees" it.

    How do we get the control to use the new one?

    The way it's always been done is to change the name of the Subprogram in the Main program so it's forced to use the new Subprogram, but I am 100% sure this is the wrong way to do it.
    They have been doing it that way here for years...



  10. #10
    Flies Fast Superman's Avatar
    Join Date
    Dec 2008
    Location
    Antarctica
    Posts
    3109
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by deadlykitten View Post
    try vacod ...
    g15 h[vc7]
    vc1=vacod ( should return vc7 )
    I believe VC1 should return the value held in VC7 (not "VC7")
    If you read the manual (I know that you don't), it says the square brackets can be used to separate the letter address and the string name. Same as a space is important when doing calcs etc within a program.

    Current WCS should be displayed on the position page, as well as the T#, D# H# N# (and sequence number)

    On the work offset page, it also should place an asterisk (LH side) on the active offset number

    Hint...
    N# and sequence number are 2 ways to restart a running program.
    N# restart will start on the selected line
    Sequence number allows a restart mid peck, or mid hole pattern for example

    I used to quickly check program syntax and graphics by using RS 999999 <write> to run the program on-screen only

    The grey matter is starting to have holes in it. Last used Okumas 15 years ago.

    Last edited by Superman; 02-01-2023 at 05:56 PM.


  11. #11
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    Quote Originally Posted by joemach View Post
    way to see what it is just by looking
    hy joe pls share a photo of your screen, in automatic mode

    When we change a Subprogram and copy the new one into the control, the Main Programs still see the old one
    many use to still keep in MD1 folder the programs that are not curently used, and MD1 begins to act like an archive; in time, this leads to memory issue, and other stuff ... i alwasy keep only active programs in it, or i have it empty

    having many files can easy lead to duplicate content

    the controller will update it's references to subprograms only when you select the program, and not when you replace the files; in other words, you can select the program, then delete all files from MD1, and the machine will run just fine; it runs on flash memory, not on files from phisical hdd if this does not fix the issue, will try some test programs

    They have been doing it that way here for years...
    the moment you asked for editable G15 H, i thought that you are into some multifixture setup, and you lose progress, then you wanna restore fast ... but when you asked about inspecting the current G15, seems like there is a need for basic operation procedures

    Quote Originally Posted by Superman View Post
    I believe VC1 should return the value held in VC7 (not "VC7")
    next time i'll see you fly around, i'll throw a snowball at you

    if you read the manual (I know that you don't)
    if i remember, you where the 1st to send me to reading, but back then, even if i would, i could not understand; now is a different story

    The grey matter is starting to have holes in it
    just read the manuals got ya

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  12. #12
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    Quote Originally Posted by Superman View Post
    Have you tried G15 H[VC7] ?
    hello i only recently tried g15 h[vc1], and it worked, but also g15 h=vc1 worked

    i tried to apply it also to N, thus to make the jump " goto N [ VC1 ] ", but it didn't work

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  13. #13
    Flies Fast Superman's Avatar
    Join Date
    Dec 2008
    Location
    Antarctica
    Posts
    3109
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by deadlykitten View Post
    hello i only recently tried g15 h[vc1], and it worked, but also g15 h=vc1 worked

    i tried to apply it also to N, thus to make the jump " goto N [ VC1 ] ", but it didn't work
    Look at how you construct the actual string...
    N [ VC1 ] will be very different to N[VC1]
    N 123 is not legitimate code, unlike N123
    G15 H[VC1] is writing the H code after G15, before the VC1 value
    G15H=VC1 is writing it as G15 (VC value).... the H is replaced by the variable.



  14. #14
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    at machine i write it ok when posting, i added spaces only to improve readability ... hmm

    i really thought i could macro also the N's with that trick of yours

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  15. #15
    Member kurmay's Avatar
    Join Date
    Aug 2011
    Posts
    419
    Downloads
    3
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    it is impossible to assign any variable to N letter because OSP kernel isn't support it.

    https://www.facebook.com/okuma.tuning


  16. #16
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: Manually setting the current Work Offset with a variable

    i really thought i could macro also the N's with that trick of yours

    it is impossible to assign any variable to N letter because OSP kernel isn't support it
    instead of N=10, user task 3 allows :

    Code:
        V1=10 & GOTO V1
    
        IF [ V1 EQ 10 ] THEN GOTO V1
    
        IF [ V1 EQ 10 ] THEN G205
    
        IF LVTM THEN G=V1
    
        WHILE [ condition ] DO
    will make the code more legible

    Last edited by deadlykitten; 07-08-2023 at 01:51 PM.
    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


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

Manually setting the current Work Offset with a variable

Manually setting the current Work Offset with a variable