On request
First, the input signal
1, into the gate sensor: car into the Carin
2, the gate sensor: the car left Carout
3, the sensor on the landing pole, the landing bar rise Sensorup
4, the landing rod under the sensor, the landing rod down Sensordown
Second, the output action
1, landing bar of the birth and drop
2, the change of traffic lights
Iii. state transitions and trigger signals
- S1:idle
- When entering, set the traffic light to a red light, the motor stops.
- When the car into the brake sensor Carin to true, transfer to the State S2
- S2:barrierrising
- Set the motor to turn when entering, keep the light state
- When the upper-level sensor Sensorup becomes true, it is transferred to the State S3
- S3:cardriving
- When entering, set the light to be green, the motor stops
- When the car gate sensor Carout to True, move to the state S4
- S4:barrierfalling
- Set the motor to reverse when entering, keep the traffic light state
- When the current limit sensor Sensordown to true, move to the state S1
The second week work Parking access control System state machine