The program example provides the following operations on condition that an absolute encoder with 2048 resolution is used
and 1 is assigned to the channel.
• Execution of 0 degree offset
• Execution of the cam output table setting
• Execution of the automatic angle advance function setting
• Execution of the cam output
0 degree offset program
A value based on a specific value (angle) input from the encoder regarded as 0 degree (home position of the device) is stored
as an offset value.
The offset value is A in the following figure. In the program example, the offset value shall be stored in D100.
Cam output table setting program
In the program example, set the following items.
• Set i_uCh (Channel number) to 1.
• Set i_uCamNo (Cam output number) to 0.
• Set the rotation direction to forward.
• Set i_uResolution (Resolution) to 2048.
• Set the output ON/OFF angle of STEP 0 to STEP 7 in i_u16AngleSet (Control angle).
• Set i_bTableDataClear (Table data clear) to OFF in order to prevent clearing cam output table data before setting.
• In this program example, set i_bTableDataSet (Table data set) to off not to develop the cam output table from the control
angle table of the global label.
Clear the interrupt disable state.
6 CREATING PROGRAMS
6.3 Program Example