## Programming

### Example : control of turnout A

We’ll look for the orders that must put the turnout in the diverging position, and we’ll bring them by a logical OR on the coil SQ1. Similarly, we’ll look for the orders that must put the turnout in the direct position, and we’ll bring them by a logical OR on the coil RQ1.

According to the route table, turnout A must be made diverging by VOIE 1 OR VOIE 3 OR VOIE 5 or closing of switch A. It must be placed in direct position by BOUCLE or TIROIR or by opening of switch A.

### Explanation of the functioning of the edges

Remember that the switch of the turnout A is connected to the input I1. Assuming that its starting position is open (as in the diagram), the coils TT1 and TT2 do not detect a state change, nothing happens at the contacts T1 and T2 which are controlled respectively by TT1 and TT2. Now if the switch gets closed, TT1 detects that the voltage has passed from 0 to 24 V, which is called a rising edge, and responds by closing its contact T1 during the programmed time, for example 10 ms, which is a sufficient time to command SQ1. Set Q1 means set output Q1 to the high level, i.e. to the 24 V voltage (or to leave it in this state if it was already such before). This output will energize the turnout control relay, which results in controlling the turnout in the diverging position.

If the switch gets opened, TT2 detects that the voltage has passed from 24 V to 0, which is called a falling edge, and responds by closing its contact T2 during the programmed time, for example 10 ms, which is sufficient to command RQ1. Reset Q1 means set output Q1 to the low level, i.e. to the 0 V voltage (or to leave it in this state if it was already such before). This output will de-energize the turnout control relay, which results in controlling the turnout in the direct position.

Of course, if in the meantime an automatic control has occurred, by I8, I9, etc., the turnout may have changed position.