System variables


Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: System variables

  1. #1
    Registered
    Join Date
    Nov 2006
    Location
    UK
    Posts
    174
    Downloads
    0
    Uploads
    0

    Default System variables

    Anyone know the system variables for the current time and date on Okuma OSP P200M control?

    Similar Threads:


  2. #2
    Registered
    Join Date
    May 2011
    Location
    USA
    Posts
    27
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ChattaMan View Post
    Anyone know the system variables for the current time and date on Okuma OSP P200M control?
    VPMNT 0-59 minute counter cleared every hour
    VRMNT minute counter not cleared
    VPHUR 0-23 hour counter cleared every day
    VRHUR hour counter not cleared
    VQDAT 0- number of days



  3. #3
    Registered
    Join Date
    Nov 2006
    Location
    UK
    Posts
    174
    Downloads
    0
    Uploads
    0

    Default

    Cheers Maxter. I saw that in the manual but didn't understand the difference. Your explanation is much clearer :-)



  4. #4
    Registered
    Join Date
    Nov 2006
    Location
    UK
    Posts
    174
    Downloads
    0
    Uploads
    0

    Default

    Hmm. Any idea where the resulting figures come from. At 8:35am this morning results were....
    VPHUR=1 and VPMNT=19??
    I expected (hoped)it to be
    VPHUR=8 and VPMNT=35
    Can this "counter" be set to zero manually?



  5. #5
    Member broby's Avatar
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    822
    Downloads
    0
    Uploads
    0

    Default

    ah yes the good old hunt for 'system time' on an Okuma!
    Good luck with that! After hunting for years, I am yet to find the answer to this question.
    As far as I know, there is NO system variable that will give you the time as in it is now 8:36am on 1/11/2012.
    The system variables listed above are read only I think... i.e. not able to be 'reset'.
    What are you trying to achieve?
    These variables are usually set to ZERO on power on.
    Cheers
    Brian.



  6. #6
    Registered
    Join Date
    Nov 2006
    Location
    UK
    Posts
    174
    Downloads
    0
    Uploads
    0

    Default

    I have set up the prog to save updated offsets after probing. The probed offsets are written to a new file. On subsequent runs this file is overwritten with the updated data. I just wanted to put a time stamp on the bottom of the file.
    I know the time the file was created would be correct but just wanted to add the time stamp too. If an operator opens the file and inadvertently edits (presses any key) the saved file would now show a different time that it was created.



  7. #7
    Member
    Join Date
    Nov 2012
    Location
    usa
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default

    The variable to read the windows system time is VTIME[1] through VTIME[6]

    VTIME[1] = year
    VTIME[2] = month
    VTIME[3] = day
    VTIME[4] = hour
    VTIME[5] = minute
    VTIME[6] = second

    The following code will output to a file using READ WRITE GET PUT

    CLOSE C
    FWRITC MD1:TIME-DATE.TXT;A
    PUT' '
    WRITE C

    (TIME DATE)
    PUT' '
    WRITE C
    PUT 'YEAR/MM/DD'
    PUT VTIME[1]
    PUT '/'
    PUT VTIME[2]
    PUT '/'
    PUT VTIME[3]
    WRITE C
    PUT 'TIME'
    PUT VTIME[4]
    PUT':'
    PUT VTIME[5]
    WRITE C
    CLOSE C



  8. #8
    Registered
    Join Date
    Nov 2006
    Location
    UK
    Posts
    174
    Downloads
    0
    Uploads
    0

    Default

    Ooo that looks interesting. I'll try that on Monday when I'm back at work. Broby will be pleased.

    :-)



  9. #9
    Registered
    Join Date
    May 2011
    Location
    USA
    Posts
    27
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by YoDoug View Post
    The variable to read the windows system time is VTIME[1] through VTIME[6]

    VTIME[1] = year
    VTIME[2] = month
    VTIME[3] = day
    VTIME[4] = hour
    VTIME[5] = minute
    VTIME[6] = second

    The following code will output to a file using READ WRITE GET PUT

    CLOSE C
    FWRITC MD1:TIME-DATE.TXT;A
    PUT' '
    WRITE C

    (TIME DATE)
    PUT' '
    WRITE C
    PUT 'YEAR/MM/DD'
    PUT VTIME[1]
    PUT '/'
    PUT VTIME[2]
    PUT '/'
    PUT VTIME[3]
    WRITE C
    PUT 'TIME'
    PUT VTIME[4]
    PUT':'
    PUT VTIME[5]
    WRITE C
    CLOSE C
    Very nice YoDoug! I have the 'full' list of system variables for this control given to me from an Okuma rep and VTIME wasn't on the list! I tried the code and it works! I wound up reducing the spaces in the TXT file like this: PUT VTIME[1],4



  10. #10
    Member broby's Avatar
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    822
    Downloads
    0
    Uploads
    0

    Default

    well I'll be stuffed!
    In all the 'time' I have been hunting for this information, no-one has stated these variable names!
    WELL DONE to YoDoug!
    I have tried it on our MA600HB with OSP E100M Controller and stuff me, it worked!
    There was a small strange output with the minutes and seconds in that the minutes output was not accurate, the time was 12:43pm and I was getting the answer of 45. I then waited until the time was 12:45 and the answer was 45... ok obviously then 12:46 and the answer was still 45!
    Had a similar problem with the seconds not displaying accurate information as well.
    I wonder how often these variables get updated?
    will have to run a program in a loop to see what happens over a period of time.
    I will let you know how it pans out.
    Cheers
    Brian.



  11. #11
    Member
    Join Date
    Nov 2012
    Location
    usa
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default

    I have never tried the VTIME variables on a control older than a P100. I work for an Okuma distributor so I mostly work on new machines.



  12. #12
    Registered
    Join Date
    Nov 2006
    Location
    UK
    Posts
    174
    Downloads
    0
    Uploads
    0

    Default

    Tried the VTIME thingy today. Brilliant, just brilliant.
    It finishes off my saved probed offsets just as I wanted them.
    Thanks.

    Attached Thumbnails Attached Thumbnails System variables-probesave-jpg  


  13. #13
    Member broby's Avatar
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    822
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ChattaMan View Post
    Tried the VTIME thingy today. Brilliant, just brilliant.
    It finishes off my saved probed offsets just as I wanted them.
    Thanks.
    Damn fine looking stuff there!
    Well done.



  14. #14
    Registered
    Join Date
    Nov 2006
    Location
    UK
    Posts
    174
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by broby View Post
    Damn fine looking stuff there!
    Well done.
    Yes, with help from you too.
    Thanks.



  15. #15
    Registered
    Join Date
    Jun 2008
    Location
    USA
    Posts
    372
    Downloads
    0
    Uploads
    0

    Default

    I tried these on a P200L lathe with no luck, Does anybody know the Lathe variables for this?



  16. #16
    Registered
    Join Date
    Nov 2006
    Location
    UK
    Posts
    174
    Downloads
    0
    Uploads
    0

    Default

    Today I came across the VTIME function in the programming manual. So I just needed to look harder before, didn't I...!

    So I looked for it in the Multus manual (P200L control) but couldn't find it. And I tried it out in MDI...V1=VTIME[1]....and it alarmed out. "TIME" not recognised.
    So sorry to say, budgieW, it looks like it won't work.

    Unless someone knows different



  17. #17
    Registered
    Join Date
    May 2011
    Location
    USA
    Posts
    27
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by ChattaMan View Post
    Today I came across the VTIME function in the programming manual. So I just needed to look harder before, didn't I...!

    So I looked for it in the Multus manual (P200L control) but couldn't find it. And I tried it out in MDI...V1=VTIME[1]....and it alarmed out. "TIME" not recognised.
    So sorry to say, budgieW, it looks like it won't work.

    Unless someone knows different
    Same story here guys... works on my P200M control but not on the Multus P200L control.



  18. #18
    Member broby's Avatar
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    822
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Maxter View Post
    Same story here guys... works on my P200M control but not on the Multus P200L control.
    Yet another obvious example of how the "Mill Control" team and the "Lathe Control" team have no clue what each other are doing!
    About damn time Okuma actually worked together as a "Team" and got some consistency across all control systems.
    Same as VC1 accesses common variable 1 on a Mill but on a Lathe, oh no... you have to use V1! grrrrrrrrr.



  19. #19
    Member
    Join Date
    Nov 2012
    Location
    usa
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default

    Update: On mills that do not have the VTIME variable available you can use the following code to convert the VQDAT variable into day/month/year. The VQDAT variable is not in lathe controls so no help there.


    AY=4716
    AJ=1401
    AM=2
    AN=12
    AR=4
    AP=1461
    AV=3
    AU=5
    AS=153
    AW=2
    AB=274277
    AC=-38
    JUL=VQDAT + 2444238

    AF = JUL + AJ
    AF = AF + [[[4 * JUL + AB]/146097] * 3]/4 + AC
    AE = AR * AF + AV
    AG1 = MOD[AE,AP]/AR
    AH = AU * AG1 + AW
    DAY = FIX[[MOD[AH,AS]]/AU + 1]
    MNTH = FIX[MOD[AH/AS + AM,AN] + 1]
    YEAR = FIX[AE/AP - AY + [AN + AM - MNTH]/AN]

    VC1=DAY
    VC2=MNTH
    VC3=YEAR



  20. #20
    Member broby's Avatar
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    822
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by YoDoug View Post
    Update: On mills that do not have the VTIME variable available you can use the following code to convert the VQDAT variable into day/month/year. The VQDAT variable is not in lathe controls so no help there.


    AY=4716
    AJ=1401
    AM=2
    AN=12
    AR=4
    AP=1461
    AV=3
    AU=5
    AS=153
    AW=2
    AB=274277
    AC=-38
    JUL=VQDAT + 2444238

    AF = JUL + AJ
    AF = AF + [[[4 * JUL + AB]/146097] * 3]/4 + AC
    AE = AR * AF + AV
    AG1 = MOD[AE,AP]/AR
    AH = AU * AG1 + AW
    DAY = FIX[[MOD[AH,AS]]/AU + 1]
    MNTH = FIX[MOD[AH/AS + AM,AN] + 1]
    YEAR = FIX[AE/AP - AY + [AN + AM - MNTH]/AN]

    VC1=DAY
    VC2=MNTH
    VC3=YEAR
    Holy Crap Batman!
    How the heck did you come up with that set of formula?
    Brain hurts just reading it.
    Cheers
    Brian.



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 for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

System variables

System variables