【Question 1】How do I use the Mitsubishi PLSY instruction?
【answer】
The programming format for the PLSY instruction of Mitsubishi FX PLC is as follows:
PLSYK1000D0Y0
*K1000: Specifies the output pulse frequency, which can be T, C, D, numerical values, or a combination of bit elements such as K4X0.
*D0: Specifies the number of output pulses. It can be T, C, D, a numerical value, or a combination of bit elements such as K4X0. When this value is 0, the number of output pulses is unlimited.
*Y0: The specified pulse output terminal, which can only be Y0 or Y1.
For example:
LDM0
PLSYD0D10Y1
When M0 is closed, the number of pulses specified by D10 is output from Y1 at the pulse frequency specified by D0.
When M0 is disconnected during the output process, the pulse output stops immediately. When M0 is closed again, the pulse number specified by D10 is output again from the initial state.
The PLSY instruction does not have acceleration or deceleration control. When M0 is closed, it immediately outputs a pulse at the pulse frequency specified by D0 (so this instruction is not ideal for high-speed pulse control of stepping or servo).
Changing the value of D0 during the output process will immediately change the output pulse frequency (speed adjustment is very convenient).
Changing the value of the output pulse number D10 during the output process will not change the output pulse number. The output will only be based on the new pulse number after the drive is disconnected and then closed again.
The relevant flags and registers are shown below:
M8029: M8029 closes after the pulse is emitted. When M0 is opened, M8029 automatically opens.
M8147: Y0 is closed when outputting a pulse, and automatically disconnects after the pulse is finished.
M8148: Y1 closes when outputting a pulse and automatically closes after the pulse is finished.
D8140: Records the total number of pulses output by Y0, a 32-bit register.
D8142: Records the total number of pulses output by Y1, a 32-bit register.
D8136: Records the total number of pulses output by Y0 and Y1, 32-bit register.
[Question 2] What are the different ways to classify stepper motors?
【answer】
A stepper motor is an open-loop control element that converts electrical pulse signals into angular or linear displacement. Under non-overload conditions, the motor's speed and stopping position depend only on the frequency and number of control pulse signals.
The more pulses, the greater the angle of motor rotation;
The higher the pulse frequency, the faster the motor speed, but it cannot exceed the maximum frequency, otherwise the torque of the pulse will decrease rapidly and the motor will not turn.
【Question 3】Why is there a large error every time the command pulse is sent?
【answer】
If mechanically permissible, increase deceleration to reduce stop overshoot and use interrupt for fast response. However, a better approach is to use an FX2n-10PG positioning module or a PLC such as the Omron CP1H that supports positioning functionality in pulse output.
【Question 4】My Mitsubishi PLC FX-3UC keeps controlling the servo motor to rotate in one direction. Its instruction is PLSYK1000K0Y0. What could be the reason?
【answer】
1. This is related to the user's instructions and parameters. Currently, the instructions only allow for unidirectional, quantitative output.
1) No output direction port is specified;
2) Its output pulse count is fixed;
When the output is closed, it can only be unidirectional.
2. Suggested approach:
1) Servo systems generally require wiring for:
Pulse: Corresponds to the PLC output pulse port;
Direction: Corresponds to the port specified by the direction of the pulse output from the PLC;
Enable: Connect to the corresponding servo enable of the PLC, or directly short-circuit on the driver (terminal function can be set on the driver);
Simultaneously, the following should be defined within the driver: the input pulse selection should be pulse + direction;
You also need to define the rotation direction: bidirectional mode (generally bidirectional is the default).
2) Program instruction selection:
Pulse commands with directional output can be selected; for example: DRVID100D102Y0Y1//Pulse relative position output command sends a pulse signal to Y0 according to the number of pulses in D100 and the pulse speed in D102, and sends a directional signal on Y1.
The speed and pulse count parameters in the instruction should be replaced with constants in the power-off registers as much as possible. This way, the position can be modified at any time and the data can be saved even when the power is off.
【Question 5】How to set Ethernet parameters for Mitsubishi RV series robots?
【answer】
When setting Ethernet parameters for the Mitsubishi RV series robot RC1, the default 192.168.0.* can be used to ensure that it is in the same network segment as the Q series PLC. Figure 1 shows 192.168.0.20.
Figure 1
The communication object IP, i.e., QPLC, can be accessed by double-clicking OPT17, as shown in Figure 2.
Figure 2
This example uses a robot as the active client. The robot receives a target position (x, y, c) from the QPLC: "100.2, 234.4, 30.2". The robot moves and sends back the current coordinates in the format "RBTPOS:(x:100.2y:234.4c:30.2)" (this can be any format, any combination of constant variables).
Open “COM8:”AS#1’ to use the COM port identifier, i.e., QPLC.
WaitM_open(1)=1
Print#1, "RBTopenok" 'The robot sends a success message after the channel is opened.'
Input#1,CCMD' receives the command sent by the host computer. The robot can then make a judgment, the operation of which is omitted here.
Input#1,M1,M2,M3' X coordinate, y coordinate, C angle
P1.X=M1
P1.Y=M2
P1.C=RAD(M3)
P1.FL1=PWK.FL1
P1.FL2=PWK.FL2
C1$=“RBTPOS:(x:”+str$(P_curr.x)+”y:”+str$(P_curr.y)+”c:”+str$(deg(P_curr.c))+”)”
Print#1,C1$
Hlt
Close#1
end
【Question 6】How to debug the Panasonic A5 servo motor driver in open-loop mode?
【answer】
The Panasonic A5 drive is in position control mode during application. The parameters that need to be adjusted are:
All parameter settings need to be saved. Except for Pr0.03, other parameter modifications will only take effect after a power cycle.
Debugging steps: (The default settings do not need to be modified)
1. Change the driver's input mode to pulse + direction mode:
Change P0.07 to 3;
2. Adjust the motor resolution according to the ratio of pitch (design value) to grating ruler resolution:
The pitch does not need to be very precise; the designed value is sufficient, typically 5/10/12/16, etc.
Assuming a pitch of 10mm and a grating ruler resolution of 0.5µm,
Then the pitch divided by the grating ruler resolution is
(10/0.5) x 1000 = 20000;
Assuming a pitch of 10 mm and a grating ruler resolution of 1 μm,
Then the pitch divided by the grating ruler resolution is
(10/1) x 1000 = 10000;
The calculation result is the motor resolution to be entered, and the calculation result is written into Pr0.08;
3. Based on the motor resolution, pitch, and grating ruler resolution, the maximum operating speed of the machine can be calculated under different pulse input methods (photoelectric or long-line):
Assuming the motor resolution is 20000 and the pitch is 10mm:
With the photoelectric interface, the maximum input is 500K, which is 500000. Therefore, the maximum speed of the motor is 500000/20000=25 revolutions per second.
Converted to machine speed, it is rotational speed x pitch = 25 x 10 mm = 250 mm/s;
In long-line mode, the maximum input is 4M, which is 4,000,000. Therefore, the maximum motor speed is 4,000,000/20,000 = 200 revolutions per second.
Converted to machine speed, this is 200 x 10 = 2000 mm/s;
Select the pulse input method according to actual needs and write it into the driver Pr0.05.
Statement: This article is copyrighted by China Transmission Network. You are welcome to reprint it, but please be sure to indicate the source and author.