40
6 CREATING PROGRAMS
6.3 Program Example
5. Convert the resolution to the specified resolution.
This program example performs calculation using 2048 encoder resolution and 1024 resolution for cam output.
Current angle = INT
*1
((Encoder current angle) 1024 2048)
*1 Convert (round down) the real number to an integer.
6. Turn on i_bEN (Execution command) in the main scan processing to start the cam output.
7. Reflect the cam output status set by the cam output FB to Y device to refresh it.