9-1 The Methods of NC Positioning Control
People use ordinary motor to exercise positioning control in early stage; since the speed and precision demand was not so high then, it was enough to fulfill the demand. As the increasing of mechanical operation speed for the efficiency purpose, finished product quality standard, and precision demands are getting higher, the stopping position control of motor is no more what the ordinary motor is capable to do. The best solution for this problem is to adopt NC positioning controller which incorporate with stepping or servo motor to do the position control. In the past, the extremely high cost limited the prevailing of its usage; however, the technology advance and cost decreasing, which made the pricing affordable, had helped to increase the prevailing of usage gradually. To cope with this trend, M-Series PLC integrated into its internal SoC chip the special NC positioning controller that is available on the market, therefore makes it free from the bothersome data transaction and linking procedure between PLC and special NC positioning controller. Furthermore, it greatly lowered the entire gadget cost hence provides the user the solution for a good bargain, high quality, simple, and convenient integrated NC positioning control with PLC.
Controlling stepping or servo drives with high-speed pulses is often used. The M-series CPU Unit includes multi-axis high-speed pulse output and high-speed hardware counters, and can provide easy-to-use and designed positioning program editing.
The methods for controlling interface of PLC and stepping or servo driver are as follows:
The PLC is responsible for sending high speed pulse command to servo driver. The motion detector installed on servo motor will forward directly to server driver, closed loop reaches only to server driver and servo motor. The superior point is that the control is simple and the precision is satisfactory (which is suitable for most of the applications). The defect is that it can’t fully reflect the actual shift amount after the transmission element; furthermore, the element being consumed, become aging, or has defect will not be able to be compensated nor checked to verify.
The PLC is responsible for sending high speed pulse command to servo driver. In addition to that the shift detection signal installed on servo motor which will be forwarded directly to servo driver, the attached shifting detector installed after the transmission element can fully reflect the actual shift amount and forward it to the high-speed counter that PLC contains. So as to make the control becomes more delicate, and help to avoid the defect of above mentioned semi closed loop.
9-2 Absolute Coordinate and Relative Coordinate
The designation of moving distance can be assigned by absolute location (absolute coordinate positioning), or assigned by relative distance (relative coordinate positioning). And the DRV instruction is used to drive motor.
While marking the moving distance with absolute coordinate,
If it is located at 100mm at the present, for moving to 300 mm, the positioning instruction is:
DRV ABS, ,300, Ut
If it is located at 300mm at the present, for moving to 0 mm, the positioning instruction is:
DRV ABS, ,0, Ut
While marking the moving distance with relative coordinate,
if it is located at 100mm at the present, for moving to 300 mm, the positioning instruction is :
DRV ADR,+,200, Ut
if it is located at 300mm at the present, for moving to 0mm, the positioning instruction is:
DRV ADR,-,300, Ut
- Absolute coordinate labeling
|
Program coding for location of 300mm moving to 0mm:
|
|
|
|
|
|
|
DRV ABS, , 0,Ut
|
|
|
...
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
-100
|
0
|
100
|
200
|
300
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Program coding for location of 100mm moving to 300mm:
|
|
|
DRV ABS, ,300,Ut
|
- Relative coordinate labeling
|
Program coding for location of 300mm moving to 0mm:
|
|
|
|
|
|
|
DRV ADR,-,300,Ut
|
|
|
...
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
-100
|
0
|
100
|
200
|
300
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Program coding for location of 100mm moving to 300mm:
|
|
|
DRV ADR,+,200,Ut
|
9-3 Procedures of Using Positioning Control
|
Start
|
|
|
|
|
|
|
|
Configure the high-speed pulse output (HSPSO) function under UperLogic configuration function. Switch specific digital outputs of M Series-PLC to HSPSO circuit in the SoC, and determine the working mode of output pulse (UD, PR, AB, and PLS), and complete the hardware wiring layout between PLC and positioning driver.
|
|
|
|
|
|
|
|
Each axis of motor is controlled by one FUN140 (it can also by more than one, but only one can be active at any time); then employs the FUN140 extended positioning instruction (SPD, DRV, etc.) to coding for the needed positioning control program that will be saved into register block assigned by FUN140 SR operand. Once the FUN 140 input control started, it can exercise the positioning controls.
|
——
|
Please refer to FUN140 and its extended positioning instruction for the function and usage explanation.
|
|
|
|
|
|
If it needs to do close loop control, it can employ the M-Series PLC hardware high speed counter to count the feedback pulse (e.g. Encoder etc.) after transmission element to achieve.
|
|
|
|
|
|
|
|
End
|
|
|
9-3-1 Configuration of Positioning Axis
In project window, click “I/O Configuration Setup”: Project name
System configuration
I/O configuration 🡪 Select “Output Setup”
When Output Setup picture is displayed, you may decide the output item.
Figure 49 Plan High-Speed Pulse Output (HSPSO)
9-3-2 Output of Positioning Axis
The output pulse frequency of M-Series PLC can reach 200KHz (the upper limit varies with different models). High speed pulse output circuit share to use the Y0~Y15 (the upper numbers varies with different models) exterior output of PLC. While it is not yet using the HSPSO function (haven’t configured the PSO function under configuration function), the Y0~Y15 exterior output of M-Series PLC is corresponding to the Y status of internal output relay. When the HSPSO has been configured, the external output point will be switched to the HSPSO output circuit, not used as the original output relay.
The following is the detailed signals, output modes and supportive frequency list for respective axis output with the largest specification:
|
Axis No.
|
|
Exterior output
|
Output modes
|
|
U/D output
|
P/R output
|
A/B output
|
Single PLS output
|
|
PSO0
|
MQ/MA/MS/ME
|
Y0, Y1
|
Y0=U, Y1=D
|
Y0=P, Y1=R
|
Y0=A, Y1=B
|
Y0=P
|
|
PSO1
|
Y2, Y3
|
Y2=U, Y3=D
|
Y2=P, Y3=R
|
Y2=A, Y3=B
|
Y2=P
|
|
PSO2
|
Y4, Y5
|
Y4=U, Y5=D
|
Y4=P, Y5=R
|
Y4=A, Y5=B
|
Y4=P
|
|
PSO3
|
Y6, Y7
|
Y6=U, Y7=D
|
Y6=P, Y7=R
|
Y6=A, Y7=B
|
Y6=P
|
|
PSO4
|
MA/MS/ME
|
Y8, Y9
|
Y8=U, Y9=D
|
Y8=P, Y9=R
|
Y8=A, Y9=B
|
Y8=P
|
|
MQ
|
Y16, Y17
|
Y16=U, Y17=D
|
Y16=P, Y17=R
|
Y16=A, Y17=B
|
Y16=P
|
|
PSO5
|
MA/MS/ME
|
Y10, Y11
|
Y10=U, Y11=D
|
Y10=P, Y11=R
|
Y10=A, Y11=B
|
Y10=P
|
|
MQ
|
Y18, Y19
|
Y18=U, Y19=D
|
Y18=P, Y19=R
|
Y18=A, Y19=B
|
Y18=P
|
|
PSO5
|
MA/MS/ME
|
Y12, Y13
|
Y12=U, Y13=D
|
Y12=P, Y13=R
|
Y12=A, Y13=B
|
Y12=P
|
|
MQ
|
Y20, Y21
|
Y20=U, Y21=D
|
Y20=P, Y21=R
|
Y20=A, Y21=B
|
Y20=P
|
|
PSO7
|
MA/MS/ME
|
Y14, Y15
|
Y14=U, Y15=D
|
Y14=P, Y15=R
|
Y14=A, Y15=B
|
Y14=P
|
|
MQ
|
Y22, Y23
|
Y22=U, Y23=D
|
Y22=P, Y23=R
|
Y22=A, Y23=B
|
Y22=P
|
Table 18 The detailed signals, output modes and supportive frequency list for respective axis output
9-4 Positioning Control Function
The built-in M-series CPU Unit can control positioning motion of up to 8 axes (the upper limit varies with different models), and provides point-to-point positioning speed control. The NC positioning control instructions used are based on the previous generation of PLC FBs/B1 series, on which compatibility is provided and other application-type instructions are added, such as interrupt fixed length (ICF) and interrupt fixed angle (ICA), etc. If you want to use the M-series CPU Unit to drive the servo or stepping motor through the pulse, as long as the circuit structure and frequency can be matched, it can work normally.
9-4-1 Stepping Motor Interface

Figure 50 Schematic diagram of signal transmission between stepping motor and PLC
Stepping motor is designed to receive input pulse to attain to the control of desired angle or distance, therefore the turning angle and the input pulse count has a positive correlation ship, and the turning speed also depends on the input pulse frequency.
N: Revolving speed of motor (RPM)
N (RPM) = 60×f/n f: Pulse frequency (PLS/Sec)
n: Pulse counts for motor to turn for a revolution (PLS/ Rev)
n = 360 / θs θs:Angle (Deg)
|
Phase
|
Basic pulse angle
|
FULL
|
HALF
|
|
Pulse angle
|
Pulse counts for turning one revolution
|
Pulse angle
|
Pulse counts for turning one revolution
|
|
5 phases
|
0.36°
|
0.36°
|
1000
|
0.18°
|
2000
|
|
0.72°
|
0.72°
|
500
|
0.36°
|
1000
|
|
4 phases
|
0.90°
|
0.90°
|
400
|
0.45°
|
800
|
|
2 phases
|
1.80°
|
1.80°
|
200
|
0.90°
|
400
|
Table 19 Comparison table of motor phases, pulse angles and pulse counts for turning one revolution
9-4-2 Interface of Servo Motor

Figure 51 Schematic diagram of signal transmission between Servo motor and PLC
- Except that the Y0~Y7 of above diagram are for dedicated purpose, Y8~Y11 and respective inputs can be adjusted for using according to demand.
- The leftover travel, right over travel limit switches for safety detection also need to be connected to PLC to assure proper operation.
9-4-3 Working Diagram Illustration for Servo Motor

Figure 52 Working diagram illustration for Servo Motor
- The Encoder of servo motor feedback the shifting detection signal to servo driver. The driver gets the pulse frequency, and pulse count of input signal (pulse instruction), as well as the frequency and pulse count of feedback signal processed with internal error counter and frequency to voltage conversion circuit, and acquired the pulse and turning speed deviations. Using these operations to control the servo motor, so as to obtain a high speed, precise speed and positional closed-loop processing system.
- The revolving speed of servo motor depends on the pulse frequency of input signal; the turning stroke of motor is determined by pulse count.
- Generally speaking, the final control error deviation of servo motor is 1 pulse.
9-5 NC Positioning Control Instruction
Interrupt Constant Angle (ICA)
FUN137 is based on the initial angle at 0 degree, it is positioned in fixed angle when exterior interrupt is detected.
Interrupt Constant Feed (ICF)
FUN138 outputs specific amount of movement when exterior interrupt is detected.
High-Speed Pulse Width Modulation (HSPWM)
FUN139 outputs PWM waveform with specified pulse width and frequency, but the output waveform is limited by the internal formula, which is reserved because it is compatible with the previous PLC FBs/B1 series. FUN144 can provide more direct control.
High-Speed Pulse Output (HSPSO)
FUN140 executes NC control through positioning table, which includes the following 9 extension positioning instructions:
1. SPD 4. DRVZ 7. EXT
2. DRV 5. WAIT 8. GOTO
3. DRVC 6. ACT 9. MEND
Also, S and T curve can be selected as needed.
Parameter Setting for Positioning Program(MPARA)
FUN141 sets parameters such as moving unit, acceleration and deceleration, and return to origin, which will take effect on the specified positioning axis.
Enforcing Pulse Output Stop(PSOFF)
FUN142 stops pulse output of the specified axis.
Converting the Current Pulse Value to Displaying Value(PSCNV)
FUN143 converts units of movement.
High-Speed Pulse Width Modulation 2 (HSPWM2)
FUN144 generates PWM waveform of easily adjustable frequency and pulse width.
Multi-Axis High Speed Pulse Output (MHSPO)
FUN147 performs linear interpolation on designated axis groups.
Manual Pulse Generator for Positioning (MPG)
FUN148 carries out manual pulse action for a positioning axis.
Arc High Speed Pulse Output (AHSPO)
FUN149 performs circular interpolation on designated axis groups.
9-5-1 Interrupt Constant Angle (ICA)
|
FUN137
ICA
|
Interrupt Constant Angle
|
FUN137
ICA
|
|
Symbol
|
|
|

