# Change Job Through the PLC

You can swap the currently loaded job A job is a user-configured program in Spreadsheet consisting of functions and designed for specific applications. You can create and edit jobs using the Spreadsheet interface, and load them on a vision system for deployment in a live environment. with another job stored on the vision system while the device is Offline. Changing jobs allows you to modify every aspect of the application on the fly (such as the HMI or the input/output settings as well), at the cost of the following drawbacks:

- Slow swapping time (a minimum of 3-5 seconds, with the actual duration depending on the contents of the job, such as the number of LatchImage cells in the spreadsheet.
- The vision system must be Offline when initiating the job change.
- The WebHMI The operator interface through which the operator interacts with the vision system. must be reloaded.
- The I/O system is de-energized for a longer period.
- The In-Sight EasyBuilder adapter may lose changes, if it is open.
- The WebHMI and the I/O settings must be duplicated between jobs, even if they remain the same.

You can change jobs with a PLC A Programmable Logic Controller is a ruggedized computer that you can use for automating processes or even an entire production line. by two means:

- By name: You can change jobs by specifying their name (without the *.jobx extension). In this case, the PLC supplies the ASCII character string in the userdata segment corresponding to the name of the job you want to switch to.

  For example, if you supply the string "myjob" in the userdata segment, then the vision system loads the myjob.jobx job once the PLC executes the load command (0x4000 in hexadecimal, or 16384 in decimal value).

- By ID: You can also change jobs by specifying their ID (an integer between 0x0-0x3E7 in hexadecimal, or 0-999 in decimal value). Once the PLC executes the load command, the vision system loads the job if it finds one whose name contains the specified ID number.

  For example, if you have a job named 111_myjob stored on the vision system, then specifying command 111 loads that job.

See the below table for a summary of the available job change commands and command IDs:

Action | CommandID (Hex) | CommandID (Dec)
Load Job by Name | 0x4000 | 16384
Load Job by ID | 0x0-0x3E7 | 0-999

Note:

- Always set the vision system to the Offline state before changing the job through the PLC. Otherwise, the job change request generates an error flagged to the PLC with errorID 0x0401.
- If you specify a job that does not exist on the vision system (that is, it contains no job with specified name or ID, then an error is flagged to the PLC with errorID 0x0402.

See the applicable protocol-specific topic for more information on how to perform a job change:

- For Ethernet/IP, see Load a Job Through an Ethernet/IP PLC.
- For PROFINET, see Load a Job Through a PROFINET PLC.