1. The OR Operation
OR is the logical disjunction operation. Use it when an output should turn on if at least one of several conditions is satisfied.
Output = Input_1 OR Input_2The output is active when Input_1 is active, Input_2 is active, or both are active.
2. Where OR Is Used
OR combines different causes of the same result:
- an alarm activates when any fault signal is active;
- a start request comes from a physical button or HMI;
- an elevator call comes from a landing button or cabin button;
- a warning indicates overheating or low pressure;
- a stop request comes from Stop or an external inhibit.
3. The Basic OR Rule
OR produces TRUE if at least one input is TRUE. Only when every input is FALSE is the result FALSE.
| Input_1 | Input_2 | Output_1 |
|---|---|---|
| FALSE | FALSE | FALSE |
| TRUE | FALSE | TRUE |
| FALSE | TRUE | TRUE |
| TRUE | TRUE | TRUE |
4. FBD Diagram
OR has several inputs and one output:
[Input_1] ─────┐
├── [OR] ──> [Output_1]
[Input_2] ─────┘Any active input makes the output TRUE.
5. Example: Starting from Two Locations
A mechanism can be started from a button or operator panel:
| Signal | Type | Purpose |
|---|---|---|
| Start_Button | Input | Physical Start button |
| HMI_Start | Input | Start command from the operator panel |
| Start_Request | Internal signal | Combined start request |
Start_Request = Start_Button OR HMI_Start| Start_Button | HMI_Start | Start_Request |
|---|---|---|
| FALSE | FALSE | FALSE |
| TRUE | FALSE | TRUE |
| FALSE | TRUE | TRUE |
| TRUE | TRUE | TRUE |
Either command source activates Start_Request.
6. Example: A Common Alarm
OR can combine several individual faults:
| Signal | TRUE means |
|---|---|
| Motor_Overload | Motor overload |
| Low_Pressure | Low air pressure |
| Door_Open_Alarm | Door open during hazardous operation |
| Common_Alarm | At least one fault is active |
Common_Alarm = Motor_Overload OR Low_Pressure OR Door_Open_AlarmAny listed fault activates Common_Alarm. In the lesson's JSON diagram, this output is named Alarm.
7. OR and Equipment Stops
OR also combines reasons to stop:
Stop_Request = Stop_Button OR Emergency_Active OR External_StopThe result can reset a latch, stop a conveyor, or inhibit starting. Real safety circuits require separate engineering rules; a simple software OR is only the logical principle demonstrated here.
8. Simulator Practice
Open the lesson's common-alarm example and start the simulation.
- 1. Leave Motor_Overload, Low_Pressure, and Door_Open_Alarm FALSE; check Alarm = FALSE.
- 2. Set each input TRUE in turn and check that Alarm becomes TRUE.
- 3. Set several inputs TRUE and confirm that Alarm remains TRUE.
- 4. Return all inputs to FALSE; check that Alarm turns off.
For a two-input exercise, open the OR example in the examples catalog and test High_Level and Manual_Test against Alarm_Request.
9. Key Points
- OR produces TRUE when at least one input is TRUE.
- Use OR for requests, common alarms, and multiple stop causes.
- Keep commands and permissives distinct when combining OR with AND.
Practice block
Open the related example in the editor, run the simulation, and repeat the exercise from the article. The JSON is also available as a direct download.