Awlsim - STEP 7 compatibility

The execution of AWL/STL programs by Awlsim is supposed to be fully compatible with the execution of compiled AWL/STL programs on the real Siemens S7 CPU. However, there currently are some known differences. These are listed below. Any undocumented difference between Awlsim and STEP 7 is considered to be a bug that should be reported.

Awlsim extensions

Extensions are features that Awlsim supports, but STEP 7 does not support.

// Load a pointer to VARIABLE with DBX area code into accu 1.
// Note that the DB number information is lost (32 bit pointer).
L  P#DB1.VARIABLE

// Pass pointer immediates as actual values in calls.
// Values are passed as DB pointer or ANY pointer, according to the
// parameter type.
CALL  FC 1 (
    POINTER_VAR := P#DB1.VARIABLE,
    ANY_VAR     := P#DB1.VARIABLE,
)

However, for the pointer parameter passing in CALL you could just write it in an S7 compatible way without the P# prefix.