|
Ps:The set number of Pulse Output (0~7)
0:Y0 & Y1
1:Y2 & Y3
2:Y4 & Y5
3:Y6 & Y7
4:MQ Y16 & Y17, Y8 & Y9 otherwise
5:MQ Y18 & Y19, Y10 & Y11 otherwise
6:MQ Y20 & Y21, Y12 & Y13 otherwise
7:MQ Y22 & Y23, Y14 & Y15 otherwise
Ls:External input point X index number
Fo:Target Working Speed
(1~100000 or 1~200000)
Ag:Fixed angle during interrupt (0~36000)
|
|
Range
Operand
|
X
|
WX
|
WY
|
WM
|
WS
|
TMR
|
CTR
|
HR
|
IR
|
OR
|
SR
|
ROR
|
DR
|
K
|
|
Xn
|
WX0
∣
WX1008
|
WY0
∣
WY1008
|
WM0
∣
WM19578
|
WS0
∣
WS3088
|
T0
∣
T1023
|
C0
∣
C1279
|
R0
∣
R34767
|
R34768
∣
R34895
|
R35024
∣
R35151
|
R35280
∣
R43223
|
R43224
∣
R47319
|
D0
∣
D7999
|
|
|
Pw
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0~7
|
|
Ls
|
○
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fo
|
|
|
|
|
|
|
|
○
|
|
|
|
○
|
○
|
1 ~ 100000 or 1~ 200000
|
|
Ag
|
|
|
|
|
|
|
|
○
|
|
|
|
○
|
○
|
0~36000
|
|
|
FUN137
ICA
|
Interrupt Constant Angle
|
FUN137
ICA
|
|
Instruction
|
|
|
- The positioning axis can be controlled up to PSO7, but the actual maximum axis number that can be controlled varies with the CPU Unit machine model.
- The target working speed and the maximum frequency may vary according to the CPU Unit models as 100K or 200K.
- In general and advanced motion control CPU Units, external input points X8~X15 are reserved for the motion function and not supported by this command.
- The external input point does not need additional special configuration in the interrupt setting in the I/O configuration. The relevant settings will be automatically made when the command is executed.
|
9-5-2 FUN 138 Interrupt Constant Feed (ICF)
|
FUN138
ICF
|
Interrupt Constant Feed
|
FUN138
ICF
|
|
Symbol
|
|
|

|
Ps:The set number of Pulse Output (0~7)
0:Y0 & Y1
1:Y2 & Y3
2:Y4 & Y5
3:Y6 & Y7
4:MQ Y16 & Y17, Y8 & Y9 otherwise
5:MQ Y18 & Y19, Y10 & Y11 otherwise
6:MQ Y20 & Y21, Y12 & Y13 otherwise
7:MQ Y22 & Y23, Y14 & Y15 otherwise
Ls:External input point X index number
Fo:Target Working Speed
(1~100000 or 1~200000)
Fd:Amount of pulse wave movement after interrupt capture
|
|
Range
Operand
|
X
|
WX
|
WY
|
WM
|
WS
|
TMR
|
CTR
|
HR
|
IR
|
OR
|
SR
|
ROR
|
DR
|
K
|
|
Xn
|
WX0
∣
WX1008
|
WY0
∣
WY1008
|
WM0
∣
WM19578
|
WS0
∣
WS3088
|
T0
∣
T1023
|
C0
∣
C1279
|
R0
∣
R34767
|
R34768
∣
R34895
|
R35024
∣
R35151
|
R35280
∣
R43223
|
R43224
∣
R47319
|
D0
∣
D7999
|
|
|
Pw
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0~7
|
|
Ls
|
○
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fo
|
|
|
|
|
|
|
|
○
|
|
|
|
○
|
○
|
1 ~ 100000 or 1~ 200000
|
|
Fd
|
|
|
|
|
|
|
|
○
|
|
|
|
○
|
○
|
○
|
|
|
FUN138
ICF
|
Interrupt Constant Feed
|
FUN138
ICF
|
|
Description
|
|
|
- The positioning axis can be controlled up to PSO7, but the actual maximum axis number that can be controlled varies with the CPU Unit machine model.
- The target working speed and the maximum frequency may vary according to the CPU Units as 100K or 200K.
- In general and advanced motion control CPU Units, external input points X8~X15 are reserved for the motion function and not supported by this command.
- The external input point does not need additional special configuration in the interrupt setting in the I/O configuration. The relevant settings will be automatically made when the command is executed.
|
9-5-3 FUN139 High-Speed Pulse Width Modulation (HSPWM)
|
FUN139
HSPWM
|
High-Speed Pulse Width Modulation
|
FUN139
HSPWM
|
|
Symbol
|
|
|

|
Pw: Output of High-Speed Pulse Width Modulation
0 : Y0
1 : Y2
2 : Y4
3 : Y6
4 : MQ Y16, Y8 otherwise
5 : MQ Y18, Y10 otherwise
6 : MQ Y20, Y12 otherwise
7 : MQ Y22, Y14 otherwise
Op: Output polarity;
0=Output non-reversed phase
1=Output reversed phase
Rs: Resolution;
0=1/100 (1%)
1=1/1000 (0.1%)
Pn: Setting of output frequency parameter (0~255)
OR: PWM Output Width Setting Register
0~100 or 0~1000
WR: Instruction operation work register, other programs cannot be reused.
|
|
Range
Operand
|
Y
|
WX
|
WY
|
WM
|
WS
|
TMR
|
CTR
|
HR
|
IR
|
OR
|
SR
|
ROR
|
DR
|
K
|
|
Yn
|
WX0
∣
WX1008
|
WY0
∣
WY1008
|
WM0
∣
WM19578
|
WS0
∣
WS3088
|
T0
∣
T1023
|
C0
∣
C1279
|
R0
∣
R34767
|
R34768
∣
R34895
|
R35024
∣
R35151
|
R35280
∣
R43223
|
R43224
∣
R47319
|
D0
∣
D7999
|
|
|
Pw
|
○
|
|
|
|
|
|
|
|
|
|
|
|
|
0~3
|
|
Op
|
○
|
|
|
|
|
|
|
|
|
|
|
|
|
0~1
|
|
Rs
|
○
|
|
|
|
|
|
|
|
|
|
|
|
|
0~1
|
|
Pn
|
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
0~255
|
|
OR
|
|
|
|
|
|
|
|
○
|
|
|
|
○
|
○
|
0~1000
|
|
WR
|
|
|
○
|
○
|
○
|
○
|
○
|
○
|
|
○
|
○
|
○
|
○
|
|
|
|
FUN139
HSPWM
|
High-Speed Pulse Width Modulation
|
FUN139
HSPWM
|
|
Description
|
|
|
- When the execution control "EN"=1, the output point specified by this command will output at the frequency determined by the following formula with the specified pulse width.
1. , when Rs (Resolution) is set 1/100
2. , when Rs (Resolution) is set 1/1000
|
|
Example 1
|
If Pn (Parameter of output frequency) =50, Rs (Resolution)=0
|
|
= 3614.117……≒3.6KHz
T(Cycle)= ≒277uS
Resolution= 1/100,
If OR (Output Width) =1 then To≒2.7uS; OR (Output Width) =50 then To≒140uS。
Diagrams are shown below:
- Pn (Parameter of output frequency) =50, Rs=0 (Resolution =1/100), OR (Output Width) =1
Output Waveform:

- Pn (Parameter of output frequency) =50, Rs=0 (Resolution =1/100), OR (Output Width) =50
Output Waveform:

|
|
FUN139
HSPWM
|
High-Speed Pulse Width Modulation
|
FUN139
HSPWM
|
|
Example 2
|
If Pn (Parameter of output frequency) is set 200, Rs (Resolution)=1
|
|
≒ 91.7Hz; T(Cycle) = ≒10.9mS
Rs (Resolution) =1/1000,
If OR(Output Width) =10 then To≒109uS; OR(Output Width)=800 then To≒8.72mS.
Diagrams are shown below:
- Pn (Parameter of output frequency) =200, Rs=1(Resolution=1/1000), OR (Output Width) =10
Output Waveform:

- Pn (Parameter of output frequency) =200, Rs=1(Resolution=1/1000), OR (Output Width) =800
Output Waveform:

|
9-5-4 FUN140 High Speed Pulse Output(HSPSO)
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
Symbol
|
|
|

