In-Depth Analysis: Siemens PLC OB Block Application Techniques
ORGANIZATION_BLOCK OB1 VAR_TEMP // Temporary variable declaration END_VAR BEGIN // Read input "InputBit" := "I0.0"; // Simple logic processing IF "InputBit" THEN "OutputBit" := TRUE; ELSE "OutputBit" := FALSE; END_IF; // Write output "Q0.0" := "OutputBit"; END_ORGANIZATION_BLOCK In this example, we implemented a simple logic in OB1: when the input I0.0 is TRUE, the output … Read more