Hello! I'm trying to find out if a job is running or not. Specifically, the filename that is loaded. The trouble I'm having is that SV_JOB_IN_PROGRESS returns IO_LOGICAL_1 even when I'm running a warmup routine, and haven't actually started the job. Is there a way to differentiate this?
internal bool CheckIfJobIsRunning()
{
if (File.Exists("C:\\cncm\\loadcommand.txt"))
{
return true;
}
string command = "STATE_CheckIfJobIsRunning";
m_parent.SendAndReceive(command, out var response);
FromString(response, out var value);
return Convert.ToBoolean(Convert.ToInt32(value));
}
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
There is not currently a way to determine which specific job is running, only that a job is running. Checking SV_JOB_IN_PROGRESS or SV_PROGRAM_RUNNING are the best ways to determine that.
CheckIfJobIsRunning has been retooled into IsJobRunning for the upcoming v5.40 release. It does a more programmatic way of checking the same information, without having to query the board. This would be a faster call to make in the future but does not help your current issue.
Let me mull it over some and I will see what I can come up with for you.
1 user liked this post
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
corbin wrote: ↑Wed Jul 16, 2025 12:34 pm
Thanks! Is there a difference between SV_JOB_IN_PROGRESS and SV_PROGRAM_RUNNING? I haven't poked around at SV_PROGRAM_RUNNING.
SV_PROGRAM_RUNNING is 1 if in the MDI screen or a job is in progress
SV_JOB_IN_PROGRESS is 1 if a MDI command is running (not just idly sitting there) or a job is in progress
1 user liked this post
(Note: Liking will "up vote" a post in the search results helping others find good information faster)