Used to get Job Information including the Job Stack. Also allows the setting of active Jobs.
Name | Description |
---|---|
SetActiveJob | Set the active job on the controller. |
GetExecutingJobInformation | If the controller is currently executing a job, this function will return the name of the job. |
GetJobStack | Get the job stack from the controller. |
Set the active job on the controller.
StatusInfo SetActiveJob(string jobName, UInt32 lineNumber);
jobName
[in] The name of the job to set as active. Not case sensitive. ".JBI" extension does not have to be included, but it can be if your program requires it.
lineNumber
[in] The line number to start executing the job at. If the line number is 0, the job will start at the beginning.
A StatusInfo object indicating if the operation was successful.
//`c` is a MotomanController object that has been created with ` YMConnect.OpenConnection`
status = c.Job.SetActiveJob("TestJob", 2);
Console.WriteLine(status);
//be sure to close `c` with `YMConnect.CloseConnection` when the application is done
Output
Code (0): OK
If the controller is currently executing a job, this function will return the name of the job.
StatusInfo GetExecutingJobInformation(InformTaskNumber selection, out JobData jobData);
selection
[in] Task associated with executing job. For example, if InformTaskNumber::Master is selected, the returned job will be associated with the master task. See InformTaskNumber.
jobData
[out] The job data currently executing on the controller. This name cooresponds with the task number selected in the selection parameter.
A StatusInfo object indicating if the operation was successful.
//`c` is a MotomanController object that has been created with ` YMConnect.OpenConnection`
status = c.Job.GetExecutingJobInformation(InformTaskNumber.Master, out JobData jobData);
Console.WriteLine(status);
Console.WriteLine(jobData);
//be sure to close `c` with `YMConnect.CloseConnection` when the application is done
Output
Code (0): OK
Name: TEST1
Line: 1
Step Number: 0
Speed Override: 100%
Get the job stack from the controller.
StatusInfo GetJobStack(InformTaskNumber taskNumber, out List<string> jobStack);
taskNumber
[in] Task associated with job stack. For example, if InformTaskNumber::Master is selected, the returned job stack will be associated with the master task. See InformTaskNumber.
jobStack
[out] The job stack represented as a vector of strings. Top of stack is at index 0.
A StatusInfo object indicating if the operation was successful.
//`c` is a MotomanController object that has been created with ` YMConnect.OpenConnection`
status = c.Job.GetJobStack(InformTaskNumber.Master, out List<string> jobStack);
Console.WriteLine(status);
foreach (string job in jobStack)
{
Console.WriteLine(job);
}
//be sure to close `c` with `YMConnect.CloseConnection` when the application is done
Output
Code (0): OK
TEST2
TEST3