|
Ps : The set number of Pulse Output (0~7)
0:Y0 & Y1
1:Y2 & Y3
2:Y4 & Y5
3:Y6 & Y7
4:MQ Y16 & Y17, Y8 & Y9 otherwise
5:MQ Y18 & Y19, Y10 & Y11 otherwise
6:MQ Y20 & Y21, Y12 & Y13 otherwise
7:MQ Y22 & Y23, Y14 & Y15 otherwise
SR: Starting register for positioning program
WR: Starting register for instruction operation controls 7 registers, which the other program cannot repeat in using.
|
|
Range
Operand
|
HR
|
ROR
|
DR
|
K
|
|
R0
∣
R34767
|
R43224
∣
R47319
|
D0
∣
D7999
|
|
|
Ps
|
|
|
|
0-3
|
|
SR
|
○
|
○
|
○
|
|
|
WR
|
○
|
○*
|
○
|
|
|
|
Description
|
|
- The positioning axis can be controlled up to PSO7, but the actual maximum axis number that can be controlled varies with the CPU Unit machine model.
- The NC positioning program of FUN140 (HSPSO) instruction is a program written and edited with text programming. We named every position point as a step (which includes output frequency, traveling distance, and transfer conditions). For one FUN140, it can be arranged with 250 steps of positioning points at the most, with every step of positioning point controlled by 9 registers.
- The best benefit to store the positioning program into the registers is that in the case of association with MMI (Man Machine Interface) to operate settings, it may save and reload the positioning program via MMI when replacing the molds.
- When execution control “EN”=1, if the other FUN140 instructions to control Ps0~3 are not active (corresponding status of Ps0=M9183, Ps1=M9184, Ps2=M9185, and Ps3=M9186 will be ON), it will start to execute from the next step of positioning point (when goes to the last step, it will be restarted from the first step to perform); if Ps0~3 is controlled by other FUN140 instruction (corresponding status of Ps0=M9183, Ps1=M9184, Ps2=M9185, and Ps3=M9186 would be OFF), this instruction will acquire the pulse output right of positioning control once the controlling FUN140 has released the control right.
- When execution control input “EN” =0, it stops the pulse output immediately.
- When output pause “PAU” =1 and execution control “EN” was 1 beforehand, it will pause the pulse output.
When output pause “PAU” =0 and execution control is still 1, it will continue the unfinished pulse output.
- When output abort “ABT” =1, it stops pulse output immediately. (When the execution control input “EN” becomes 1 next time, it will restart from the first step of positioning point to execute.)
- While the pulse is in output transmitting, the output indication “ACT” is ON.
- When there is execution error, the output indication “ERR” will be ON.
(The error code is stored in the error code register.)
- When each step of positioning point is complete, the output indication “DN” will be ON.
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
*** The working mode of Pulse Output must be set (without setting, corresponding points will be treated as general output) to be one of U/D, P/R, A/B or PLS modes, thus the Pulse Output may have a regular output.
U/D Mode: Upward counting pulse will be generated out of the corresponding point.
Downward counting pulse will be generated out of the corresponding point.
P/R Mode: Normal pulse will be generated out of the corresponding point.
Directional signal will be generated out of the corresponding point.
ON=upward counting, OFF= downward counting.
A/B Mode: Phase A pulse will be generated out of the corresponding point.
Phase B pulse will be generated out of the corresponding point.
The output polarity for Pulse Output can select to be Normal ON or Normal OFF.
【The interfaces for positioning control】
|
M9183
|
ON: Ps1 Ready
|
|
OFF: Ps1 is in action
|
|
M9184
|
ON: Ps1 Ready
|
|
OFF: Ps1 is in action
|
|
M9185
|
ON: Ps2 Ready
|
|
OFF: Ps2 is in action
|
|
M9186
|
ON: Ps3 Ready
|
|
OFF: Ps3 is in action
|
|
M9187
|
ON: Ps0 has finished the last step
|
|
M9188
|
ON: Ps1 has finished the last step
|
|
M9189
|
ON: Ps2 has finished the last step
|
|
M9190
|
ON: Ps3 has finished the last step
|
|
M9191
|
ON: Ps4 Ready
|
|
OFF: Ps4 is in action
|
|
M9192
|
ON: Ps5 Ready
|
|
OFF: Ps5 is in action
|
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
M9193
|
ON: Ps6 Ready
|
|
OFF: Ps6 is in action
|
|
M9194
|
ON: Ps7 Ready
|
|
OFF: Ps7 is in action
|
|
M9195
|
ON: Ps4 has finished the last step
|
|
M9196
|
ON: Ps5 has finished the last step
|
|
M9197
|
ON: Ps6 has finished the last step
|
|
M9198
|
ON: Ps7 has finished the last step
|
|
Ps No.
|
Current output frequency
|
Current pulse position
|
The remaining pulse counts to be transmitted
|
Error code
|
Remaining backlash compensation steps
|
|
Ps0
|
DR35328
|
DR35336
|
DR35344
|
R35320
|
R35782
|
|
Ps1
|
DR35330
|
DR35338
|
DR35346
|
R35321
|
R35783
|
|
Ps2
|
DR35332
|
DR35340
|
DR35348
|
R35322
|
R35784
|
|
Ps3
|
DR35334
|
DR35342
|
DR35350
|
R35323
|
R35785
|
|
Ps4
|
DR35655
|
DR35663
|
DR35671
|
R35647
|
R35786
|
|
Ps5
|
DR35657
|
DR35665
|
DR35673
|
R35648
|
R35787
|
|
Ps6
|
DR35659
|
DR35667
|
DR35675
|
R35649
|
R35788
|
|
Ps7
|
DR35661
|
DR35669
|
DR35677
|
R35650
|
R35789
|
|
|
※R35761:
When the low byte value = 5AH, the output frequency can be dynamically changed during high-speed pulse output.
When the low byte value ≠ 5AH, the output frequency cannot be dynamically changed during high-speed pulse output.
R35761 : Default value is 0.
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
R35324:The step number (positioning point) which has been completed of Ps0.
R35325:The step number (positioning point) which has been completed of Ps1.
R35326:The step number (positioning point) which has been completed of Ps2.
R35327:The step number (positioning point) which has been completed of Ps3.
R35651:The step number (positioning point) which has been completed of Ps4.
R35652:The step number (positioning point) which has been completed of Ps5.
R35653:The step number (positioning point) which has been completed of Ps6.
R35654:The step number (positioning point) which has been completed of Ps7.
- Format of positioning program:
SR: Starting register of registers block which reserved to store positioning program, explained as follows:
|
SR
|
A55AH
|
; The effective positioning program; its starting register must be A55AH
|
|
SR+1
|
Total steps
|
; 1~250
|
|
SR+2
|
|
|
|
SR+3
|
|
|
|
SR+4
|
|
|
|
SR+5
|
|
|
|
SR+6
|
|
The first positioning point (step) of positioning program
(Every step controlled by 9 registers).
|
|
SR+7
|
|
|
|
SR+8
|
|
|
|
SR+9
|
|
|
|
SR+10
|
|
|
|
|
|
|
. . .
|
|
|
|
|
|
|
|
|
|
The Nth step of positioning program
|
|
|
|
|
SR+N×9+2
|
|
|
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
Explanation for working register of instruction operation:
WR is the starting register.
|
WR+0
|
Being executed or stopped step
|
|
WR+1
|
Working flag
|
|
WR+2
|
Controlled by system
|
|
WR+3
|
Controlled by system
|
|
WR+4
|
Controlled by system
|
|
WR+5
|
Controlled by system
|
|
WR+6
|
Controlled by system
|
WR+0:If this instruction is in execution, the content of this register represents the step (1~N) being performed. If this instruction is not in execution, the content of this register represents the step where it stopped at present. When execution control “EN”=1, it will perform the next step, i.e. the current step plus 1 (if the current step is at the last step, it will restart to perform from the first step). Before starting the execution control “EN”=1, the user can renew the content of WR+0 to determine starting from which step to perform (when the content of WR+0 =0, and execution control “EN” =1, it represents that the execution starts from the first step).
WR+1 : B0~B7, total steps
B8 = ON, output paused
B9 = ON, waiting for transfer condition
B10 = ON, endless output (the stroke operand of DRV command is set to be 0)
B12 = ON, pulse output transmitting (the status of output indicator “ACT”)
B13 = ON, instruction execution error (the status of output indicator “ERR”)
B14 = ON, finished being executed step (the status of output indicator “DN”)
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
Error indication
|
Error code
|
|
|
R35320(Ps0)
|
0
|
:Error free
|
|
|
R35321(Ps1)
|
1
|
:Parameter 0 error
|
|
|
R35322(Ps2)
|
2
|
:Parameter 1 error
|
|
|
R35323(Ps3)
|
3
|
:Parameter 2 error
|
|
|
4
|
:Parameter 3 error
|
|
|
5
|
:Parameter 4 error
|
|
|
6
|
:Parameter 5 error
|
The possible error codes
|
|
7
|
:Parameter 6 error
|
for FUN141 execution
|
|
8
|
:Parameter 7 error
|
Note: The content of the error indication register will keep the latest error code. If you need to confirm that there is no more error, you can clear the error indication register to 0. As long as the content remains 0, it means there is no error occur.
|
|
9
|
:Parameter 8 error
|
|
|
10
|
:Parameter 9 error
|
|
|
13
|
:Parameter 12 error
|
|
|
14
|
:Parameter 13 error
|
|
|
15
|
:Parameter 14 error
|
|
|
30
|
:Error of variable address for speed setting
|
|
|
31
|
:Error of setting value for speed setting
|
|
|
32
|
:Error of variable address for stroke setting
|
|
|
33
|
:Error of setting value for stroke setting
|
|
|
34
|
:Illegal positioning program
|
|
|
35
|
:Length error of total step
|
|
|
36
|
:Over the maximum step
|
|
|
37
|
:Limited frequency error
|
時
|
|
38
|
:Initiate/stop frequency error
|
The possible error codes
|
|
39
|
:Over range of compensation value for movement
|
for FUN140, FUN147 execution
|
|
40
|
:Over range of moving stroke
|
The possible error codes
|
|
41
|
:ABS positioning is not allowed within DRVC commands
|
|
|
42
|
:DRVC instruction not allow ABS addressing
|
|
43
|
:Driver command code error
|
|
50
|
:Illegal operation mode of DRVZ
|
|
|
51
|
:Illegal DOG input number
|
|
|
52
|
:Illegal PG0 input number
|
|
53
|
:Illegal CLR output number
|
|
60
|
:Illegal linear interpolation command
|
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
Editing Servo Program Table with UperLogic
Click the “Servo Program Table” Item which in project windows:
Project name
Click right button and select “New Table”
Table Edit
Servo Program Table 🡪

|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
- Table Type: It will be fixed to “Servo Program Table”.
- Table Name: For modify or debug, you can give a convenient name.
- Table Starting address: Enter the address which Starting register of Servo Program Table.
※ For detail of servo command table, please refer to Chapter 7 (Table Input and Editing) of the UperLogic Interface Manual, or click command and press Z (shortcut key) to create it.

|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
- For easy programming and trouble-shooting, the UperLogic provides the text editing environment to edit the motion program.
- Extended positioning instructions are listed as follows:
|
Instruction
|
Operand
|
Explanation
|
|
SPD
|
XXXXXX or
Rxxxxx or
Dxxxxx
|
- Moving speed in frequency or velocity (FUN141 Parameter_0=0 represents velocity; Parameter_0=1 or 2 for frequency; the system default is frequency). The operand can be input directly with constant or variable (Rxxxx, Dxxxx); when the operand is variable, it needs 2 registers, e.g. D10 represents D10 (Low Word) and D11 (High Word), which is the setting of frequency or velocity.
- When selecting to use the velocity setting, the system will automatically convert the velocity setting to corresponding output frequency.
- Output frequency range: 1≦output frequency≦200000 Hz.
*** When the output frequency is 0, this instruction will wait until the setting value isn’t 0 to execute the positioning pulse output.
|
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
DRV
|
ADR,+,XXXXXXXX,Ut ADR,+,XXXXXXXX,Ps ADR,−,XXXXXXXX,Ut ADR,−,XXXXXXXX,Ps ADR, , XXXXXXXX,Ut ADR, ,−XXXXXXXX,Ut ADR, , XXXXXXXX,Ps ADR, ,−XXXXXXXX,Ps ADR,+,Rxxxx,Ut ADR,+,Rxxxx,Ps ADR,−,Rxxxx,Ut ADR,−,Rxxxx,Ps ADR, ,Rxxxx,Ut ADR, ,Rxxxx,Ps ADR,+,Dxxxx,Ut ADR,+,Dxxxx,Ps ADR,−,Dxxxx,Ut ADR,−,Dxxxx,Ps ADR, ,Dxxxx,Ut ADR, ,Dxxxx,Ps ABS, , XXXXXXXX,Ut ABS, ,−XXXXXXXX,Ut ABS, , XXXXXXXX,Ps ABS, ,−XXXXXXXX,Ps ABS, ,Rxxxx,Ut ABS, ,Rxxxx,Ps ABS, ,Dxxxx,Ut ABS, ,Dxxxx,Ps
|
- Moving stroke setting in Ps or mm, Deg, Inch.
(When FUN141 Parameter_0=1, the setting stroke in Ut is Ps; Parameter_0=0 or 2, the setting stroke in Ut is mm, Deg, Inch; the system default for Ut is Ps).
- When 4_th operand of DRV is Ut (not Ps), according to parameter setting of 1, 2, 3 of FUN141, the system will convert the corresponding pulse count to output.
- There are 4 operands to construct DRV instruction as follows:
1st operand: coordinate selection.
ADR or ABS: ADR, relative distance movement
ABS, absolute position movement
2_nd operand: revolving direction selection (Valid for ADR only).
‘+’ , forward or clockwise
‘-‘ , backward or counterclockwise
‘ ‘ ,direction is determined by the setting value
(positive value: forward; negative value: backward)
3_rd operand: moving stroke setting
|
|
XXXXXXXX:
or
XXXXXXXX
or Rxxxx
or Dxxxx
|
It can directly input with constant or variable (Rxxxx, Dxxxx); it needs 2 registers when adopting the variable. e.g., R0 represents R0 (Low Word) and R1 (High Word) as the setting of moving stroke.
|
|
*** When the setting of moving stroke is 0 and 1_st operand is ADR, it represents to revolve endless.
Stroke setting range −99999999 ≤ stroke setting ≤ 99999999
4_th operand: resolution of stroke setting
Ut or Ps:for Ut, the resolution is one unit; (it is determined by parameter 0, 3 of FUN141); for Ps, the enforced resolution is one pulse.
|
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
Instruction
|
Operand
|
Explanation
|
|
DRVC
|
ADR,+,XXXXXXXX,Ut
or or or or
ABS, -, Rxxxx ,Ps
or
Dxxxx
|
The usage of DRVC and the operand explanation is the same as DRV’s instruction.
*** DRVC is used to do successive speed changing control (8 speeds at the most).
*** Of the successive speed changing control, only the first DRVC instruction can use the absolute value coordinate for positioning.
*** The revolution direction of DRVC can only be decided by ‘+’ or ‘-’.
*** The revolution direction only determined by the first DRVC of successive DRVC instructions; i.e. the successive speed changing control can only be the same direction.
For example: successive 3 speed changing control
|
|
001 SPD 10000
DRVC ADR,+,20000,Ut
GOTO NEXT
002 SPD 50000
DRVC ADR,+,60000,Ut
GOTO NEXT
003 SPD 3000
DRV ADR,+,5000, Ut
WAIT X0
GOTO 1
|
* Pulse frequency = 10KHz.
* Forward 20000 units.
* Pulse frequency =50 KHz
* Forward 60000 units.
* Pulse frequency = 3KHz.
* Forward 5000 units.
* Wait until X0 ON to restart from the first step to execute.
|
|
Note: The number of DRVC instructions must be the number of successive speeds deducted by 1, i.e. the successive speed changing control must be ended with the DRV instruction.
|
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
Instruction
|
Operand
|
Explanation
|
|
|
The mentioned example above is for successive 3 speeds changing control, which used 2 DRVC instructions and the third must use DRV instruction.
Diagram illustration for the above mentioned example:
|
|
DRVZ
|
MD1
|
DRVZ is a convenient return-to-origin command, MD1. Users can choose the most appropriate return-to-origin mode according to different machine mechanisms.
***For details of MD1 of DRVZ, please refer to Section 9.6 (Machine origin return).
|
Note: Comparison explanation between the relative coordinate positioning (ADR) and the absolute coordinate positioning (ABS)

