IF Tek_schet<>Tek_schet_p THEN
M1:=TRUE;
ELSE
M1:=FALSE;
END_IF;
Это индусский код. Надо M1 := Tek_schet <> Tek_schet_p