Anyone know the system variables for the current time and date on Okuma OSP P200M control?
Similar Threads:
Cheers Maxter. I saw that in the manual but didn't understand the difference. Your explanation is much clearer :-)
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?
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.
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.
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
Ooo that looks interesting. I'll try that on Monday when I'm back at work. Broby will be pleased.
:-)
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.
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.
Tried the VTIME thingy today. Brilliant, just brilliant.
It finishes off my saved probed offsets just as I wanted them.
Thanks.
I tried these on a P200L lathe with no luck, Does anybody know the Lathe variables for this?
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
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.
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