The function F670 K5 is a timer setting, where if the timing value in the program becomes 0, the value stored in RAM becomes valid. It overrules the value of the setting in the program.
F670 K157 is a zone compare instruction. The instruction has several explainations depending off the program it is used in.
See the programming manual "Enhanced F2 series" for a brighter explanation, including some examples.
succes