The CMP instruction requires an array i.e. M10,M11,M12 for the result, in IEC you need to create a global (or local variable)
like Global Identifier Test, Mitsi address M10, Type Array (0..2) of boolean.
Then use test in your code so Test is used as the output of the function Test(0) is on if S1 > S2
Test(1) is on if S1 = S2 & Test(2) is on if S1 < S2.
You really need to start using the symbols in your program as GXiec needs these declared variables GX Developer uses only the memory areas all global but GXIEC sets aside a bank of memory to use as local memories, in GX Developer putting M10 on the output of the cmp function is fine as it assumes M10 M11 M12 are the 3 bits used in the comparison.
GXIEC tries to keep the IEC convention its the same as timers if you use the actual address i.e. TC0 & TS0 it will produce a warning however if you declare these as variables like "Timer_1" as TC0 & "Timer_Contact" as TS0 then you will not get warnings.