Specifications
Sample project creation with MT Developer2 and GX Developer Project creation
Motion controller Q170MCPU/ Q172DCPU/ Q173DCPU 5 - 7
Prepare an SFC program. The sample program below allows a simple forward and backward
movement of Axis 1.
Step Description
5a
Add an F-block, 2 x G-block, 2 x K-block, a Jump, and a Pointer to the program by left-clicking the respective button on the menu bar
and left-clicking in the program workspace. Press the Esc key (or right click) after adding each block to the workspace.
5b
Double-click the F-block, enter "0" for the program number. Next, press Enter or click the Edit button. In the Program Editor window,
type "SET M2402". The common system device M2402 enables "Servo On" for all axes when set.
5c
Double-click the G-block, enter "0" for the program number. Next, press Enter and then input the text "M2415". The axis status device
M2415 shows if axis 1 is ready. We are telling the controller to wait until the axis is fully initialized before moving on to the next step.
Without such a delay in front of a motion command (K-block), an error is likely to occur.
5d
Double-click the K-block, enter "1" for the program number. Next, press Enter and select "Linear Interpol." as the Command Class and
"INC-1" as the Servo Command. Click OK. The Servo Program Editor window will now open.
In the Servo Program Editor window, set the Axis to 1 and the travel amount to 20000 PLS. Then set the Speed to 20000 PLS/s.
5e
Repeat step 5c.
5f
Repeat step 5d changing the travel amount to -20000 PLS.
5g
Connect each function block to the one after it by clicking the Connect button from the menu bar and then left-clicking on one block
and dragging to the next box.
Tab. 5-1: Detailed procedure for preparing the SFC program