BECKHOFF TWINCAT 3 / CODESYS — MATCHED ST TEACHING CORE ====================================================== Purpose Compare one small IEC-style function block in two separate projects. This is NOT an importable project, I/O map, safety program or field procedure. FUNCTION_BLOCK FB_PumpCtrl VAR_INPUT Start : BOOL; Stop : BOOL; Feedback : BOOL; Reset : BOOL; FeedbackTimeout : TIME := T#5s; END_VAR VAR_OUTPUT Cmd : BOOL; Fault : BOOL; END_VAR VAR FeedbackTimer : TON; END_VAR (* Ordinary command-state teaching logic. Physical output mapping is separate. *) IF Stop OR Fault THEN Cmd := FALSE; ELSIF Start THEN Cmd := TRUE; END_IF; FeedbackTimer( IN := Cmd AND NOT Feedback, PT := FeedbackTimeout ); IF FeedbackTimer.Q THEN Fault := TRUE; Cmd := FALSE; END_IF; IF Reset AND NOT Cmd AND NOT Feedback THEN Fault := FALSE; END_IF; END_FUNCTION_BLOCK PORTABLE CALL INTENT Pump( Start := StartPulse, Stop := StopRequest, Feedback := PumpFeedbackQualified, Reset := ResetPulse, FeedbackTimeout := T#5s ); PumpCommandRequest := Pump.Cmd; TWINCAT 3 ADAPTER WORK (REQUIRED) - Select and record XAE/XAR build and target identity. - Resolve the TON library/type from controlled TwinCAT references. - Add the PLC project and exact referenced real-time task. - Link typed adapter variables to the approved process-image channels. - Configure boot project, retain/persistent policy and diagnostics. - Compile, activate only under authorization, login, start and test. CODESYS ADAPTER WORK (REQUIRED) - Select and record Development System, compiler, runtime and device package. - Resolve the TON library/type from the controlled Library Manager. - Add the Application, Task Configuration and PROGRAM call. - Map typed adapter variables in the exact device I/O Mapping editor. - Configure boot application, retain/persistent policy and diagnostics. - Compile, login/download or online-change only under authorization, run and test. DO NOT ASSUME PORTABLE Project files; device packages; libraries; pragmas; namespaces; tasks; I/O addresses or update rules; ADS/gateway routes; persistence; boot behavior; online change; visualization; fieldbus; motion; safety; licences; diagnostics. REQUIRED EVIDENCE Run BC-01 through BC-16 from the companion acceptance matrix on both exact targets. Retain build IDs, task settings, mappings and synchronized traces.