The following problem was reported by our Praktikum and has to be checked.
With two parameters the attached procedure fails to compile. Maybe this is problem with INV parameters.
PumpModeChanged: PROC(aNewState INV FIXED(2), aNewPumpRate INV FIXED(31));
DCL state_changed BIT(1);
IF pumpMode /= aNewState THEN
state_changed := ('1'B1);
ELSE
state_changed := ('0'B1);
FIN;
pumpMode := aNewState;
IF state_changed THEN
CASE pumpMode
ALT (pumpState_OFF)
LogInformation('Pump is turning off');
ALT (pumpState_IDLE)
LogInformation('Pump set to idle speed');
ALT (pumpState_ACTIVE)
LogInformation('Pump is active');
OUT
LogWarning('Error: Invalid pump mode');
FIN;
FIN;
END;
Anonymous
This seams to be solved in the meantime.
The following code compiles without errors, The IMC complains about the undefinded procedures.
If the definition of pumpMode is missing the compiler complains:
The message 'internal compiler error' should be removed, since this is already complained with the first error message.
The supression of further error messages concerning the same undefined elements may be object for V2 of the compiler