Electronic cam, encoder for sequence control as function of position, programmable switch pls