|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
Instruction
|
Operand
|
Explanation
|
|
WAIT
|
TIME,XXXXX
or Rxxxxx
or Dxxxxx
or X0〜X1023
or Y0〜Y1023
or M0〜M29599
or S0〜S3103
|
- When pulse output is complete, performing the wait instruction for going to the next step. There are 5 kind of operands that explained as follows:
Time: The waiting time (the unit is 0.01 second), it can be directly input with constant or variable (Rxxxx or Dxxxx); when it is time up, performs the step that assigned by GOTO.
- X0〜X1023:Waiting until the input status is ON, it performs the step that assigned by GOTO.
- Y0〜Y1023:Waiting until the output status is ON, it performs the step that assigned by GOTO.
- M0〜M29599:Waiting until the internal relay is ON, it performs the step that assigned by GOTO.
- S0〜S3103:Waiting until the step relay is ON, it performs the step that assigned by GOTO.
|
|
ACT
|
TIME,XXXXX
or Rxxxxx
or Dxxxxx
|
- After the time to output pulses described by operand of ACT, it performs immediately the step that assigned by GOTO, i.e. after the pulse output for a certain time, it performs the next step immediately. The action time (the unit is 0.01 second) can be directly input with constant or variable (Rxxxx or Dxxxx); when the action time is up, it performs the step assigned by GOTO.
|
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
Instruction
|
Operand
|
Explanation
|
|
EXT
|
X0〜X1023
Y0〜Y1023
M0〜M29599
S0〜S999
|
• External trigger instruction; when it is in pulse output (the number of pulses sending is not complete yet), if the status of external trigger is ON, it will perform the step assigned by GOTO immediately. If the status of external trigger is still OFF when the pulse output has been complete, it is the same as WAIT instruction; waiting the trigger signal ON, then perform the step assigned by GOTO.
|
|
GOTO
|
NEXT
1〜N
Rxxxxx
Dxxxxx
|
When matching the transfer condition of WAIT, ACT, EXT instruction, by using GOTO instruction to describe the step to be executed.
NEXT: It represents to perform the next step.
1〜N: To perform the described number of steps.
Rxxxx: The step to be performed is stored in register Rxxxxx.
Dxxxx: The step to be performed is stored in register Dxxxxx.
|
|
MEND
|
|
The end of the positioning program.
|
|
Instruction
|
Operand
|
Explanation
|
|
T-curve
|
|
The T-curve is suitable for low inertia situations, equivalent to 0% of the S-curve, with fast response speed. The disadvantage is that the control rigidity is high.
|
|
S-curve
|
0 ~ 100 %
|
The S-curve is suitable for high inertia control situations and can be adjusted to a proportion of 1-100% as needed. The disadvantage is that it takes longer to reach maximum speed.
|
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
- The coding for positioning programming:
First, it must complete the FUN140 instruction before the editing of positioning program, and assigned in FUN140 instruction the starting register of registers block to store positioning program. While editing the positioning program, it will store the newly edited positioning program to the assigned registers block; for every one positioning point (called as one step) edited, it is controlled by 9 registers. If there are N positioning points, it will be controlled by N × 9 + 2 registers in total.
*** Note: The registers storing the positioning program cannot be repeated in using!
Format and example for the positioning program 1:
001 SPD 5000 ; Pulse frequency = 5KHz.
T curve
DRV ADR,+,10000,Ut ; Moving forward 10000 units.
WAIT Time,100 ; Wait for 1 second.
GOTO NEXT ; Perform the next step.
002 SPD R1000 ; Pulse frequency is stored in DR1000 (R1001 and R1000).
T curve
DRV ADR,+,D100,Ut ; Moving forward, the stroke is stored in DD100 (D101 and D100).
WAIT Time,R500 ; The waiting time is stored in R500.
GOTO NEXT ; To perform the next step.
003 SPD R1002 ; Pulse frequency is stored in DR1002 (R1003 and R1002).
T curve
DRV ADR,−,D102,Ut ; Moving backward, the stroke is stored in DD102 (D103 and D102).
EXT X0 ; When external trigger X0 (slow down point) ON, it performs the next
GOTO NEXT ; step immediately.
004 SPD 2000 ; Pulse frequency = 2KHz.
T curve
DRV ADR,−,R4072,Ps ; Keep outputting the remain (stored in DR4072).
WAIT X1 : Wait until X1 ON,
GOTO 1 : Perform the first step.
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
Program example: Jog forward ward
|
As the jog forward button has been pressed for less than 0.5 second (changeable), it sends out only one (changeable) pulse;
As the jog forward button has been pressed for more than 0.5 second (changeable), it continuously sends pulses out (the frequency is 10KHz, changeable), until the release of the jog forward button to stop the pulse transmitting; or it may be designed to send N pulses out at the most.
|

|
- Clear finish signal.
- Perform from the first step every time.
- When the last step been complete,
set finish signal.
|
|
|
FUN140
HSPSO
|
High Speed Pulse Output
(Including the extended positioning instruction)
|
FUN140
HSPSO
|
|
Program example: Jog Backward
|
As the jog backward button has been pressed for less than 0.5 second (changeable) it sends out only one (changeable) pulse; As the jog backward button has been pressed for more than 0.5 second (changeable), it continuously sends pulses out (the frequency is 10KHz, changeable), until the release of the jog backward button to stop the pulse transmitting; or it may be designed to send N pulses out at the most.

|
- Clear finish signal.
- Perform from the first step every time.
- When the last step been complete, set finish signal.
|
9-5-5 FUN141 Parameter Setting for Positioning Program(MPARA)
|
FUN141
MPARA
|
Instruction of Parameter Setting for Positioning Program
|
FUN141
MPARA
|
|
Symbol
|
|
|

|
Ps: The set number of Pulse Output (0~7).
SR: Starting register for parameter table, it has totally 18 parameters which controlled by 24 registers.
|
|
Range
Operand
|
R
|
IR
|
OR
|
SR
|
ROR
|
DR
|
K
|
|
R0
∣
R34767
|
R34768
∣
R34895
|
R35024
∣
R35151
|
R35280
∣
R43223
|
R43224
∣
R47319
|
D0
∣
D7999
|
|
|
Ps
|
|
|
|
|
|
|
0~7
|
|
SR
|
○
|
○
|
○
|
○
|
○
|
○
|
0~32767
|
|
|
Description
|
|
- The positioning axis can be controlled up to PSO7, but the actual maximum axis number that can be controlled varies with the CPU Unit machine model.
- This instruction is not necessary if the system default for parameter value is matching what users need. However, if it needs to open the parameter value to do dynamic modification, this instruction is required.
- This instruction incorporates with FUN140 for positioning control purpose, each axis can have one FUN140 instruction only.
- Whether the execution control input “EN” = 0 or 1, anyway, this instruction will be performed.
- When there is error in parameter value, the output indication “ERR” will be ON, and the error code is appeared in the error code register.
SR =Starting register of parameter table, suppose it is R2000.
|
|
FUN141
MPARA
|
Instruction of Parameter Setting for Positioning Program
|
FUN141
MPARA
|
|
R2000
|
0~2
|
Parameter 0
|
System default =1
|
|
R2001
|
1~65535 Ps/Rev
|
Parameter 1
|
System default =2000
|
|
DR2002
|
1~999999 μM/Rev
1~999999 mDeg/Rev
1~9999990.1 mInch/Rev
|
Parameter 2
|
System default =2000
|
|
R2004
|
0~3
|
Parameter 3
|
System default =2
|
|
DR2005
|
1~200000 Ps/Sec
1~153000
|
Parameter 4
|
System default =200000
|
|
DR2007
|
0~200000 Ps/Sec
1~153000
|
Parameter 5
|
System default =141
|
|
R2009
|
1~65535 Ps/Sec
|
Parameter 6
|
System default =1000
|
|
R2010
|
0~32767
|
Parameter 7
|
System default =0
|
|
R2011
|
0~30000
|
Parameter 8
|
System default =5000
|
|
R2012
|
0~1
|
0~1
|
Parameter 9
|
System default =0100H
|
|
R2013
|
-32768~32767
|
Parameter 10
|
System default =0
|
|
R2014
|
-32768~32767
|
Parameter 11
|
System default =0
|
|
R2015
|
0~30000
|
Parameter 12
|
System default =0
|
|
R2016
|
0~30000
|
Parameter 13
|
System default =500
|
|
DR2017
|
0~1999999
|
Parameter 14
|
System default =0
|
|
DR2019
|
00H~FFH
|
00H~FFH
|
Parameter 15
|
System default =FFFFFFFFH
|
|
00H~FFH
|
00H~FFH
|
|
DR2021
|
-999999~999999
|
Parameter 16
|
System default =0
|
|
R2023
|
0~255
|
Parameter 17
|
System default =1
|
|
|
FUN141
MPARA
|
Instruction of Parameter Setting for Positioning Program
|
FUN141
MPARA
|
|
Editing Servo Parameter Table with UperLogic
Click the “Servo Parameter Table” Item which in project windows:
Project name
Table Edit
Servo Parameter Table 🡪 Click right button and select “New Table”

- Table Type: It will be fixed to “Servo Parameter Table”.
- Table Name: For modify or debug, you can give a convenient name.
- Table Starting address: Enter the address which Starting register of Servo Parameter Table.
|
|
FUN141
MPARA
|
Instruction of Parameter Setting for Positioning Program
|
FUN141
MPARA
|
|

Explanation for the parameter
- Parameter 0: The setting of unit, its default is 1.
• When the setting value is 0, the moving stroke and speed setting in the positioning program will all be assigned with the unit of mm, Deg, Inch, so called machine unit.
• When the setting value is 1, the moving stroke and speed setting in the positioning program will all be assigned with the unit of Pulse, so called motor unit.
• When the setting value is 2, the moving stroke setting in the positioning program will all be assigned with the unit of mm, Deg, Inch, and the speed setting will all be assigned with the unit of Pulse/Sec, which is called as compound unit.
|
Parameter 0, unit setting
|
“0” machine unit
|
“1” motor unit
|
“2” compound unit
|
|
Parameter 1, 2
|
Must be set
|
No need to set
|
Must be set
|
|
Parameter 3, 7, 10, 11
|
mm,Deg,Inch
|
Ps
|
mm,Deg,Inch
|
|
Parameter 4,5,6,15,16
|
Cm/Min,Deg/Min,Inch/Min
|
Ps/Sec
|
Ps/Sec
|
|
|
FUN141
MPARA
|
Instruction of Parameter Setting for Positioning Program
|
FUN141
MPARA
|
- Parameter 1: Pulse count/1-revolution, its default is 2000, i.e. 2000 Ps/Rev.
The pulse counts needed to turn the motor for one revolution
A= 1~65535 (for value greater than 32767, it is set with unsigned decimal) Ps/Rev.
When Parameter 14 = 0, Parameter 1 is the setting for Pulse /Rev
When Parameter 14 ≠ 0, Parameter 14 is the setting for Pulse/Rev
- Parameter 2: Movement/1 revolution, its default is 2000, i.e. 2000 Ps/Rev.
The movement while motor turning for one revolution.
B=1~999999 μM/Rev
1~999999 mDeg/Rev
1~9999990.1 mInch/Rev
- Parameter 3: The resolution of moving stroke setting, its default is 2.
|
Parameter 0
Parameter 3
|
Set value=0, machine unit; Set value=2, compound unit;
|
Set value=1 motor unit (Ps)
|
|
mm
|
Deg
|
Inch
|
|
Set value =0
|
x1
|
x1
|
x0.1
|
x1000
|
|
Set value =1
|
x0.1
|
x0.1
|
x0.01
|
x100
|
|
Set value =2
|
x0.01
|
x0.01
|
x0.001
|
x10
|
|
Set value =3
|
x0.001
|
x0.001
|
x0.0001
|
x1
|
|
|
FUN141
MPARA
|
Instruction of Parameter Setting for Positioning Program
|
FUN141
MPARA
|
- Parameter 4: The limited speed setting, its default is 200000, i.e. 200000 Ps/Sec.
• Motor and compound unit: 1~200000 Ps/Sec.
• Machine unit: 1~153000 (cm/Min, -10 Deg/Min, Inch/Min).
However, the limited frequency can’t be greater than 200000 Ps/Sec.
f_max =(V_max -1000 x A)/(6 x B)≤ 200000 Ps/Sec
f_min ≥ 1 Ps/Sec
Note: A = Parameter 1, B =Parameter 2.
- Parameter 5: Initiate/Stop speed, the default = 141.
• Motor and compound unit: 1~200000 Ps/Sec.
• Machine unit: 1~15300 (cm/Min, x 10 Deg/Min, Inch/Min).
However, the limited frequency can’t be greater than 200000 Ps/Sec.
- Parameter 6: Creep speed for machine zero return; the default is 1000.
Motor and compound unit: 1~65535 Ps/Sec
Machine unit: 1~15300 (cm/Min, ×10 Deg/Min, Inch/Min).
- Parameter 7: Backlash compensation, the default =0.
Setting range: 0~32767 Ps.
While backward traveling, the traveling distance will be added with this value automatically.
- Parameter 8: Acceleration/Deceleration time setting, the default = 5000, and the unit is mS.
Setting range: 0~30000 mS.
The setting value represents the time required to accelerate from idle state up to limited speed state or decelerate from the limited speed state down to the idle state.
When Parameter 12 = 0, Parameter 8 is the deceleration time
There will have the auto deceleration function for short stroke movement.
|
|
FUN141
MPARA
|
Instruction of Parameter Setting for Positioning Program
|
FUN141
MPARA
|
- Parameter 9: Rotation and zero return direction; the default is 0100H (Not used in linear interpolation mode)
|
SR+12
|
b15 b8 b7 b0
|
|
Para 9-1
|
Para 9-0
|
- Parameter 9-0: Rotation direction setting; the default is 0
- Setting value =0, the present value increases while in forward pulse output; the present value decreases while in backward pulse output.
- Setting value =1, the present value decreases while in forward pulse output; the present value increases while in backward pulse output.
- Parameter 9-1: Zero return direction setting; the default is 1
- Setting value =0, direction in which the present value increases.
- Setting value =1, direction in which the present value decreases.
- Parameter 10: Forward movement compensation, the default = 0.
- Setting range: -32768~32767 Ps.
- When it is in backward pulse output, it will automatically add with this value as the
moving distance.
- Parameter 11: Backward movement compensation, the default =0.
- Setting range: -32768~32767 Ps.
- When it is in backward pulse output, it will automatically add with this value as the moving distance.
|
- Parameter 12: Deceleration time setting, the default =0, and the unit is mS.
- Setting range: 0~30000 mS.
- When Parameter 12 = 0, Parameter 8 is the deceleration time
- When Parameter 12 ≠ 0, Parameter 12 is the deceleration time
- Parameter 13: Interpolation time constant; the default is 500.
- Setting range: 0~30000 mS.
- Set the time required to achieve the speed specified by the program. (The initiate speed is always regarded as “0.)
- Parameter 14: Pulse count/1-revolution, the default = 0.
- Setting range: 0~19999999.
- When Parameter 14 = 0, Parameter 1 is the setting for Pulse /Rev
- When Parameter 14 ≠ 0, Parameter 14 is the setting for Pulse/Rev
- Parameter 15: I/O control interface for DRVZ; the default is FFFFFFFFH
|
b15 b8 b7 b0
|
|
SR+19
|
Para 15-1
|
Para 15-0
|
|
SR+20
|
Para 15-3
|
Para 15-2
|
- Parameter 15-0: Setting of DOG input (SR+19), it must be the input of the main unit)
b6~b0: Reference number of DOG input (0~15, it means X0~X15)
b7=0: Contact A or Normal Open
=1: Contact B or Normal Close
b7~b0=FFH, without DOG input
- Parameter 15-1: Travel limit input contact setting (SR+19)
b14~b8: Travel limit input contact number (0~125, namely X0~X125)
b15 = 0: Travel limit input is a normally open contact (A or NO contact)
=1: Travel limit input is a normally closed contact (B or NC contact)
b15~b8=FFH : No stroke limit input
|
|
FUN141
MPARA
|
Instruction of Parameter Setting for Positioning Program
|
FUN141
MPARA
|
- Parameter 15-2: Setting of PG0 signal input (SR+20), it must be the input of the main unit.
b6~b0: Reference number of PG0 input (0~15, it means X0~X15)
b7= 0: Start counting at front end of sensing DOG input
b7= 1; Start counting at rear end of sensing DOG input
b7~b0 = FFH, without PG0 input
- Parameter 15-3: Setting of CLR signal output (SR+20), it must be the output of the main unit.
b15~b8: Reference number of CLR output (0~23, it means Y0~Y23)
b15~b8 =FFH, without CLR output
- Parameter 16: Machine zero-point address; the default is 0. Setting range: -999999 ~ 999999 Ps
- Parameter 17: Number of zero-point signals (Sensing of PG0 input); the default is 1. Setting range: 0~255 count.

