Operation modes of an APPLE II type undulator