Magnetic measurements on compounds with K2NiF4 structure