|
9-5-6 FUN142Enforcing to Stop Pulse Output (PSOFF)
|
FUN142 P
PSOFF
|
Enforcing to Stop Pulse Output
|
FUN142 P
PSOFF
|
|
Symbol
|
|
|

|
N: 0~3, enforces the assigned set number of Pulse Output to stop its output.
|
|
Description
|
|
- The positioning axis can be controlled up to PSO7, but the actual maximum axis number that can be controlled varies with the CPU Unit machine model.
- When stop control “EN” =1, or changes from 0→1 (P instruction), this instruction will enforce the assigned set number of Pulse Output to stop its output.
- When applying in the process of return home, as the home has returned, it can immediately stop the pulse output by using this instruction, so as to make it stop at the same position every time when performing Mechanical Homing.
|
|
Example
|
|
|

|
When M0 changes from 0→1, it enforces the Ps0 to stop the pulse output.
|
9-5-7 FUN143 Converting the Current Pulse Value to the Displaying Value(PSCNV)
|
FUN143 P
PSCNV
|
Converting the Current Pulse Value to the Displaying Value
(mm, Deg, Inch, PS)
|
FUN143 P
PSCNV
|
|
Symbol
|
|
|

|
Ps: 0~3; converting the assigned pulse position to mm (Deg, Inch, PS) which has the same unit as the set point, so as to make the current position displayed.
D: Registers that store the current position after conversion. It uses 2 registers, e.g. D10 represents D10 (Low Word) and D11 (High Word) two registers.
|
|
Range
Operand
|
HR
|
ROR
|
DR
|
K
|
|
R0
∣
R34767
|
R43224
∣
R47319
|
D0
∣
D7999
|
2
|
256
|
|
Ps
|
|
|
|
0-3
|
|
D
|
○
|
○
|
○*
|
|
|
|
Description
|
|
- The positioning axis can be controlled up to PSO7, but the actual maximum axis number that can be controlled varies with the CPU Unit machine model.
- When execution control “EN” =1 or changes from 0→1 (P instruction), this instruction will convert the assigned current pulse position (Ps) to be the mm (or Deg, Inch, or Ps) that has the same unit as the set value, so as to make current position displaying.
- After the FUN140 and FUN147 instructions have been performed, it will then be able to get the correct conversion value by executing this instruction
|
|
FUN143 P
PSCNV
|
Converting the Current Pulse Value to the Displaying Value
(mm, Deg, Inch, PS)
|
FUN143 P
PSCNV
|
|
Example
|
|
|

|
When M0=1, it converts the current pulse position of Ps0 (DR4088) to the mm (or Deg or Inch or Ps) that has the same unit as the set value, and store it into the DD10 to make the current position displaying.
|
|
9-5-8 FUN144 High-Speed Pulse Width Modulation 2 (HSPWM2)
|
FUN144
HSPWM2
|
High-Speed Pulse Width Modulation 2 (HSPWM2)
|
FUN144
HSPWM2
|
|
Symbol
|
|
|

|
PW:Output of pulse width modulation
0:Y0 & Y1
1:Y2 & Y3
2:Y4 & Y5
3:Y6 & Y7
4:MQ Y16 & Y17, Y8 & Y9 otherwise
5:MQ Y18 & Y19, Y10 & Y11 otherwise
6:MQ Y20 & Y21, Y12 & Y13 otherwise
7:MQ Y22 & Y23, Y14 & Y15 otherwise
Op:Output polarity (0=positive phase, 1=negative phase)
Hz:Output frequency (1~100000000 or 1~200000000, unit: 0.001Hz)
OR:Width of output pulse (0~100, unit: %)
|
|
Range
Operand
|
Y
|
WX
|
WY
|
WM
|
WS
|
TMR
|
CTR
|
HR
|
IR
|
OR
|
SR
|
ROR
|
DR
|
K
|
|
Yn
|
WX0
∣
WX1008
|
WY0
∣
WY1008
|
WM0
∣
WM19578
|
WS0
∣
WS3088
|
T0
∣
T1023
|
C0
∣
C1279
|
R0
∣
R34767
|
R34768
∣
R34895
|
R35024
∣
R35151
|
R35280
∣
R43223
|
R43224
∣
R47319
|
D0
∣
D7999
|
|
|
Pw
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
|
|
Op
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0~1
|
|
Hz
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
|
OR
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
0~100
|
|
|
FUN144
HSPWM2
|
High-Speed Pulse Width Modulation 2 (HSPWM2)
|
FUN144
HSPWM2
|
|
Description
|
|
|
- Compared with FUN139, FUN144 provides more direct and convenient high-speed PWM output control without calculating parameters through built-in formulas.
- The maximum output frequency may be 100K or 200K depending on the model. If the maximum output frequency exceeds the maximum output frequency, it will not be executed.
|
9-5-1 FUN147 Manual Pulse Generator for Positioning (MHSPO)
|
FUN147
MHSPO
|
Multi-Axis High Speed Pulse Output
|
FUN147
MHSPO
|
|
Symbol
|
|
|
Ladder symbol

