Beckhoff First Scan Bit ((link)) Jun 2026
Many EtherCAT terminals require a one-time configuration command after start-up to function correctly. The first scan bit is the perfect place to send these commands.
property, the code can detect if it is running for the first time. For example, in Structured Text (ST):
Forcing state machines (such as an ISA-88 batch model or sequential function charts) to go back to an explicit INIT or IDLE state upon power loss or reboot. beckhoff first scan bit
Have a tricky Beckhoff initialization issue? Share your experience in the comments or contact your local Beckhoff automation partner.
, FALSE , or NULL ). However, your machine might need specific initial states, such as: Setting a default speed for a conveyor. Loading default recipes. Activating a specific user interface screen. Clearing temporary alarms. Initializing function blocks. For example, in Structured Text (ST): Forcing state
PROGRAM MyProgram VAR InitDone : BOOL; MyVar1 : INT; MyVar2 : REAL; END_VAR
In TwinCAT 3 (and TwinCAT 2), the FirstScan bit is a available inside every Programmable Organization Unit (POU) — specifically within the VAR_TEMP or implicitly as FirstScan in the PLC runtime. It is TRUE for exactly one PLC cycle after the application transitions from STOP to RUN or after a cold/warm start. From the second cycle onward, it becomes and remains FALSE until the next restart. , FALSE , or NULL )
The first scan bit is a powerful tool for solving specific programming challenges. Here are the most common and critical scenarios where its use is considered a best practice:










