# Change Program with Input Pulses

You can change programs by sending pulses to Input line 1. The vision sensor initiates a program change when it detects the specified input pulses, differentiated by the width of the pulses. You can use an external device, such as a PLC, to generate and send the pulses to the In-Sight vision sensor:

1. The external device sends a start pulse.

2. The external device sends count pulses, with a pulse gap between each count pulse.

   Note: The number of count pulses indicate the ID of the program to which the vision sensor changes. A valid ID is an integer between 1 and 20.

3. The external device sends a stop pulse.

4. The vision sensor receives and evaluates the pulses:

   - If all pulses and pulse gaps are within tolerance of the specified pulse lengths, the program change request is successful and the program is loaded to the vision sensor.

   - If any of the conditions fail, for example, due to an incorrect pulse or incorrect pulse gap timing, the program change request fails and the program change does not take place.

To change the program on the vision sensor by pulsing Input line 1:

1. On the vision sensor UI, navigate to the Communications tab of the Settings menu, and enable Inputs.

2. On the external device, configure the following pulse characteristics:

   Pulse Characteristic | Length
   Start pulse width | 40 ms
   Stop pulse width | 40 ms
   Count pulse width | 20 ms
   Pulse gap width | 20 ms
   Tolerance | 9 ms

3. Send the pulses to Input line 1 of the vision sensor.

Pulse Train Examples

The following image and table show a valid pulse train to change to program 4.

Number | Notes
1 | The start pulse has a width of 40 ms.
2 | The gap between the start pulse and the first count pulse is 20 ms.
3 | Four count pulses of 20 ms width, with 20 ms gaps between each.
4 | The gap between the last count pulse and the stop pulse is 23 ms, which is within the tolerance limit.
5 | The width of the stop pulse is 38 ms, which is within the tolerance limit.

The following image and table show an invalid pulse train to change to program 3.

Number | Notes
1 | The start pulse has a width of 25 ms, which is outside the tolerance limit.
2 | The gap between the start pulse and the first count pulse is 35 ms, which is outside the tolerance limit.
3 | Three count pulses of varying width, with varying gaps between each. The pulse widths and gaps are all outside the tolerance limits.
4 | The gap between the last count pulse and the stop pulse is 30 ms, which is outside the tolerance limit.
5 | The width of the stop pulse is 20 ms, which is outside the tolerance limit.