|
Gp: Group number (0~3)
SR: Starting register for positioning program (example explanation)
WR: Starting register for instruction operation (example explanation). It controls 9 registers, which the other program cannot repeat in using.
|
|
Range
Operand
|
R
|
ROR
|
DR
|
K
|
|
R0
∣
R34767
|
R43224
∣
R47319
|
D0
∣
D7999
|
|
|
Gp
|
|
|
|
0~3
|
|
SR
|
○
|
○
|
○
|
|
|
WR
|
○
|
○
|
○
|
|
|
|
Description
|
|
- The FUN147 (MHSPO) instruction is used to support the linear interpolation for multi-axis motion control, it consists of the motion program written and edited with tex programming. We named every position point as a step (which includes output frequency, traveling distance, and transfer conditions). Every step of positioning point owns 15 registers for coding.
- The FUN147 (MHSPO) instruction can support up to 4 axes for simultaneous linear interpolation; or 2 sets of 2-axis linear interpolation (i.e. Gp0 = Axes Ps0 & Ps1 ; Gp1 = Axes Ps2 & Ps3)
- The best benefit to store the positioning program into the registers is that in the case of association with MMI (Man Machine Interface) to operate settings, it may save and reload the positioning program via MMI when replacing the molds.
|
- When execution control “EN”=1, if the other FUN147/FUN140 instructions to control Ps0~3 are not active (corresponding status of Ps0=M9183, Ps1=M9184, Ps2=M9185, and Ps3=M9186 will be ON), it will start to execute from the next step of positioning point (when goes to the last step, it will be restarted from the first step to perform); if Ps0~3 is controlled by other FUN147/FUN140 instruction (corresponding status of Ps0=M9183, Ps1=M9184, Ps2=M9185, and Ps3=M9186 would be OFF), this instruction will acquire the pulse output right of positioning control once the controlling FUN147/FUN140 has released the control right.
- When execution control input “EN” =0, it stops the pulse output immediately.
- When output pause “PAU” =1 and execution control “EN” was 1 beforehand, it will pause the pulse output. When output pause “PAU” =0 and execution control is still 1, it will continue the unfinished pulse output.
- When output abort “ABT”=1, it stops pulse output immediately. (When the execution control input “EN” becomes 1 next time, it will restart from the first step of positioning point to execute.)
- While the pulse is in output transmitting, the output indication “ACT” is ON.
- When there is execution error, the output indication “ERR” will be ON. (The error code is stored in the error code register.)
- When each step of positioning point is complete, the output indication “DN” will be ON.
- The working mode of Pulse Output must be set (without setting, corresponding points will be treated as general output) to be one of U/D, P/R, A/B or PLS modes, thus the Pulse Output may have a regular output.
U/D Mode: Upward counting pulse will be generated out of the corresponding point.
Downward counting pulse will be generated out of the corresponding point.
P/R Mode: Normal pulse will be generated out of the corresponding point.
Directional signal will be generated out of the corresponding point.
ON=upward counting, OFF= downward counting.
A/B Mode: Phase A pulse will be generated out of the corresponding point.
Phase B pulse will be generated out of the corresponding point.
- The output polarity for Pulse Output can select to be Normal ON or Normal OFF.
|
- 【The interfaces for positioning control】
|
M9161
|
ON : Stop or pause FUN147, slow down then stop pulse output
OFF : Stop or pause FUN147, stop pulse output immediately
|
|
M9183
|
ON : Ps0 is ready
OFF : Ps0 is in action
|
|
M9184
|
ON : Ps1 is ready
OFF : Ps1 is in action
|
|
M9185
|
ON : Ps2 is ready
OFF : Ps2 is in action
|
|
M9186
|
ON : Ps3 is ready
OFF : Ps3 is in action
|
|
M9191
|
ON : Ps4 is ready
OFF : Ps4 is in action
|
|
M9192
|
ON : Ps5 is ready
OFF : Ps5 is in action
|
|
M9193
|
ON : Ps6 is ready
OFF : Ps6 is in action
|
|
M9194
|
ON : Ps7 is ready
OFF : Ps7 is in action
|
|
M9187
|
ON : Ps0 has finished the last step
|
|
M9188
|
ON : Ps1 has finished the last step
|
|
M9189
|
ON : Ps2 has finished the last step
|
|
M9190
|
ON : Ps3 has finished the last step
|
|
M9195
|
ON : Ps4 has finished the last step
|
|
M9196
|
ON : Ps5 has finished the last step
|
|
M9197
|
ON : Ps6 has finished the last step
|
|
M9198
|
ON : Ps7 has finished the last step
|
|
|
DR35766
|
Gp0 vector speed
|
|
DR35768
|
Gp1 vector speed
|
|
DR35770
|
Gp2 vector speed
|
|
DR35772
|
Gp3 vector speed
|
|
R35733
|
Gp0 error code
|
|
R35734
|
Gp1 error code
|
|
R35775
|
Gp2 error code
|
|
R35776
|
Gp3 error code
|
|
R35777
|
The step number (positioning point) which has been completed of Gp0.
|
|
R35778
|
The step number (positioning point) which has been completed of Gp1.
|
|
R35779
|
The step number (positioning point) which has been completed of Gp2.
|
|
R35780
|
The step number (positioning point) which has been completed of Gp3.
|
|
Ps No.
|
Current output frequency
|
Current pulse position
|
The remaining pulse counts to be transmitted
|
|
Ps0
|
DR35328
|
DR35336
|
DR35344
|
|
Ps1
|
DR35330
|
DR35338
|
DR35346
|
|
Ps2
|
DR35332
|
DR35340
|
DR35348
|
|
Ps3
|
DR35334
|
DR35342
|
DR35350
|
|
Ps4
|
DR35655
|
DR35663
|
DR35671
|
|
Ps5
|
DR35657
|
DR35665
|
DR35673
|
|
Ps6
|
DR35659
|
DR35667
|
DR35675
|
|
Ps7
|
DR35661
|
DR35669
|
DR35677
|
※ FUN147 doesn’t support dynamic change for its output frequency during the pulse transmitting.
|
- Format of positioning program with linear interpolation:
SR:Starting register of registers block which reserved to store positioning program, explained as follows:
|
SR
|
A55CH
|
;The effective positioning program; its starting register must be A55CH
|
|
SR+1
|
Total steps
|
|
|
SR+2
|
|
|
|
SR+3
|
|
|
|
●
●
●
●
|
●
●
●
●
|
|
|
|
The first positioning point (step) of positioning program (every step owns 15 registers for coding).
|
|
|
SR+14
|
|
|
|
SR+15
|
|
|
|
SR+16
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The Nth step of positioning program.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SR+N×15+2
|
|
|
|
- Explanation for working register of instruction operation :
WR is the starting of working registers.
|
WR+0
|
Being executed or stopped step
|
|
WR+1
|
Working flag
|
|
WR+2
|
Controlled by system
|
|
WR+3
|
Controlled by system
|
|
WR+4
|
Controlled by system
|
|
WR+5
|
Controlled by system
|
|
WR+6
|
Controlled by system
|
|
WR+7
|
Controlled by system
|
|
WR+8
|
Controlled by system
|
WR+0 : If this instruction is in execution, the content of this register represents the step (1~N) being performed. If this instruction is not in execution, the content of this register represents the step where it stopped at present
When execution control “EN” =1, it will perform the next step, i.e. the current step plus 1 (if the current step is at the last step, it will restart to perform from the first step).
Before starting the execution control “EN” =1, the user can renew the content of WR+0 to determine starting from which step to perform (when the content of WR+0 =0, and execution control “EN” =1, it represents that the execution starts from the first step).
WR+1 : B0~B7, total steps
B8 = ON, output paused
B9 = ON, waiting for transfer condition
B10 = ON, endless output
B12 = ON, pulse output transmitting (the status of output indicator “ACT”)
B13 = ON, instruction execution error (the status of output indicator “ERR”)
B14 = ON, finished being executed step (the status of output indicator “DN”)
- When step which has been completed, the output indication “DN” will turn ON and keep such status if suspending ; the user may turn OFF the status of “DN” by using the rising edge of output coil controlled by "DN" to clear the content of WR+1 register to be 0, and it can be attained.
|
- Format of positioning program with linear interpolation:
SR:Starting register of registers block which reserved to store positioning program, explained as follows:
|
Error indication
|
Error code
|
|
|
R35320(Ps0)
|
0
|
:Error free
|
|
|
R35321(Ps1)
|
1
|
:Parameter 0 error
|
|
|
R35322(Ps2)
|
2
|
:Parameter 1 error
|
|
|
R35323(Ps3)
|
3
|
:Parameter 2 error
|
|
|
R35647(Ps4)
|
4
|
:Parameter 3 error
|
|
|
R35648(Ps5)
|
5
|
:Parameter 4 error
|
The possible error
|
|
R35649(Ps6)
|
6
|
:Parameter 5 error
|
codes for FUN141
|
|
R35650(Ps7)
|
7
|
:Parameter 6 error
|
execution
|
|
R35773(Gp0)
|
8
|
:Parameter 7 error
|
|
|
R35774(Gp1)
|
9
|
:Parameter 8 error
|
|
|
R35775(Gp2)
|
10
|
:Parameter 9 error
|
|
|
R35776(Gp3)
|
13
|
:Parameter 12 error
|
|
|
14
|
:Parameter 13 error
|
|
|
15
|
:Parameter 14 error
|
|
|
30
|
:Error of variable address for speed setting
|
|
|
31
|
:Error of setting value for speed setting
|
|
|
32
|
:Error of variable address for stroke setting
|
|
|
33
|
:Error of setting value for stroke setting
|
|
|
34
|
:Illegal positioning program
|
|
|
35
|
:Length error of total step
|
|
|
36
|
:Over the maximum step
|
|
|
37
|
:Limited frequency error
|
The possible error
|
|
38
|
:Initiate/stop frequency error
|
codes for FUN140
|
|
39
|
:Over range of compensation value for movement
|
and FUN147
|
|
40
|
:Over range of moving stroke
|
execution
|
|
41
|
:ABS positioning is not allowed within DRVC commands
|
|
|
42
|
:DRVZ can’t follow DRVC
|
|
50
|
:Illegal operation mod of DRVZ
|
|
|
51
|
:Illegal DOG input number
|
|
|
52
|
:Illegal PG0 input number
|
|
53
|
:Illegal CLR output number
|
|
60
|
:Illegal linear interpolation command
|
- Note : The content of error indication register will keep the latest error code. Making sure that no more error to happen, you can clear the content of error indication register to be 0, and it still maintains the value at 0.
|
|
FUN147
MHSPO
|
Multi-Axis High Speed Pulse Output
|
FUN147
MHSPO
|
|
Editing Servo program Table with UperLogic
|
Click the “Servo Program Table” item which in project window:


|
|
FUN147
MHSPO
|
Multi-Axis High Speed Pulse Output
|
FUN147
MHSPO
|
- Table Type: Multi-Axis positioning table.
- Table Name: For modify or debug, you can give a convenient name.
- Table Address: Enter the address which Starting register.

- For easy programming and trouble shooting, the UperLogic provides the text editing environment to edit
- the motion program (servo program table) for FUN147 execution.
- Extended positioning instructions for linear interpolation are listed as follows:
|
Instruction
|
Operand
|
Explanation
|
|
SPD
|
XXXXXX or
Rxxxx or
Dxxxx
|
• Setting of the vector speed for linear interpolation
1 ≦ setting value ≦ 1840000
• Moving speed in frequency or velocity (FUN141 Parameter_0=0 represents velocity; Parameter_0=1 or 2 for frequency; the system default is frequency). The operand can be input directly with constant or variable (Rxxxx, Dxxxx); when the operand is variable, it needs 2 registers, e.g. D10 represents D10 (Low Word) and D11 (High Word), which is the setting of frequency or velocity.
• When selecting to use the velocity setting, the system will automatically convert the velocity setting to corresponding output frequency
• The corresponding axis frequency for output will be calculate from the setting of the vector speed
• Output frequency range: 1≦output frequency ≦ 200000 Hz.
|
|
|
FUN147
MHSPO
|
Multi-Axis High Speed Pulse Output
|
FUN147
MHSPO
|
|
Instruction
|
Operand
|
Explanation
|
|
LIN
|
ADR,X,Y,Z,W,Ut
or or
ABS Ps
Where,
X:Stroke setting of Ps0
Y:Stroke setting of Ps1
Z:Stroke setting of Ps2
W:Stroke setting of Ps3
|
• Moving stroke setting in Ps or mm,Deg,Inch (When FUN141 Parameter_0=1, the setting stroke in Ut is Ps; Parameter_0=0 or 2, the setting stroke in Ut is mm, Deg, Inch; the system default for Ut is Ps).
• When 6_th operand of LIN is Ut (not Ps) , according to the settings of parameter 1, 2, 3 of FUN141, the system will convert the corresponding pulse count to output.
• There are 6 operands to construct LIN instruction as follows:
1_st operand: coordinate selection.
ADR or ABS: ADR, relative distance movement
ABS, absolute position movement
2_nd~5_th operands: moving stroke setting for each axis
|
|
XXXXXXXX:
or
−XXXXXXXX
or Rxxxx
or Dxxxx
|
It can directly input with constant or variable (Rxxxx, Dxxxx); it needs 2 registers when adopting the variable, e.g. R0 represents R0 (Low Word) and R1 (High Word) as the setting of moving stroke.
Positive setting value moves forward
Negative setting value moves backward
|
|
*** When the setting of moving stroke is 0 or in space and 1_st operand is ADR, it means no movement for this axis
*** When the setting of moving stroke is in space and 1_st operand is ABS, it means no movement for this axis
Maximum setting for one movement must be under ±1999999 Ps
6_th operand: resolution of stroke setting
Ut or Ps: for Ut, the resolution is one unit
(it is determined by parameter 0, 3 of FUN141); for Ps, the enforced resolution is one pulse.
|
|
LINE
|
ADR,X,Y,Z,W,Ut
or or
ABS Ps
Where,
X:Stroke setting of Ps0
Y:Stroke setting of Ps1
Z:Stroke setting of Ps2
W:Stroke setting of Ps3
|
•LINE is used for linear interpolation in endless movement
•There are 6 operands to construct LINE instruction as LIN’s
Description
•The stroke setting for each axis means the output ratio between the active axes, the axis with longest movement is followed by others
i.e. In LINE mode, if the stroke settings are 1000、500、300、0( In Ps), it means if Ps0 axis sends 1000Ps, then Ps1 and Ps2 will send 500Ps and 300Ps respectively. (Axis Ps3 doesn’t work due to the setting value is 0).
It will follow this ratio (1000/500/300/0) for pulse output until theFUN147 instruction is stopped or exists from the LINE mode.
|
|
|
FUN147
MHSPO
|
Multi-Axis High Speed Pulse Output
|
FUN147
MHSPO
|
- Note: Comparison explanation between the relative coordinate positioning (ADR) and the absolute coordinate positioning (ABS)
|
To move from position 30000 to -10000, the coding for programming is:
|
|
|
|
|
|
|
DRV ADR,−,40000,Ut or DRV ABS, ,−10000,Ut
|
|
|
...
|
|
|
|
|
|
|
...
|
|
|
|
|
|
|
|
-10000
|
0
|
10000
|
20000
|
30000
|
Ut
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To move from position−10000 to 10000, the coding for programming is:
|
|
|
DRV ADR,+,20000,Ut or DRV ABS, ,10000,Ut
|
|
|
Instruction
|
Operand
|
Explanation
|
|
WAIT
|
TIME,XXXXX
or Rxxxx
or Dxxxx
or X0〜X255
or Y0〜Y255
or M0〜M1911
or S0〜S999
|
• When pulse output is complete, performing the wait instruction to go to the assigned step. There are 5 kind of operands that explained as follows:
Time: The waiting time (the unit is 0.01 second), it can be directly input with constant or variable (Rxxxx or Dxxxx); when it is time up, performs the step that assigned by GOTO.
X0~X255: Waiting until the input status is ON, it performs the step that assigned by GOTO.
Y0~Y255:Waiting until the output status is ON, it performs the step that assigned by GOTO.
M0~M1911: Waiting until the internal relay is ON, it performs the step that assigned by GOTO.
S0~S999: Waiting until the step relay is ON, it performs the step that assigned by GOTO.
|
|
EXT
|
X0〜X255
or Y0〜Y255
or M0〜M1911
or S0〜S999
|
•External trigger instruction; when it is in pulse output (the number of pulses sending is not complete yet), if the status of external trigger is ON, it will perform the step assigned by GOTO immediately. If the status of external trigger is still OFF when the pulse output has been complete, it is the same as WAIT instruction; waiting the trigger signal ON, then perform the step assigned by GOTO.
|
|
GOTO
|
NEXT
or 1~N
or Rxxxx
or Dxxxx
|
• When matching the transfer condition of WAIT, ACT, EXT instruction, by
using GOTO instruction to describe the step to be executed.
NEXT: It represents to perform the next step.
1~N : To perform the described number of step
Rxxxx: The step to be performed is stored in register Rxxxx
Dxxxx: The step to be performed is stored in register Dxxxx
|
|
MEND
|
|
End of the positioning program.
|
|
|
FUN147
MHSPO
|
Multi-Axis High Speed Pulse Output
|
FUN147
MHSPO
|
|
Instruction
|
Operand
|
Explanation
|
|
T-curve
|
|
The T-curve is suitable for low inertia situations, equivalent to 0% of the S-curve, with fast response speed. The disadvantage is that the control rigidity is high.
|
|
S-curve
|
0 ~ 100 %
|
The S-curve is suitable for high inertia control situations and can be adjusted to a proportion of 1-100% as needed. The disadvantage is that it takes longer to reach maximum speed.
|
- The editing for positioning programming with linear interpolation:
- First, it must complete the FUN147 instruction before the editing of positioning program, and assigned in FUN147 instruction the starting register of registers block to store positioning program. While editing the positioning program, it will store the newly edited positioning program to the assigned registers block; for every one positioning point (called as one step) edited, it owns 15 registers for coding. If there are N positioning points, it will be used by N × 15 + 2 registers in total.
- Note: The registers storing the positioning program can not be repeated in using !
- Format and example for the positioning program with linear interpolation:
001 SPD 5000 ;Vector speed is 5KHz
LIN ADR,500,400,300,200,Ut ;Moving forward 500(Ps0)/400(Ps1)/300(Ps2)/200(Ps3) units
WAIT TIME,100 ;Wait for 1second
GOTO NEXT ;Perform the next step
002 SPD R1000 ;Vector speed is stored in DR1000(R1001 and R1000)
LIN ADR,D100,D200, , ,Ut ;Moving stroke is stored in DD100(Ps0) & DD200(Ps1)
WAIT TIME,R500 ;The waiting time is stored in R500
GOTO NEXT ;To perform the next step
003 SPD R1002 ;Vector speed is stored in DR1002(R1003 and R1002)
LIN ADR,0,0,R300,R400,Ps ;Moving stroke is stored in DR300(Ps2) & DR400(Ps3)
WAIT X0 ;Wait until X0 ON
GOTO 1 ;Perform the first step
|
|
FUN147
MHSPO
|
Multi-Axis High Speed Pulse Output
|
FUN147
MHSPO
|
|
Example and figure for description
|
- The positioning program with linear interpolation instruction as below:

