Generating IEC Program Code from Cam Data