View Full Version : Okuma parts counter


Musclebound
02-15-2007, 11:34 PM
... hi everyone, newbie here. just found this web forum today, so far it seems pretty helpful.

I have two questions I'm hoping someone can help me with.
First... I have an Okuma L-370 lathe with E-100 controls. I want to know how to reference the internal clock so I can track the number of parts by shift. Can this data be sent to the floppy drive... being I don't have any sort of DNC network? Right now, I just have VC80=VC80+1 at the end of the program... but I need something a little more specific. Say 'some known address' is between the hours of 7am and 3pm then write to this variable.

make sense????

Second question.. I have a Mori NL2000 SMC lathe, and want to know if there is a way to do sort of a panel check to make sure the load monitor is turned on, and not set in teach mode? or is there a parameter that only allows the load monitor to be in monitor mode?

... usually don't type this much... sorry :)

thanks for any help..........

broby
02-26-2007, 05:41 PM
Hi Musclebound,
If you ever find out how to access the internal clock I would really like to know also!
In the mean time... I am using the free running counter that is updated every second for time keeping on one of our E-100M machining centres.
Before starting the program I run the following code to capture the start "time" of the program

OSTRT ( TIME PROG CREATE )
(Linked to G119)
FWRITC MD1:TIME.CSV;A
PUT 'Job Number'
PUT ','
PUT 'Confirm No.'
PUT ','
PUT 'OP. Number'
PUT ','
PUT 'MATERIAL No.'
PUT ','
PUT 'Time secs'
PUT ','
PUT 'Day'
PUT ','
PUT 'Month'
PUT ','
PUT 'Year'
WRITE C
CLOSE C
VC30=VDIN[1001] (capture start time)
NRTS
RTS

Where VDIN[1001] is a free running counter that steps up in 1 second intervals. This counter only resets when the power is turned OFF/ON.
All the PUT statements are there to output a fixed format of text to a TIME.CSV file.
The "FWRITC MD1:TIME.CSV;A" command line will create a file in memory area MD1 called TIME.CSV if it does not exist, otherwise it will Append this data on the end of the file if it already exists.

After the program finishes I use the following code to write the time keeping information to the TIME.CSV file.

OTIED
(LINKED TO G118)
(write time keeping data to time.csv file)
VC31=VDIN[1001] (Capture end time)
VC34=VC31-VC30 (Calc total Cycle Time)
FWRITC MD1:TIME.CSV;A
PUT VC32 (Set to Job Number)
PUT ','
PUT VC33 (Set to Confirmation Number)
PUT ','
PUT VC38 (Set to Operation Number)
PUT ','
PUT VC39 (Set to Material Number)
PUT ','
PUT VC34 (Cycle time in Seconds as above)
PUT ','
PUT VC35 (Today's Day number, i.e. 25 for the 25th of the month)
PUT ','
PUT VC36 (Today's Month number i.e. 8 for August)
PUT ','
PUT VC37 (Year value, e.g. 2007)
WRITE C (write the data to the file)
CLOSE C (close the file)
RTS

At the end of shift the operators save the "Time.csv" file to a reports folder on the network for importing into a spreadsheet for time keeping later on.

As an example the time file might have data such as...

Job Number,Confirm No.,OP. Number,MATERIAL No.,Time secs,Day,Month,Year
60013881, 742195, 1, 70007923, 478, 11, 2, 2007
Job Number,Confirm No.,OP. Number,MATERIAL No.,Time secs,Day,Month,Year
60013881, 742195, 2, 70007923, 660, 11, 2, 2007
Job Number,Confirm No.,OP. Number,MATERIAL No.,Time secs,Day,Month,Year
40024965, 742761, 3, 11436723, 1371, 11, 2, 2007
Job Number,Confirm No.,OP. Number,MATERIAL No.,Time secs,Day,Month,Year
40024936, 742353, 1, 11435700, 1225, 11, 2, 2007
Job Number,Confirm No.,OP. Number,MATERIAL No.,Time secs,Day,Month,Year
40024954, 742906, 1, 11484056, 8623, 11, 2, 2007
Job Number,Confirm No.,OP. Number,MATERIAL No.,Time secs,Day,Month,Year
40024919, 743389, 1, 11462969, 1247, 11, 2, 2007

One of the pitfalls with this system is if the machine is turned OFF/ON between the Start Timer call and the Stop Timer call. Then a really weird cycle time gets written to the file as the timer will have been reset with the power restart. You end up with a large negative number usually, but at least that is easy to spot!
Hope this information is helpfull?!?

Sorry I can not help you for your second question. :D

Regards
Brian.

Musclebound
02-26-2007, 09:43 PM
... thanks for the info.

After talking to a few A.E's from Okuma, they said I should be looking to MacMan for this type of data (internal clock...) so i'm waiting to see if they can get me a few manuals for the P/E controls. I will keep you updated when I find out more... which I'm hoping by the end of the week.

thanks again for the code.

p.s. sorry for the short post..... i'm on a brainstorm for another macro right now!!! ttyl

broby
02-26-2007, 09:53 PM
Yeah I had at MacMan but could not figure out the name of the system variable to read to get the internal clock or date.
If you can find this out and let me know I would be very impressed!

What are trying to figure out for your macro?
I have quite a number of macros that I could probably share with you if you are willing to share with me?!?

I am always on th lookout for new ideas and ways of reducing the programming work load by using this type of practice.
Cheers
Brian.