- It means the moving stroke setting for axis Ps0(X axis) is 1000 Ps, for axis Ps1(Y axis) is 500 Ps; both axes Ps2 and Ps3 are inactive due to the setting values are 0.

|
9-5-10 FUN148 Manual Pulse Generator for Positioning (MPG)
|
FUN148
MPG
|
Manual Pulse Generator for Positioning
|
FUN148
MPG
|
|
Symbol
|
|
|

|
Sc:Source of high-speed counter; 0~7
Ps:Axis of pulse output; 0~3
Fo:Setting of output speed (2 registers)
Mr:Setting of multipliers (2 registers)
Mr+0:Multiplicand (Fa)
Mr+1:Dividend (Fb)
WR:Starting address of working registers, it needs 4 registers
|
|
Range
Operand
|
HR
|
ROR
|
DR
|
K
|
|
R0
∣
R34767
|
R43224
∣
R47319
|
D0
∣
D7999
|
16bit
+/-number
|
|
Sc
|
○
|
○
|
○
|
0-7
|
|
Ps
|
○
|
○
|
○
|
0-3
|
|
Fo
|
○
|
○
|
○
|
|
|
Mr
|
○
|
○
|
○
|
|
|
WR
|
○
|
○*
|
○
|
|
|
|
FUN148
MPG
|
Manual Pulse Generator for Positioning
|
FUN148
MPG
|
- The positioning axis can be controlled up to PSO7, but the actual maximum axis number that can be controlled varies with the CPU Unit machine model.
- Let this instruction be executed in 10mS fixed time interrupt service routine (LTM0), by using the 0.1mS high speed timer to generate 50mS fixed time interrupt service to have accurate repeat time to sample the pulse input from manual pulse generator. If it comes the input pulses, it will calculate the number of pulses needing to output according to the setting of multiplier (Mr+0 and Mr+1), and then outputs the pulse stream in the speed of setting (Fo) during this time interval.
The setting of output speed (Fo) must be fast enough, and the acceleration / deceleration rate (Parameter 4 and parameter 8 of FUN141 instruction) must be sharp to guarantee it can complete the sending of pulse stream during the time interval if it is under high multiplier (100 or 200 times) situation.
- When execution 〝EN〞=1, this instruction will sample the pulse input from manual pulse generator by reading the current value of assigned high speed counter every time interval; it doesn’t have any output if it doesn’t have any
- Input pulse; but if it senses the input pulses, it will calculate the number of pulses needing to output according to the setting of multiplier (Mr+0 and Mr+1), and then outputs the pulse stream in the speed of setting (Fo) during this time interval.
Number of output pulses = (Number of input pulses × Fa) / Fb
- If the specified output axis is used by other positioning instructions (FUN140/FUN147), even if there is sampling of manual pulse input, there will be no output.
- The output indicator ACT=1 if it outputs the pulses; otherwise, ACT=0.
- This instruction will occupy 4 working registers (WR), other programs cannot be reused.

|
|
FUN148
MPG
|
Manual Pulse Generator for Positioning
|
FUN148
MPG
|
|
Example 1
|
|
|


|
|
FUN148
MPG
|
Manual Pulse Generator for Positioning
|
FUN148
MPG
|
|

X32 :Select axis 0 (Ps0)
X33 :Select axis 1 (Ps1)
X34 :Multiplier = 1
X35 :Multiplier = 10
X36 :Multiplier = 100
M100:Enable / disable MPG activity
DR2005: Maximum speed of axis 0(Parameter 4 of FUN141); 200K Hz
R2011 :Acc/Dec time of axis 0(Parameter 8 of FUN141); 30mS
DD600:Output speed of axis 0 for MPG; 200K Hz
DR2105: Maximum speed of axis 1 (Parameter 4 of FUN141); 200K Hz
R2111 : Acc/Dec time of axis 1 (Parameter 8 of FUN141); 30mS
DD602: Output speed of axis 1 for MPG; 200K Hz
Description: Let the MPG instruction (FUN148) be executed in 50mS fixed time interrupt service routine (50MSI) to handle the MPG positioning of Ps0 and Ps1. When X32=1 and M100=1, it will handle the MPG positioning of Ps0; it will sample the pulse input from reading the current value of HSC0 every 50mS time interval; it doesn’t have any output if it doesn’t have any input pulse; but if it senses the input pulses, it will calculate the number of pulses needing to output according to the setting of multiplier (D700 and D701), and then outputs the pulse stream in the speed of setting (DD600) during this time interval.
Number of output pulses = (Number of input pulses from HSC0 × D700) / D701
|
9-5-11 FUN149 Arc High Speed Pulse Output (AHSPO)
|
FUN149 AHSPO
|
Arc High Speed Pulse Output
|
FUN149 AHSPO
|
|
Ladder Symbol

|
Operands
SR: Start Address of Register for Positioning Process
WR: Working Address of Register for Operating
|
|
Relays and registers
|
Range
Operand
|
WX
|
WY
|
WM
|
WS
|
TMR
|
CTR
|
HR
|
AND
|
OR
|
SR
|
ROR
|
DR
|
K
|
XR
|
|
WX0
∣
WX1008
|
WY0
∣
WY1008
|
WM0
∣
WM9104
|
WS0
∣
WS3088
|
T0
∣
T1023
|
C0
∣
C1279
|
R0
∣
R34767
|
R34768
∣
R35023
|
R35024
∣
R35279
|
R35280
∣
R43223
|
R43224
∣
R47319
|
D0
∣
D7999
|
|
V, Z
P0 ~ P9
|
|
ID
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
0~1
|
|
|
D
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
|
○
|
|
Gp
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
○
|
0~100
|
|
Instruction Description
- The Function 149 (AHSPO) command is to edit the motion parameters in a table, you can use any two axes in Ps0~Ps7 as the pulse output axis, when it is used as the output axis of fun149, it will not be used by other functions, and the output axis func149 occupied by other functions cannot be used.
- This command sets the target point in a table and divides it into three modes: radius, center of circle, and point for circular interpolation motion.
- Each target point in the motion interpolation is called a step (including parameters such as motion mode, distance, vector of speed, and change conditions), and each step requires 40 16-bit registers, and a maximum of 250 steps can be edited.
- Once the parameters are set, the pulse output is activated using the pin, and the output pin, WR register, and associated relay/register are displayed in real time during the process.
- During the motion interpolation of the pulse wave, the user can also use the transition condition and the change condition to achieve a specific goal.
- When input "EN"=1, the pulse output starts, and the next step will be executed according to the change conditions when one step is completed.
- When "EN" = 0 is input, the pulse output will be stopped, and the next "EN" ON will be performed again from the first step.
- When "PAU" = 1 and "EN" was previously 1, the pulse is temporarily output.
- When "PAU" = 0 and "EN" is still 1, the unfinished pulse output of the previous step continues.
10. When input "ABT" = 1, the pulse output will be stopped.
11. When "ABT" = 0 and "EN" = 1 is entered, the execution starts from the first step.
12. When the pulse wave is output, the output indicates "ACT" ON.
13. When an error occurs in pulse execution, the output indicates "ERR" ON and the pulse will stop outputing.
14. When each step is completed, the output indicates "DN" ON.
SR Content Description
The SR registers store the parameters required for this locator, which need to be filled in by the user via the specified command form:
SR0 , SR+1 : Record the command flag and number of steps.
SR+2 ~ SR+41 : Data of the 1st step.
SR+42 ~ SR+81 : Data of the 2nd step.
……
SR+(N – 1) x 40 + 2 ~ SR+(N – 1) x 40 + 41 : Data of the nth step.
And so on, 40 16-bit registers are required for each step except the beginning, and the maximum number of steps is 250.
WR Content Description
The WR instruction runs the working register, and the firmware algorithm stores the running state of the current instruction here:
|
Temporary memory
|
size
|
function
|
description
|
|
WR+0
|
16 bit
|
The number of steps performed or the number of steps dwelled
|
When the command is executed, it represents the number of steps that the SR is executing, and when it is executed, it indicates the number of steps that are stopped
|
|
WR+1
|
16 bit
|
Work flags
|
B0~B7: Total Steps 1~250
B8 = ON: Pause
B9 = ON: Wait for Condition
B10 = ON: Continue
B12 = ON: Pulse output (corresponding to application command output "ACT")
B13 = ON: Error(Coil〝ERR〞)
B14 = ON: One-step anchor completed (corresponding to the application command output "DN")
B15 = ON: The last step of the anchor is complete
|
|
WR+2
|
16 bit
|
System used
|
|
|
WR+3
|
16 bit
|
System used
|
|
Error codes
|
Error codes
|
description
|
Relevant Directives
|
|
0
|
inerrancy
|
execute
Error codes that may occur during Instruction 141
|
|
1
|
Parameter 0 is incorrect
|
|
2
|
Parameter 1 is incorrect
|
|
3
|
Parameter 2 is incorrect
|
|
4
|
Parameter 3 is incorrect
|
|
5
|
Parameter 4 is incorrect
|
|
6
|
Parameter 5 is incorrect
|
|
7
|
Parameter 6 is incorrect
|
|
8
|
Parameter 7 is incorrect
|
|
9
|
Parameter 8 is incorrect
|
|
10
|
Parameter 9 is incorrect
|
|
13
|
Parameter 12 is incorrect
|
|
14
|
Parameter 13 is incorrect
|
|
15
|
Parameter 14 is incorrect
|
|
30
|
The speed setting variable number is incorrect
|
execute
Directive 140
Directive 147
Error codes that may occur during Instruction 149
|
|
31
|
The speed is set incorrectly
|
|
32
|
The itinerary setting variable number is incorrect
|
|
33
|
The itinerary is set incorrectly
|
|
34
|
Illegal locators
|
|
35
|
The step length is wrong
|
|
36
|
Exceed the maximum number of steps
|
|
37
|
Highest frequency error
|
|
38
|
Wrong start/stop frequency
|
|
39
|
The move offset value is too large
|
|
40
|
The amount of movement is out of range
|
|
41
|
DRVC cannot support ABS positioning
|
|
42
|
DRVC cannot connect to the DRVZ command
|
|
43
|
The driver command is incorrect
|
|
50
|
DRVZ working mode error
|
|
51
|
The near-point DOG input point is incorrect
|
|
52
|
The zero signal PG0 input point is incorrect
|
|
53
|
Zeroing clears the CLR output point error
|
|
54
|
The pulse output is misconfigured
|
|
60
|
MHPSO is invalid
|
|
61
|
Inaccurate step calculation
|
|
62
|
Axis is occupied
|
|
70
|
The homepage is set incorrectly
|
|
71
|
The difference interpolation the current coordinates and the target coordinates is greater than twice the radius
|
execute
Error codes that may occur during Instruction 149
|
|
72
|
The current coordinates, target coordinates, and center coordinates are equal
|
|
73
|
The current coordinates, target coordinates are equal to the passing point, or the three points are in a straight line
|
|
74
|
In the three-arc mode, if the radius is less than 1500 pulses, control accuracy cannot be guaranteed
|
Relays & Registers
|
description
|
Relays
|
description
|
Relays
|
|
High Speed Pulse Wave Output Indication PSO0
|
M9183
|
High-speed pulse wave export completed PSO0
|
M9187
|
|
High-speed pulse wave output indicates PSO1
|
M9184
|
High-speed pulse wave export completed PSO1
|
M9188
|
|
High Speed Pulse Wave Output Indication PSO2
|
M9185
|
High-speed pulse wave export completed PSO2
|
M9189
|
|
High-speed pulse wave output indicates PSO3
|
M9186
|
High-speed pulse wave export completed PSO3
|
M9190
|
|
High-speed pulse wave output indicates PSO4
|
M9191
|
High-Speed Pulse Wave Export Completed PSO4
|
M9195
|
|
High-speed pulse wave output indicates PSO5
|
M9192
|
High-speed pulse wave export completed PSO5
|
M9196
|
|
High Speed Pulse Wave Output Indication PSO6
|
M9193
|
High-speed pulse wave export completed PSO6
|
M9197
|
|
High-speed pulse wave output indicates PSO7
|
M9194
|
High-speed pulse wave export completed PSO7
|
M9198
|
|
Current output frequency
|
Current PS location
|
The number of PS remaining
|
|
PS0
|
DR35328
|
DR35336
|
DR35344
|
|
PS1
|
DR35330
|
DR35338
|
DR35346
|
|
PS2
|
DR35332
|
DR35340
|
DR35348
|
|
PS3
|
DR35334
|
DR35342
|
DR35350
|
|
PS4
|
DR35655
|
DR35663
|
DR35671
|
|
PS5
|
DR35657
|
DR35665
|
DR35673
|
|
PS6
|
DR35659
|
DR35667
|
DR35675
|
|
PS7
|
DR35661
|
DR35669
|
DR35677
|
Servo command table
Servo Command Table Path: Project Management → Data Table→ Servo Command Table.

