# Change Program Through the PLC

You can swap the currently loaded program with another program stored on the vision sensor when you enable Inputs. You can change programs with a PLC by specifying a program ID. The ID is an integer between 0x0-0x14 in hexadecimal, or 0-20 in decimal value. Once the PLC executes the load command, the vision sensor loads the program if it finds one whose name contains the specified ID number.

Note:

- Always enable Inputs on the vision sensor before changing the program through the PLC. Otherwise, the program change request generates an error flagged to the PLC with errorID 0x0401.
- If you specify a program that does not exist on the vision sensor, that is, it contains no program with the specified ID, then an error is flagged to the PLC with errorID 0x0402.

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