Get cycle time using Okuma API

Office: Okuma OSP-P200L
Machine: LB3000
API: 1.15.0.0

I need to get the cycle time for a part program on an Okuma lathe using the THINC API. The help file mentions the full cycle method:
public bool CycleComplete( MachineSideEnum enMachineSide )
But I find no way to detect the beginning of the cycle.
Any ideas?

+4
source share
2 answers

As AppFzx said, you will need to poll. Ask the user to run the application, and then run your part program. Your application will need to poll GetProgramRunningState() (no more than 100 ms interval!) To see when the part program starts. Then do a CycleComplete() poll to find out when it will end. However, in this thread, events present an interesting idea for future releases of the API ...

+3
source

Another possible approach is to use the CmachingReport.GetMachiningReports method. It returns an ArrayList of the CMachining class, which has a property called transaction time. This is a cumulative timer representing the actual time from start to finish each time the program starts.

You can calculate the average cycle time for a specific program by dividing TimeTime by the NumberOfWork property. Performing this method will give you some flexibility in case the application is not running or you do not want to poll.

+4
source

Source: https://habr.com/ru/post/1501340/


All Articles