Cnc Skinning API how to know if a job is running

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
frantz
Posts: 2
Joined: Wed Jan 29, 2020 3:40 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 0115202849
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Cnc Skinning API how to know if a job is running

Post by frantz »

Hi,

I am using the version 4.5 of ACORN and I am testing the CncSkinning API and all seems ok, but I've not found in the documentation if there is a method to know if a job is running ?


in my case, If I call the job.RunCommand(..., require_cycle_start=false) 2 times without waiting for a delay in between, the second call is ignored, even though the function returns 'SUCCESS'.

My goal is to wait until the 1st job is finished, before sending another job (polling method)

Thank you in advance for your answer,
cncsnw
Posts: 3855
Joined: Wed Mar 24, 2010 5:48 pm

Re: Cnc Skinning API how to know if a job is running

Post by cncsnw »

I have not studied the Skinning interface documentation, so I do not know if something like this is already provided. However, you clearly have studied the documentation: if it were in there, you would probably have found it.

The information you want is in PLC system variables:
SV_PROGRAM_RUNNING : Any CNC program cycle is active. This includes having the MDI prompt open, even if it is idle
SV_JOB_IN_PROGRESS : A CNC program cycle is actively running codes. This excludes the MDI prompt, if it is idle
SV_MDI_MODE : The MDI prompt is open (whether actively running code, or idle)

For the scenario you describe, either SV_PROGRAM_RUNNING or SV_JOB_IN_PROGRESS would probably serve.

If you cannot read those system variables directly via the Skinning interface, then you could add a couple lines in the PLC program to copy them into memory bits, then read the memory bits through the Skinning interface.
Post Reply