Cam output program
Arrange this FB in the 1 ms interrupt processing.
In the program example, set the following items.
• Set i_uCh (Channel number) to 1.
• Enable or disable the 48 points in i_b48CamOutputNo (Cam output number).
The program example uses the following labels.
Label name
b48CamNo
b48CamOut
1.
Enable the cam output number 0.
2.
Read the current angle of the encoder.
Refresh the status of the X terminal for 11 bits on the assumption of 2048 resolution.
3.
When the gray code is output from the absolute encoder, the gray code data is converted to BIN 16-bit data.
4.
Add (subtract) the offset value D100 saved in the 0 degree offset program to offset the current angle.
Date type
Bit (0..47)
Bit (0..47)
Class
VAR
VAR
6 CREATING PROGRAMS
6.3 Program Example
6
39