Table Type is selected as Advanced Daemon Table:

The parameters of each anchor can be filled in the following window:

If you want to use the func149 command to draw a plane arc, you can set it to Arc mode, where the radius, center of the circle and through the point three methods should be used to pay attention to the following:
|
mode
|
situation
|
|
radius
|
1. When the distance be interpolation the starting point and the end point is less than twice the radius value, a circle center will be found that does not fall on the line connecting the starting point and the end point
2. When the distance be interpolation the start and end points is equal to twice the radius value, a circle center will be found to fall on the line connecting the start and end points
3. If the distance be interpolation the start and end points is greater than twice the radius value, an error will occur in the command
|
|
Round heart
|
1. When the start and end points are the same, they will make a circle
2. When the start point is the same as the center of the circle or the end point is the same as the center of the circle, the middle point be interpolation the start and end points is treated as the new center of the circle and the arc is drawn from there
3. If the coordinates of the starting point, end point and center of the circle are different, and the distance be interpolation the start point and the center of the circle is the same as the distance be interpolation the end point and the center of the circle, the arc will be drawn from the center of the circle set by the user
4. If the coordinates of the starting point, end point, and center of the circle are different, but the distance be interpolation the start point and the center of the circle is different from the distance be interpolation the end point and the center of the circle, the position of the center of the circle will be corrected and the arc will be drawn in the center of the corrected circle
5. If the start and end points are the same as the center of the circle, the command will be incorrect
|
|
Pass the point
|
1. When the three points are the same or the three points are in a straight line, the command will be incorrect
2. If it is not the previous scenario, an arc will be drawn through the passing point set by the user
|
|
|
Example of how to do it
Half round
This operation example draws a half-circle in radius mode, and the table is set to one step for an anchor point operation, this operation sets the starting point at (0, 0), and the table parameters are set as follows, and (100000, 0) is set as the target point and output at a vector velocity of 10000 Ps/s, and the acceleration process is carried out with an S-shaped curve
In the radius mode, you need to set the radius value and rotation direction, the two parameters can depend on the position of the center of the circle that the user wants, the conversion condition and the change condition are not set, and finally this step is set to the end, that is, the pulse wave will automatically stop after completing this step.
|
Step
|
Item
|
setting
|
description
|
|
1
|
Mode
|
ARC , ADR
|
Circular arc pattern, relative to the coordinates
|
|
Axis
|
M:0 , I1:1
|
Axis 0 is the main shaft, and axis 1 is the internal differential shaft
|
|
Movement
|
(100000 , 0) Ps
|
Take the current position as the origin, and the target point is (100000, 0), the unit pulse
|
|
Speed
|
SPD 10000
|
Vector of the speed 10000 pulse/s
|
|
Acceleration
|
S-CURVE , 100%
|
S-shaped speed curve , curvature 100%
|
|
Arc
|
RADIUS(CW): 50000
|
With a half-diameter of 50,000 ps, the arc is drawn at the right time
|
|
Change
|
|
not
|
|
Go to
|
|
not
|
|
Switch
|
MEND
|
Come to an end
|

result
The following figure uses the motion monitoring diagram to monitor the speed and position of each axis, the speed value is obtained by the DR35328 and the DR35330, and the position value is the DR35336 and the DR35338, the speed change of the two axes can be observed from the speed curve diagram, and the acceleration process is the same as func140 and func147, and it is also divided into three processes: acceleration, constant speed and deceleration
In the acceleration phase, the rotation speed value increases, and the rotation speed remains unchanged when the speed is constant, and the two-axis velocity is combined into the vector speed set by the user, and the deceleration phase decelerates to zero.

Velocity time graph

Location-time graph
rotundity
|
Step
|
Item
|
setting
|
description
|
|
1
|
Mode
|
ARC , ADR
|
Circular arc pattern, relative to the coordinates
|
|
Axis
|
M:0 , I1:1
|
Axis 0 is the main shaft, and axis 1 is the internal differential shaft
|
|
Movement
|
(0, 0) Ps
|
The target point is (0, 0), and if the current coordinates are the same as the target point, draw a circle
|
|
Speed
|
SPD 10000
|
Vector of the speed 10000 pulse/s
|
|
Acceleration
|
S-CURVE , 100%
|
S-shaped speed curve , curvature 100%
|
|
Arc
|
RADIUS(CW): 50000
|
With a half-diameter of 50,000 ps, the arc is drawn at the right time
|
|
Change
|
|
not
|
|
Go to
|
|
not
|
|
Switch
|
MEND
|
Come to an end
|

result


Multi-step execution
The following presentation shows two adjacent circles in the center of the circle mode and using the conversion conditions, with a waiting time of 2 seconds set be interpolation the two steps.

result


Change the condition description
The following rendering radius mode inserts a change condition during the drawing of a semicircle, with the M10 register as the trigger condition, and when the change condition is triggered, a new interpolation motion is performed with a new target point
|
Step
|
Item
|
setting
|
description
|
|
1
|
Mode
|
ARC , ADR
|
Circular arc pattern, relative to the coordinates
|
|
Axis
|
M:0 , I1:1
|
Axis 0 is the main shaft, and axis 1 is the internal differential shaft
|
|
Movement
|
(100000 , 0) Ps
|
Take the current position as the origin, and the target point is (100000, 0), the unit pulse
|
|
Speed
|
SPD 20000
|
Vector of the speed 20000 pulse/s
|
|
Acceleration
|
S-CURVE , 100%
|
S-shaped speed curve , curvature 100%
|
|
Arc
|
RADIUS(CW): 50000
|
With a half-diameter of 50,000 ps, the arc is drawn at the right time
|
|
Change
|
COORD: WAIT M10 , (50000 , -25000)
|
If M10 is on during the operation of this step, the target point will be changed to (50000, -25000) and the changed arc motion will be executed immediately, and the reference origin will still be the starting point before the operation
|
|
Go to
|
|
not
|
|
Switch
|
MEND
|
Come to an end
|

result


|
9-6 Mechanical Homing
The machine set which undertakes relative model Encoder as shifting detector usually need the reset action for the reference of positioning coordinate; we called this action as Homing (seeking for zero reference).
Mod 1:

Z phase counting is up, the pulse output stops, then send out the CLR signal to clear the error counter of servo driver.
e.g.:
X3: Near home sensing input is configured as interrupt input; in the case of Homing, it starts HSC0 to begin counting in X3+ interrupt service subroutine.
X2: Z phase counting input, it is configured as UP input of HSC0; the X2+ is prohibited to interrupt in regular time, when executing Homing and X3 near home interrupt occurred, it starts HSC0 to begin Z phase counting. When HSC0 counting is up, it stops the pulse output, prohibit the X2+ interrupt, set home position to signal, and sends out the CLR signal to clear the error counter of servo driver. Please consult program example.
When using DRVZ command for Homing, it should conjoin the FUN141 motion parameter’s setting of machine zero related, it can be listed as below:
|
DRVZ MD1
|
|
Parameter 6 (Creep speed)
|
Must be
|
|
Parameter 9-1 (Return direction)
|
Must be
|
|
Parameter 15-0 (DOG input)
|
Must be
|
|
Parameter 15-1 (Limit input)
|
Optional
|
|
Parameter 15-2 (PG0 input)
|
No need
|
|
Parameter 15-3 (CLR output)
|
Optional
|
|
Parameter 16 (Zero-point address)
|
Must be
|
|
Parameter 17 (No. of PG0 signal)
|
No need
|
Table 20 Table of parameter setting related to machine zero command
The FUN 140 instruction can’t be executed for machine zero return while encountering the following situations with the error indications:
|
Error Code
|
Explanation
|
|
R35320(PS0)
R35321(PS1)
R35322(PS2)
R35323(PS3)
R35647(PS4)
R35648(PS5)
R35649(PS6)
R35650(PS7)
|
42
|
DRVZ can’t follow DRVC
|
|
50
|
Illegal operation mode of DRVZ
|
|
51
|
Illegal DOG input
|
|
52
|
Illegal PG0 input
|
|
53
|
Illegal CLR output
|
Table 21 Comparison table of error codes
The method of using DRVZ is same as the method of two modes (DRV and DRVC) of FUN140.To see the details please choose MD0~MD2 of Movement Action mode of the servo program table in the project window (See below).

Figure 54 Methods of setting DRVZ
In order to achieve high accuracy and reproducibility, DRVZ uses interrupt to process external signals (such as near-point DOG input), so the bounce signal generated by mechanical switches or field noise must be added. Filter out to avoid malfunction. Generally speaking, it is recommended to use photoelectric or inductive proximity switches for proximity DOG sensors to avoid bouncing signals similar to mechanical contact switches (Limit switch).
The schematic diagram and action description of the mode are shown below. The following examples all assume that the position of the machine is on the right side of the proximity sensor switch when homing is to be performed (the zero-return direction is to the left):
Mode 1

Figure 56 Schematic diagram and action description of mode 1
【Description】
- Zero return starts behind the DOG sensor (Parameter 15_0)
- Moving forward to zero direction in Zero Return Speed
- Auto slow down to stop movement while sensing the dog sensor (Edge detection and interrupt processing)
- Delay 0.5 second, then moving backward until leaving the dog sensor (Edge detection and interrupt processing), it is the zero-home position
- If it doesn’t configure the CLR output (Parameter 15_3) for servo driver, the zero-return process has been finished at step c
- If it has been configured the CLR output (Parameter 15_3) for servo driver, the zero-return process will be finished after the CLR output with more than 20mS duration
- Zero return starts at or in front of the DOG sensor (Parameter 15_0) + Stroke limit sensor (Parameter 15_1)
- Moving forward to zero direction in zero return speed, there will stop moving while sensing the limit sensor
- Moving backward in zero return speed and after leaving the dog sensor, it will drive the zero return procedures same as mentioned above 1.
※ Working at this mode, it should be noticed to adjust the correct position of DOG sensor to incorporate with PG0 signal to avoid one count PG0 error for zero return processing.
|
Zero return starts at or in front of the DOG sensor
|
|

|
|
Steps
|
|
|
1. When homing operation has started, it moves toward the homing direction (Parameter 9_1) in zero return speed until strokes the switch of limit input point (Parameter 15_1).
2. When it strokes the limit input point (Parameter 15_1), it immediately moving backward to the homing direction until leave the DOG sensor (sensor signal from 1 → 0).
3. Upon completion of the Step 2, you can determine that the starting point has returned back to the right of DOG sensor, and then it will complete the homing operation as we set the homing mode (MD0~MD2) earlier.
|