09 Electronic cam
Electronic CAM (ECAM) instruction
DEGEAR/Electronic gear/32 bit hand wheel instruction
DEGEAR
Electronic gear function refers to the function of multiplying the speed of the driving axis by the set gear ratio and outputting to the driven axis at this speed to control the mechanical operation.
-[DEGEAR (s1) (s2) (s3) (d1) (d2)]
Content, range and data type
Parameter | Content | Range | Data type | Data type (label) |
---|---|---|---|---|
(s1) | Specify the high-speed counter or ordinary double-word counter that receives the master axis pulse | -2147483648 to 2147483647 | Signed BIN 32 bit | ANY32 |
(s2) | Specify the data buffer of the electronic gear command | Form type | LIST | |
(s3) | Response time, that is, how often the gear calculation is performed | 0~500 | Signed BIN 32 bit | ANY32 |
(d) | Specify pulse output axis | Y0~Y7 | Bit | ANY_BOOL |
(d) | Specify direction output axis | Y/M/S/D.b | Bit | ANY_BOOL |
Device used
Instruction | Parameters | Device | Offset modification | Pulse extension | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Y | M | S | D.b | D | R | LC | HSC | K | H | [D] | XXP | ||
DEGEAR | Parameter 1 | ● | ● | ||||||||||
Parameter 2 | ● | ● | |||||||||||
Parameter 3 | ● | ● | ● | ● | |||||||||
Parameter 4 | ● | ||||||||||||
Parameter 5 | ● | ● | ● | ● |
Features
•When the instruction is turned on, the PLC obtains the number of pulses of the master axis (s1) according to the set response time (s3), calculates the average frequency within the response time, and calculates the output of the driven axis according to the set gear ratio Frequency and output pulse number, and output pulse (d1) and direction (d2). When the frequency of the driven axis is greater than the set maximum frequency, it will output according to the set maximum frequency.
•When the master axis (s1) uses the high-speed counter (HSC), the PLC internally obtains the number of external input pulses. Modifying the value of the HSC counter does not affect the judgment of the input pulse.
•When the master axis (s1) uses an ordinary double-word counter (LC), the PLC directly obtains the number of pulses from the LC register, and modifying the value of the register directly affects the judgment of the input pulse.
• Electronic gear data buffer (s2) table:
Electronic gear instruction parameter description table | ||||
---|---|---|---|---|
Offset | Content | Instruction | Range | Read and write permission |
0 | Electronic gear ratio (numerator) | Number of outputs = Number of inputs in response time*numerator/denominator | 0 to 32767 | Read/write |
1 | Electronic gear ratio (denominator) | 1 to 32767 | ||
2 | Maximum output frequency (low word) | Max frequency | 1 to 200000 | Read/write |
3 | Maximum output frequency (high word) | Max frequency | Read/write | |
4 | Average spindle frequency (low word) | Hand crank input frequency | - | Read-only |
5 | Average spindle frequency (high word) | Hand crank input frequency | Read-only | |
6 | Accumulative electronic gear input pulse number (low word) | Cumulative number of electronic gear input pulses | - | Read-only |
7 | Cumulative number of electronic gear input pulses(High word) | |||
8 | Sign | After the electronic gear is initialized, the flag is equal to 1 | Reserved | Reserved |
9 | interval | Confirmation value | - | Read-only |
10 | Electronic gear ratio (numerator) | Confirmation value | - | Read-only |
11 | Electronic gear ratio (denominator) | Confirmation value | - | Read-only |
12 | Maximum output frequency (low word) | Confirmation value | 1 to 200000 | Read-only |
13 | Maximum output frequency (high word) | Read-only | ||
14 | Dynamically switch gear ratio |
| 0 to 2 | Read/write |
15 | 16-bit gear ratio and 32-bit gear ratio switch |
| 0 to 1 | Read/write |
16 | 32-bit electronic gear ratio numerator (low word) | Number of outputs = Spindle input number within response time*numerator/denominator | 0 to 214748647 | Read/write |
17 | 32-bit electronic gear ratio numerator (high word) | |||
18 | 32-bit electronic gear ratio denominator (low word) | 1 to 214748647 | Read/write | |
19 | 32-bit electronic gear ratio denominator (high word) | |||
20 | 32-bit electronic gear ratio numerator (low word) | Confirmation value | - | Read-only |
21 | 32-bit electronic gear ratio numerator (high word) | |||
22 | 32-bit electronic gear ratio denominator (low word) | - | Read-only | |
23 | 32-bit electronic gear ratio denominator (high word) |
Error code
Error code | Content |
---|---|
4085H | The read address of (s1), (s2) and (s3) exceeds the device range |
4084H | The data exceeds the settable range |
4EC0H | Electronic gear ratio setting error |
4088H | High-speed pulse instructions use the same output shaft (d1) |
Example
(1) Realize the 1:1 follow function of Y0 output pulse to Y3 output pulse.
Configure the high-speed counter, enable HSC0, and configure it as one-way output and count-up mode.
Ladder
Connect the Y3 output of the PLC to the X0 input.
Turn on M1, start M2, and Y3 for output. At this time, Y0 will follow Y3 1:1 (SD880 = SD1060).
(2) Use of 32-bit gear ratio.
Set the 32-bit gear ratio: 18518517: 12345678, set the 15 address of the data buffer to 1, and enable the 32-bit gear ratio function.
M1 turns ON to turn on the electronic gear command, M2 turns ON, LC0 will increase by 1 every 100ms, at this time SD880:LC0 always = 18518517:12345678.
(3) Use of gear ratio switching function
Set the gear ratio to 1:1.
M1 turns ON to turn on the electronic gear instruction, M2 turns ON, LC0 will increase by 1 every 100ms, at this time SD880:LC0 always = 1:1. When M3 is turned on, change the gear ratio to 2:1 and enable the switch gear ratio function. After that, the increment of SD880 and the increment of LC0 are always 2:1.
DECAM/32-bit electronic cam instruction
DECAM
The electronic cam function uses the preset cam curve to determine the slave axis movement amount according to the spindle movement (phase information) and the cam curve, and output. The cam curve refers to each phase (rotation angle (Degree) and CAM curve refers master axis rotation 1 cycle as the movement benchmark. The displacement of the slave axis can be set by the ECAMTBX instruction.
-[DECAM (s1) (s2) (s3) (d1) (d2)]
Content, range and data type
Parameter | Content | Range | Data type | Data type (label) |
(s1) | Specify to receive the input pulse of the master axis | -2147483648 to 2147483647 | Signed BIN 32 bit | ANY32 |
(s2) | Specify the data buffer of the electronic cam instruction | Form type | LIST | |
(s3) | The external start signal of the electronic cam needs to be enabled in the data buffer area to be effective. | X/M/S/D.b | Signed BIN 32 bit | ANY32 |
(d1) | Specify pulse output axis | Y0~Y7 | Bit | ANY_BOOL |
(d2) | Specify direction output shaft | Y/M/S/D.b | Bit | ANY_BOOL |
Device used
Instruction | Parameter | Devices | Offset modification | Pulse extension | ||||||||||
X | Y | M | S | D.b | D | R | LC | HSC | K | H | [D] | XXP | ||
DECAM | Parameter 1 | ● | ● | ● | ● | |||||||||
Parameter 2 | ● | ● | ||||||||||||
Parameter 3 | ● | ● | ● | ● | ||||||||||
Parameter 4 | ● | |||||||||||||
Parameter 5 |
Features
When the instruction is turned on, the PLC obtains the number of pulses of the master axis (s1), calculates the number of pulses that the slave axis needs to output for this calculation according to the set cam curve, and performs the pulse (d1) and direction (d2) Output. When the frequency of the driven shaft is greater than the set maximum frequency, it will output according to the set maximum frequency.
• When the master axis (s1) uses the high-speed counter (HSC), the PLC internally obtains the number of external input pulses. Modifying the value of the HSC counter does not affect the judgment of the input pulse.
• When the master axis (s1) uses an ordinary double-word counter (LC), the PLC directly obtains the number of pulses from the LC register, and modifying the value of the register directly affects the judgment of the input pulse.
• When the master axis (s1) uses the constant K/H, the number of input pulses is the time axis. If it is K1, the number of input pulses will increase by 1 every 100 us.
• Electronic cam data buffer (s2) table:
Offset address | Name | Instruction | Initial value | Range |
0 | Form version number | 5200 | ||
1 | Flag register | Bit0-Initialization complete flag After the electronic cam permission signal is activated, calculate the related Data, automatically set to ON after initialization, users need to clear this flag state by themselves | 0 | — |
Bit1-Cycle complete flag Electronic cam completion flag. When the periodic electronic cam is executed After completion, this flag will be automatically set to ON; if you want to restart the periodic electronic cam, the user needs to clear this flag state first. | 0 | — | ||
Bit2-Pulse transmission delayed flag bit Bit3-Error electronic cam stop running flag bit Bit4-Parameter error error, electronic cam stop running flag bit Bit5-Table error, electronic cam stop running flag Bit6-Periodic electronic cam flag Bit7-Aperiodic electronic cam flag Bit9-Stop flag for current cycle completion Bit10-synchronization zone flag Bit11-Time axis flag Bit12-New form loading complete flag Bit13-Periodic delay electronic cam flag Bit14-Delayed start function, delayed waiting flag bit | 0 | — | ||
2 | Error register | Operation error condition (check Bit3 of address 1): Display Error code. Parameter error condition (check Bit4 of address 1): Display the offset address of the error parameter register. Table error condition (check Bit5 of address 1): display Incorrect table segment number. | 0 | — |
3 | Function register (Confirm before using electronic cam) | Bit0-Delayed start enable Bit1-Start at specified position Bit2-Spindle zoom Bit3-zoom from axis Bit5-Use external start signal Bit6-Start from current position *Bit1 and Bit6 cannot both be 1. | 0 | — |
4 | Function register (can be changed while the electronic cam is running) | Bit0-Sync signal enable Bit1-Stop the electronic cam after the current cycle is completed Bit2-Switch the table after the cycle is completed, the bit will automatically change back to 0 after the switch is completed | 0 | — |
✎Note:
When the output pulse axis (d1) is used by this instruction, other high-speed pulse instructions can no longer use the output axis. Otherwise, an operation error will occur and pulse output will not be performed.
The cycle of calculating the electronic gear inside the PLC is 100us once. If multiple electronic gear/electronic cam commands are used at the same time, the time will increase accordingly. If the 8-axis electronic gear command is executed at the same time, the calculation cycle will become 800us.
The electronic gear commands can only be enabled at most 8 (Y0 ~ Y7) at the same time.
The electronic gear command is used, and the data buffer (s2) will occupy 24 consecutive devices. Note that the address cannot exceed the range of the device and reuse.
Error code
Error code | Content |
4E80H | E-cam table loading error |
4E81H | The currently numbered form has a cam in use |
4E82H | E-cam table address error |
4E83H | The electronic cam table exceeds the device range |
Example
For details, please refer to "9.2 Instruction manual of Electronic CAM (ECAM )".
ECAMCUT/Electronic cam table switching instruction
ECAMCUT
This instruction needs to be used in conjunction with the electronic cam instruction (DECAM) to specify the newly defined table address to realize the function of switching the electronic cam table periodically during the operation of the electronic cam.
-[ECAMCUT (s1) (s2)]
Content, range and data type
Parameter | Content | Range | Data type | Data type (label) |
(s1) | Specify the table number, currently only supports one table | 1 to 2 (LX5VT: 1 to 16) | Signed BIN 16 bit | ANY16 |
(s2) | Specify the first address of the data buffer area of the electronic cam table | - | Form type | LIST |
Device used
Instruction | Parameter | Devices | Offset modification | Pulse extension | |||
D | R | K | H | [D] | XXP | ||
ECAMCUT | Parameter 1 | ● | ● | ● | ● | ||
Parameter 2 | ● | ● |
Features
Table format definition:
Offset | Instruction |
0 | Number of table segments |
1 | Table version |
2 to 3 | Spindle section 0 (double word) |
4 to 5 | Section 0 slave axis (double word) |
6 to 7 | Spindle section 1 |
8 to 9 | Section 1 slave axis |
...... |
Instruction function description
(1) In the (s1) parameter, only K1 or K2 can be used to specify the location of the table. The format of the table must be as above.
K1 means Form 1
K2 means Form 2
Form 0 is the original form of the cam (optional)
(2) When the instruction is running, check the table data in the start address specified by (s2) and verify the correctness of the data. After the operation is successful, the table with the specified table number should point to the starting address of (s2). In the process of command pointing, if the corresponding numbered table is in the current cam operation, an operation error will be reported.
Before using the table, you need to run this command to configure the address where the table is located. After the table address is specified, it will not be saved after power off.
(3) Related registers and flags
•Electronic cam buffer offset 1 (flag bit register)
bit12 --- table switching completed flag
•Electronic cam buffer offset 4 (function register)
After bit2-cycle is completed, switch to the specified table operation
•Electronic cam buffer offset 31
Number of the table to be run in the next cycle (0 ~ 2)
•Electronic cam buffer offset 32
The table number of current cycle operation (0 ~ 2)
✎Note:
Table 0 is the self-contained table of the electronic cam, that is, the continuous address starting at offset 38 of the electronic cam data buffer. Therefore, the electronic cam can specify up to 3 tables at the same time, which can be switched freely during operation.
If the curve generated by the electronic cam table generation command ECAMTBX is used, the data buffer of the ECAMTBX generated table should be offset by 38 addresses and then specified.
Error code
Error code | Content |
4E80H | E-cam table loading error |
4E81H | The currently numbered form has a cam in use |
4084H | Data exceeding 1 to 2 is specified in (s1) |
4085H | The (s2) table exceeds the device range |
Example
Realize the mutual switching between electronic cam form 1 and form 2
✎Note:
- According to the above Circuit program, first set M2, configure table 1 data, and use ECAMCUT to designate table 1 as electronic cam operation table 1.
- Set M200 to configure the cam running command DECAM.
- Set M201 to enable electronic cam operation. And automatically prepare table 2 data, and assign table 2 data as electronic cam operation table 2.
- Set the second position of D2004 to 1 to turn on the electronic cam switching table function. At this time, table 1 is run in the current cycle, and table 2 is run in the next cycle.
- Use manual addition (M110) to change the master axis (LC0), and the slave axis pulse number SD880 will also change, and the ratio is the ratio of Table 1 (1:2).
- When LC0 = 100, the program automatically switches to Table 2 to run, LC0 increment: SD880 increment = 2000:120500. And currently running table 2 and next cycle running table 1. When LC0 = 2100, switch back to Table 1 to run.
ECAMTBX/Electronic cam table generation instruction
ECAMTBX
This instruction is used to generate the table data of the electronic cam.
-[ECAMTBX (S0) (S1) (D0) (D1)]
Content, range and data type
Parameter | Content | Range | Data type | Data type (label) |
(S0) | Specify the first address of the electronic cam table parameter | - | Form type | LIST |
(S1) | Specify the curve type of the electronic cam | - | Signed BIN 16 bit | ANY16 |
(D0) | Specify the first address of the data buffer area of the E-cam table | - | Form type | LIST |
(D1) | Table generation results | - | Signed BIN 16 bit | ANY16 |
Device used
Instruction | Parameter | Devices | Offset modification | Pulse extension | |||
D | R | K | H | [D] | XXP | ||
ECAMTBX | Parameter 1 | ● | ● | ||||
Parameter 2 | ● | ● | ● | ● | |||
Parameter 3 | ● | ● | |||||
Parameter 4 | ● | ● |
Features
S0--parameter address, allowable Devices: D, R.
Description: Indicate the parameters to be set to generate the curve.
S1--curve type, allowable Devicess: D, R, H, K.
Description: Indicates the type of curve to be generated.
K1: Generate S type acceleration/deceleration curve with a spindle of 1ms
K2: Customize the designated key point to generate a table
K100: Generate rotary saw curve
K101: Generate flying saw curve
D0--The first address of cam parameters, allowable devices: D, R
Description: The generated table data is stored at the beginning of [D0 + 40], and the number of table segments is stored in [D0 + 38].
D1-table generation result, allowable Devices: D, R
D1 <0 generates a table error;
D1> 0 The table is successfully generated. D1 represents the total number of segments in the current table.
Error code
ECAMTBX instruction generates curve Error code:
Error code | Content |
-1 | Condition parameter error |
-2 | The spindle pulse number is too few, not enough for synchronization area |
-3 | Unknown cam curve type |
-4 | Resolution range error |
-5 | Too many pulses of the slave axis calculated |
-6 | The calculated number of pulses from the slave axis is too small |
-7 | The calculated number of spindle pulses exceeds the set length |
-8 | The pulse number of the slave axis is set to 0 |
-10 | S type acceleration and deceleration curve calculation error |
-11 | Unknown curve type |
-12 | Curve left wrong |
-13 | The number of slave axes exceeds the range |
Key point generating curve Error code:
Error code | Content |
-21 | The number of key points is out of range |
-22 | Total resolution exceeds range |
-23 | Incorrect relationship between spindle size |
-24 | The resolution setting of each segment is incorrect |
-25 | When calculating, the number of control points is insufficient |
-26 | Unknown acceleration curve type |
-27 | Spindle pulse number is negative |
S-type acceleration and deceleration generated curve Error code:
Error code | Content |
-31 | The number of pulses exceeds the range |
-32 | Maximum frequency out of range |
-33 | Acceleration and deceleration time out of range |
-34 | The number of pulses or frequency settings cannot meet the curve generation conditions |
✎Note:
After the curve is successfully generated by the ECAMTBX instruction, the cam table can be uploaded to the upper computer for viewing in the PLC of the PLC Edit upper computer software.
Example
For details, please refer to "9.2 Instruction manual of Electronic CAM (ECAM )".
Instruction manual of Electronic CAM (ECAM )
Principle of ECAM
The traditional mechanical cam is composed of cam, follower and frame. A mechanical cam is an irregular part, generally an input part with a constant speed, which can transmit motion to a follower through direct contact, so that the action moves according to a set law. The follower is a passive part driven by a mechanical cam, and is generally an output part that produces unequal speed, discontinuous, and irregular motion.
ECAM is a software system that uses the constructed concave wheel curve to simulate mechanical cam to achieve the same relative motion between the camshaft and the main shaft of the mechanical cam system.
Compared with mechanical cams, ECAM makes the design of mechanical and electrical parts more and more simple. ECAM allows the equipment to be flexibly used in different templates and plate styles, and also allows the operation process and cycle of the equipment to be modified, either during the design phase of the equipment or after the equipment is formed. It reduces the complexity of the equipment, makes the equipment run more smoothly and doubles the production efficiency.
Description of ECAM function
A.Establish ECAM data
LX5V provides 3 ways to establish ECAM data:
① Write table data to the table data area by DMOV instruction.
② Generate ECAM data automatically by ECAMTBX instruction.
③ Draw ECAM data with PLC Editor software.
B.Spindle pulse selection
The selectable spindles of LX5V series PLC are HSC, LC type and virtual time axis K.
Among them, external high-speed input uses high-speed counter, which supports single-phase single-count input\single-phase double-count input and biphase double-count input. As for the assignment of counters, refer to the instructions for high-speed counters in the PLC help.
When using HSC register (high-speed counter), the pulse of spindle is obtained internally. Modifying the value of the counter does not affect the cam to judge the actual pulse input quantity.
When using the normal counter LC, the pulse of spindle is obtained from devices. Modifying the value of the register will affect the judgment of the pulse of spindle .
When using the K type register, it means to use the internal virtual time axis, and the minimum unit is 100us, K1=100us, K10=1ms.
C.Enable ECAM configuration
Use the DECAM instruction to configure the ECAM function of PLC.
Name | Function | Bits | Whether pulse type | Instruction format | Step number |
DECAM | ECAM configuration | 32 | No | DECAM s1 s2 s3 d1 d2 | 10 |
Ladder :
(1) Parameters
Parameter | Content | Range | Data type | Data type (label) |
(s1) | Specify to receive the input pulse of the master axis | -2147483648 to +2147483647 | Signed BIN 32 bit | ANY32 |
(s2) | Specify the data buffer area of the ECAM instruction | Form | LIST | |
(s3) | The external start signal of ECAM needs to be enabled in the data buffer area to be effective. | X/M/S/D.b | Signed BIN 32 bit | ANY32 |
(d1) | Specify pulse output axis | Y0 to Y7 | Bit | ANY_BOOL |
(d2) | Specify direction output axis | Y/M/S/D.b | Bit | ANY_BOOL |
Device used:
Instruction | Parameters | Device | Offset modification | Pulse extension | ||||||||||
X | Y | M | S | D.b | D | R | LC | HSC | K | H | [D] | XXP | ||
DECAM | Parameter 1 | ● | ● | ● | ● | |||||||||
Parameter 2 | ||||||||||||||
Parameter 3 | ● | ● | ● | ● | ● | ● | ||||||||
Parameter 4 | ● | |||||||||||||
Parameter 5 | ● | ● | ● |
(2) Function description
When the contact M0 is turned on, the PLC activates ECAM function, but the ECAM function is not yet running at this time, it just initializes the parameters of the cam. It includes that D1000 to D1005, D1031, D1032 will be cleared and check whether the cam table is correct. After initialization, these registers still need to be set for control.
This instruction configures the relevant registers and required data for cam operation, and enables the function of ECAM, but the cam does not actually run. To actually enable the ECAM function, the relevant device in the cache address of the instruction (such as D1000 in the instruction) is also needed to control the start and stop of the cam.
If the instruction is disconnected, the cam stops working.
Refer to the description of "9.2.2.5 ECAM function register" for the definition of cam parameter devices.
(3) Instruction error description
When the instruction is running, PLC will check the relevant cam parameters in the cache address and prompt the corresponding error. You can find the error according to the prompt [PLC Error code information]:
Error code | Content |
4084H | The parameter set in the instruction exceeds the limit |
4085H | The device used in the instruction exceeds the maximum device number |
4088H | Multiple application instructions use the same output axis for pulse output |
4E80H | ECAM table loading error |
4E81H | The currently numbered form has a cam in use |
4E82H | ECAM table address error |
4E83H | The electronic cam table exceeds the device range |
When an error occurs, the ECAM function is not enabled at this time.
(4) Devices involved in instruction execution
Devices | Content |
SD881 (high byte), SD880 (low byte) | Y000 Output pulse number. Decrease when reversed. (Use 32 bits) |
SD941 (high byte), SD940 (low byte) | Y001 Output pulse number. Decrease when reversed. (Use 32 bits) |
SD1001 (high byte), SD1000 (low byte) | Y002 Output pulse number. Decrease when reversed. (Use 32 bits) |
SD1061 (high byte), SD1060 (low byte) | Y003 output pulse number. Decrease when reversed. (Use 32 bits) |
SD1121 (high byte), SD1120 (low byte) | Y004 Output pulse number. Decrease when reversed. (Use 32 bits) |
SD1181 (high byte), SD1180 (low byte) | Y005 Output pulse number. Decrease when reversed. (Use 32 bits) |
SD1241 (high byte), SD1240 (low byte) | Y006 Number of output pulses. Decrease when reversed. (Use 32 bits) |
SD1301 (high byte), SD1300 (low byte) | Y007 Output pulse number. Decrease when reversed. (Use 32 bits) |
Devices | Content | Devices | Content |
SM882 | Y000 Pulse output stop (stop immediately) | SM880 | Y000 monitoring during pulse output (BUSY/READY) |
SM942 | Y001 Pulse output stop (stop immediately) | SM940 | Y001 Monitoring during pulse output (BUSY/READY) |
SM1002 | Y002 Pulse output stop (stop immediately) | SM1000 | Y002 Monitoring during pulse output (BUSY/READY) |
SM1062 | Y003 Pulse output stop (stop immediately) | SM1060 | Y003 Monitoring during pulse output (BUSY/READY) |
SM1122 | Y004 Pulse output stop (stop immediately) | SM1120 | Y004 Monitoring during pulse output (BUSY/READY) |
SM1182 | Y005 Pulse output stop (stop immediately) | SM1180 | Y005 Monitoring during pulse output (BUSY/READY) |
SM1242 | Y006 Pulse output stop (stop immediately) | SM1240 | Y006 Monitoring during pulse output (BUSY/READY) |
SM1302 | Y007 Pulse output stop (stop immediately) | SM1300 | Y007 Monitoring during pulse output (BUSY/READY) |
D.ECAM start/stop
(1) Periodic ECAM start/stop
Periodic ECAM means that while the main axis is continuously advancing, the cam axis will realize the corresponding position according to the "ECAM curve table (table)", but the table only defines one period of data, so the positional relationship of master/slave axis in this mode is the continuous repetitive extension of the table.
1) Periodic ECAM start
Periodic ECAM start sequence is as below.
✎At time T1, address 5=1, start periodic electronic cam.
✎After the time T2 has elapsed, the PLC takes the initiative to set address 1-bit0 (ECAM initialization complete flag).
✎During time T3, ECAM initialization is completed and the periodic action is started. The slave axis follows the movement of the spindle according to the position relationship in the table, and the synchronization signal terminal is output according to the synchronization point range.
✎When a cycle is completed, ECAM cycle completion flag address 1-bit1 turns ON, and the user clears the completion flag by itself, and then continues to judge the next cycle.
2) Periodic ECAM stop
The periodic ECAM stop sequence is as below.
✎When ECAM starts register (address 5) = 0, the ECAM stops operating immediately.
✎When the periodic ECAM is operating, the system receives the completion stop flag ((address 4-bit1), the periodic ECAM will continue until the current table is executed, the slave axis will stop operating, as shown in the figure below. If you want to start the periodic cam again, you need to write 0 to address 5 and keep it more than 100us, and then you can start the periodic cam through address 5 again.
3) Example description
The following figure shows the ECAM data, where the spindle length is 50000, the output unit is the number of pulses, and the synchronization range is 20000 to 30000. When running into the synchronization zone, the synchronization terminal output can be used as a control signal. To create ECAM data, please refer to the ECAM data. Hardware circuit Y1 outputs pulse to connect to X0, and it means that the spindle input terminal receives the output pulse of Y1.
This example is to use the software PLC Editor2 to set the table.
Instructions
① When executing the program, the special register is set first. The set parameters are as follows:
A. Double word is composed of SD881 and SD880, the current position of Y0 is cleared to 0,
B. Start the high-speed counter HSC0 and configure it as a single-phase input to receive the high-speed pulse input of X0 (in this case, the pulse of X0 comes from the output pulse of Y1).
② SET M0 to start the ECAM, Y axis starts to perform variable speed movement. The main axis receives variable speed input pulse of Y axis, the slave axis outputs pulse according to the ECAM curve, and when the main axis position is 20000-30000 in each cycle, Y7 is ON state.
✎Note: Special registers must be set before the ECAM is started. Set the upper and lower limits of the synchronization position of the ECAM D2009 = 20000, D2011 = 30000; and set the number of the synchronization terminal Y D2008, and the synchronization output enable D2004-BIT0, an ECAM cycle is 50000 pulses and when the spindle position is 20000-30000 pulses (monitored by D2025 and D2026), the synchronization terminal is ON.
③ RST M0, the cam stops running.
PLC program
(2) Aperiodic ECAM start/stop
Aperiodic ECAM refers to the timing when the camshaft starts to realize the corresponding position according to the table while the main shaft is continuously advancing after the cam start signal is input. Different from the periodic ECAM, The position relationship of the master/slave axis in this mode actually only runs for one cycle, that is, the table only moves once.
1) Aperiodic ECAM start
The aperiodic ECAM stop sequence is as below.
- At time T1, address 5=2, and aperiodic ECAM is started.
- After the calculation of the time T2, the PLC actively sets the address 1-bit0=ON (the initialization of aperiodic ECAM is completed). At this time, the slave axis will not follow the movement of the master axis.
- At time T3, the ECAM start signal is turned ON (when the external start signal is used), the slave axis will follow the spindle movement for one cycle according to the position relationship in the table.
- After the cycle is completed at the position of time T4, the PLC will actively clear the state of address 1-bit0=ON, and the user can also judge whether the cycle is completed according to the state of address 1-bit1 to .
- During the time T5, the user can choose whether to set the address 1-bit0=ON again through the program , for the purpose of completing the judgment next time.
- Time T6/T7 position is to repeat the action of T3 to T4 again. ✎Note: The interval between the rising edges of the cam start signal must be more than 0.5ms.
- Sync signal terminal output.
2) Aperiodic electronic cam stop
- When starting the ECAM register address 5=0, the ECAM slave axis stops operating immediately, as shown in the figure below.
2. When the aperiodic ECAM is running, address 4-BIT1=1 (stop after the current cycle is completed), the aperiodic ECAM will continue to run through the table and then the slave axis will stop operating, as shown in the figure below.
3) Example explanation
The following figure shows the ECAM running table (the spindle length is 0 to 100000 for a cycle), and its output is the number of pulses. When the external signal X2 is triggered by the rising edge, execute two consecutive tables (D1014=2), and wait for the X2 rising edge Trigger again, and execute two consecutive tables again, and so on.
This example uses the software PLC EDITOR to ECam0. Please refer to 9.2.2.5 for the detailed steps of creating an ECAM curve. The Y1 axis of the hardware circuit outputs pulse and connects to the X0 axis input terminal, indicating that input terminal position of master axis is to receive the pulse output of Y1 axis as input.
Operation steps
① When the program is executed, set special registers first, and the set parameters are as follows:
A. The contents of SD880, SD881 and SD940, SD941 are cleared to 0
B. Set D1014=2 (repeat the form twice)
② Set M0: Configure and start the cam. When M0 is the rising edge, set D1003-Bit5 to use an external start signal; when D1005=2, Y1 outputs pulses, and Y0 axis has not output yet at this time.
③ The external signal X2 is triggered, and Y0 axis is output with the ECAM curve; the output stops after 2 cycles.
④ RST M0: Close the ECAM mode; if runs RST M0 when the ECAM is running, Y0 axis will stop output immediately.
[PLC program]
Electronic cam function register
Offset address | Name | Instruction | Initial value | Range |
0 | Form version number | 0 | ||
1 | Flag register | Bit0: Initialization complete flag After the ECAM permission signal is activated, calculate the related data, and automatically set to ON after initialization. Users need to clear the state of this flag by themselves. | 0 | — |
Bit1: Cycle completion flag ECAM completion flag. When the periodic ECAM is executed, this flag will be automatically set to ON; if you want to restart the periodic ECAM, clear the state of this flag first. | 0 | — | ||
Bit2: Pulse sending delayed flag Bit3: ECAM error stop running flag Bit4: Parameter error, ECAM stop running flag Bit5: Table error, electronic cam stop running flag Bit6: Periodic ECAM flag Bit7: Aperiodic ECAM flag Bit9: Current cycle completion stop flag Bit10: synchronization zone flag Bit11: Time axis flag Bit12: New form load completion flag Bit13: Periodic delay ECAM flag Bit14: Delayed start function, delayed waiting flag bit | 0 | — | ||
2 | Register error | Operation error condition (check Bit3 of address 1): Display Error code. Parameter error condition (check Bit4 of address 1): Display the offset address of the error parameter register. Table error condition (check Bit5 of address 1): display error Incorrect table segment number. ✎Note: Bit3 of address 1 must be set with Bit4 and Bit5 | 0 | — |
3 | Function register (Confirm before using electronic cam) | Bit0: Delayed start enable Bit1: Start at specified position Bit2: Spindle zoom Bit3: zoom from axis Bit5: Use external start signal Bit6: Start from current position | 0 | — |
4 | Function register (Can be changed while the ECAM is running) | Bit0: Sync signal enable Bit1: Stop the electronic cam after the current cycle is completed Bit2: Switch the table after the cycle is completed, the bit will automatically change back to 0 after the switch is completed | 0 | — |
5 | ECAM start register | 0: Stop the electronic cam immediately 1: Periodic electronic cam (start) 2: Aperiodic electronic cam (start) 3: Stop after the cycle is completed, this register automatically becomes 3 4: Periodic delay electronic cam (start) Other: reserved, not available | 0 | — |
6 | Maximum output frequency setting of ECAM | Maximum output frequency setting of electronic cam; When the frequency is less than 0 or greater than 200K, it is 200K | 200000 | 0 to 200000 |
7 | The highest ECAM output frequency setting | |||
8 | Sync signal Y terminal number | Output terminal number: Set the Y number of the synchronization output terminal, the range is 0 to 1777 (octal), when the synchronization output function is enabled, when in the synchronization area, the corresponding Y terminal outputs the synchronization signal. This function needs to set the upper and lower limits of the synchronization position first . | 0 | 0 to 1777 |
9 | CAM synchronization position lower limit (Low word) | The synchronization position upper/lower limit setting of the electronic cam, When the synchronization position lower limit ≤ spindle position ≤ position upper limit And the synchronization signal terminal Y output is ON when the synchronization signal is enabled (address 4, BIT0). When the lower limit> the upper limit, the upper and lower limit values will be exchanged. | 0 | 0 to 2147483647 |
10 | CAM synchronization position lower limit (High word) | |||
11 | CAM synchronization position upper limit (Low word) | 0 | 0 to 2147483647 | |
12 | CAM synchronization position upper limit (High word) | |||
13 | Electronic cam pulse remainder distribution setting (reserved) | Reserved | — | — |
14 | Aperiodic ECAM execution times | Periodic electronic cam: reserved; Aperiodic electronic cam: control table execution times; when the value is H0001, the electronic cam will stop after executing once; When the value is HFFFF, it will become a periodic electronic cam execution. | 1 | 1 to 65535 |
15 | ECAM start delay pulse setting (low word) | Periodic electronic cam: reserved Aperiodic electronic cams and periodic delay electronic cams: the delayed start function can be enabled through (Address 3, Bit0-delayed start enable). When the aperiodic electronic cam is executed, a cam start signal is received. If the electronic cam table is not executed immediately, but the spindle rotates for a few pulses, the table is run. At this time, this register sets the number of delayed pulses. | 0 | 32-bit unsigned integer |
16 | ECAM start delay pulse setting (high word) | |||
17 | Spindle specified position start (Low word) | Periodic electronic cam: reserved Aperiodic electronic cam: It can be enabled by (address 3, Bit1-specified location start enable), To enable the function of the specified location. The starting position is set by this address. The setting value must be within the table period. | 0 | 32-bit unsigned integer number |
18 | Spindle specified position start (high word) | |||
19 | Current position of slave axis (low word) | Output shaft: current position of slave shaft (after conversion) The position of the slave axis during the current cam execution, after scaling | 0 | 32-bit unsigned integer |
20 | Current position of slave axis (high word) | |||
21 | Current position of slave axis (low word) | Output shaft: current position of slave shaft (before conversion) The position of the slave axis during the current cam execution, before scaling | 0 | 32-bit integer |
22 | Current position of slave axis (high word) | |||
23 | Denominator of slave axis magnification | Zoom from axis | 1 | 1 to 65535 |
24 | Slave magnification numerator | 1 | 1 to 65535 | |
25 | Spindle current position (low word) | Input axis: the current position of the spindle (after conversion) The position of the main axis during the current cam execution, after scaling | 0 | 32-bit unsigned integer |
26 | Spindle current position (high word) | |||
27 | Spindle current position (low word) | Input axis: the current position of the spindle (before conversion) The position of the main axis during the current cam execution, before scaling | 0 | 32-bit unsigned integer |
28 | Spindle current position (high word) | |||
29 | Denominator of spindle magnification | Spindle zoom | 1 | 1 to 65535 |
30 | Spindle magnification numerator | 1 | 1 to 65535 | |
31 | Specify the table to be run in the next cycle | Switch to use in the table function after the cycle is completed. 0: Use the default table 1: Use the data in Table 1 (ECAMCUT specifies the address) 2: Use the data in Table 2 (ECAMCUT specifies the address) | 0 | 0 to 2 |
32 | Table running in current cycle | Switch to use in the table function after the cycle is completed. Indicates the current week Periodically run form. | 0 | 0 to 2 |
33 | Reserved | Reserved | — | — |
34 | Reserved | Reserved | — | — |
35 | Reserved | Reserved | — | — |
36 | Reserved | Reserved | — | — |
37 | Reserved | Reserved | — | — |
38 | Number of segments in the table | Total data segment of cam table data | 0 | 0 to 512 |
39 | Start offset of the table | Specify the offset address of the cam table, fixed to 40 | 40 | 40 |
40 | Spindle segment 0 (low word) | Spindle position of segment 0 | 0 | 32-bit integer |
41 | Spindle segment 0 (high word) | |||
42 | Section 0 slave axis (low word) | Slave axis position of segment 0 | 0 | 32-bit integer |
43 | Section 0 slave axis (high word) | |||
44 | Spindle section 1 (low word) | Spindle position of segment 1 | 0 | 32-bit integer |
45 | Spindle section 1 (high word) | |||
46 | Section 1 slave axis (low word) | Slave axis position of segment 1 | 0 | 32-bit integer |
47 | Section 1 slave axis (high word) | |||
40+ N*4 | Nth spindle (low word) | Nth segment spindle position | 0 | 32-bit integer |
40+ N*4+1 | Nth spindle (high word) | |||
40+ N*4+2 | Nth segment slave axis(low word) | Nth segment slave axis position | 0 | 32-bit integer |
40+ N*4+3 | Nth segment slave axis(high word) |
Description of cam register
(1) Address 2 - Error register:
Operation error (check Bit3 of address 1) error code description:
Error code | Content |
-1 | Form number is out of range |
-2 | The table is not initialized properly |
-3 | The number of table segments is too short |
1 | Spindle input error, pulse change is too large, 100us exceeds 200 |
3 | Too many slave axes calculated |
5 | The spindle has too many unprocessed pulses in the current cycle |
8 | Calculate the number of pulses that the slave axis currently needs to output is too much |
9 | The cam master is 2 cycles ahead of the slave |
Parameter error (check Bit4 of address 1) | Display the offset address of the error parameter register. |
Form error (check Bit5 of address 1) | The wrong table segment number is displayed. |
(2) Address 3—function register before ECAM is enabled
Start the corresponding function register of the cam. When the corresponding setting is 1, the corresponding function of the cam is enabled.
BIT6: start from current position
You can set the starting point of the master and slave when the cam starts.
When this function is enabled, the initial position of the spindle is obtained from [Address 27, 28 — current position of the spindle (before conversion)];
The initial position of the slave axis is obtained from [Address 19, 20 — current position of the slave axis (after conversion)].
(3) Address 4—function register in ECAM operation
Bit0-Sync signal enable
When the address 4-Bit0=1, when the spindle position is at the lower limit of the synchronous position ≤ the spindle position ≤ the upper limit of the synchronous position, the synchronous terminal outputs.
Bit1-Stop when the current cycle is completed
When address 4-BIT1 = 1, the cam will stop immediately after the execution of the current table is completed. After stopping, address 5 will automatically change to 3, reset to 1, and the periodic electronic cam can be started again. The same applies to non-periodic electronic cams.
(4) Address 5—electronic cam start register
Periodic electronic cam start: when address 5=1, start periodic electronic cam: when address 5=0, stop electronic cam.
Periodic delay electronic cam start: when address 5=2, start the first period delay pulse set by address 15, 16 and execute according to periodic electronic cam; address 5=0, stop electronic cam.
When switching between periodic electronic cam and non-periodic electronic cam, the data switching between address 5=1→address 5=0→address 5=2 requires an interval of more than 100us.
(5) Address 8—synchronization signal Y terminal number
This register is used to set the terminal number of the synchronization signal output.
When the address 4-Bit0=1, when the spindle position is at the lower limit of the synchronous position≦the spindle position≦the upper limit of the synchronous position, the synchronous terminal outputs.
(6) Address 9-12—synchronization position upper and lower limit
Address | Features | Range |
Address 9 | CAM synchronization position lower limit (LOW WORD) | 0 to 2147483647 |
Address 10 | CAM synchronization position lower limit (HIGH WORD) | |
Address 11 | CAM synchronization LOW WORD) | 0 to 2147483647 |
Address 12 | CAM synchronization position upper limit (HIGH WORD) |
The synchronization position upper/lower limit of the electronic cam is set. When the synchronization position lower limit ≤ spindle position ≤ position upper limit and the synchronization signal is enabled (address 4, BIT0), the synchronization signal terminal Y is output.
(7) Address 14—Aperiodic electronic cam execution times setting
Address | Features | Range |
Address 14 | Periodic electronic cam-reserved Non-periodic electronic cam-control the number of times the electronic cam is executed | 1 to 65535 |
When the non-periodic electronic cam mode is selected, the address 14 controls the execution times of the electronic cam. The current address is set to the number of times the cam repeats the table. When the value is HFFFF, it will become periodic cam execution. When the value is 0, the current address will automatically become 1 if it exceeds the range.
Number of repetitions=0
Number of repetitions=1
(8) Address 15-16—Electronic cam start delay pulse setting
Address | Features | Range |
Address 15 | Aperiodic electronic cams or periodic delay electronic cams. The electronic cam table will be executed immediately after the spindle rotates the set number of pulses | 32-bit unsigned integer |
Address 16 |
When executing aperiodic electronic cams or periodic delayed electronic cams, if address 3 (Bit0-delayed start enable) is set, the delayed start function is enabled. The slave axis receives a cam start signal. If the electronic cam table is not executed immediately, the table is run after delaying the spindle rotation for several pulses. At this time, the number of delayed pulses must be set for address 16.
As shown in the figure below: When the system receives a cam start signal, the electronic cam table will be executed immediately after the spindle rotates the set number of pulses.
Delayed start pulse=10
Delayed start pulse=50
(9) Address 17-18—start at the specified position of the spindle
Address | Features | Range |
Address 17 | The non-periodic electronic cam can be started at the specified position by address 3 (Bit1-specified position start enable). The starting location is set by this address | 32-bit unsigned integer |
Address 18 |
9.2.2.6 E-cam spreadsheet data creation
(1) Single table data change setting
Each electronic cam table can create 512 points of data, which are set using offset address 40-address [40+n*4+4] respectively. Every 4 points of data is a group of ECAM data, which is composed of master axis position and slave axis position.
Use DMOV instruction to manipulate table data:
Set the total data segment of the spreadsheet data to 3
The spindle position of segment 0 is 0
The position of the 0th segment slave axis is 0
The spindle position of the first segment is 100
The first segment slave axis position is 100
The second stage spindle position is 200
The second segment slave axis position is 0
Configure electronic cam
(2) Use PLC Editor to generate table data
Define the relationship between master axis and slave axis, which is called electronic cam table data. In the data input, the electronic cam table has two ways to express:
Method 1: The functional relationship between the adopter
Method 2: Use the point-to-point relationship of X and Y to obtain the electronic cam table in two ways:
Approach 1: According to the standard function relationship of the master and slave axis
Approach 2: According to the corresponding relationship between points measured in actual work.
The cam table can define multiple CAM curves. After the relationship is determined, the position of the slave axis can be obtained according to the position of the master axis.
For example, the cam table for sinusoidal signals:
The electronic cam table is called electronic cam table in PLC Editor. Select [electronic cam table] in [Project Properties]-[Protection Function], right click to add and delete the table.
The chart is mainly divided into 4 parts, namely the relative position of the master/slave axis, the relative speed of the master/slave axis, the relative acceleration of the master/slave axis, and the bottom data setting. The first three parts are used to display the CAM data set by the user. The horizontal axis is the main axis, and the vertical axis is the position of the slave axis, the speed ratio of the slave axis to the master axis, and the acceleration ratio of the slave axis to the master axis. The data setting area is introduced as follows:
- Displacement resolution: Provide users to set the total number of data points occupied by the table, and the setting range is from 10 to 512, one point occupies 4 WORD Devicess.
- Data setting: Describe the displacement change of the master/slave axis by function.
- Import: describe the displacement change of the master/slave axis through a point-to-point method.
- Export: Export and archive the change relationship of the master/slave axis in a point-to-point manner.
1) Functionally describe the position changes of the master and slave axes
Select [Data Setting] in the data setting area and the "Data Setting Window" will appear, which allows the user to describe the curve of the entire cam in a function, rather than a point-to-point description. At present, Wecon PLC provides 3 cam curve modes for users to choose, namely: Const Speed (constant speed), Const Acc (uniform acceleration), BSpline (cycloid).
[Data Setting] The window is composed of sections, each section provides the user to set a section of cam curve, and then the entire section composes the cam curve. Each section is composed of master axis, slave axis, CAM curve and resolution, as explained below:
Main shaft: the displacement of the main shaft, the displacement of the main shaft must be greater than a value of 0, and increase;
Slave axis: the displacement of the slave axis, which is positive or negative;
CAM curve: the function used in the current section;
Resolution: The number of points used in the current section. The entire table can be set in the range 10-512. 1 point occupies 4 WORDs. If not set, the remaining points will be divided equally. The resolution is set according to the requirements of the device. The higher the resolution, the smoother the device runs, but the larger the device.
2) Describe the position changes of the master and slave axes in a point-to-point manner
Directly add data to the electronic cam table in a point-to-point mode. A cam table can input up to 512 points of data.
[Export]Export the current table data in a point-to-point manner and store it in the specified file.
[Import] Import the current table data in a point-to-point manner.
(3) Use ECAM TBX to generate tables
Name | Features | Bits (bits) | Whether pulse type | Instruction format | Step count |
ECAMTBX | Generate spreadsheet data | 16 | No | ECAMTBXS0 S1 D0 D1 | 9 |
S0--parameter address, allowable device: D, R.
For the setting parameters when generating the curve, please refer to the description in [Appendix]-[Parameter List]
S1--curve type, allowable Devicess: D, R, H, K.
Indicates the type of curve to be generated.
K1: Generate S type acceleration/deceleration curve with a spindle of 1ms
K2: Customize the specified key point to generate a table
K100: Generate rotary saw curve
K101: Generate chase curve
D0--the first address of cam parameters,
Allowed devices: D, R
The generated table data is stored at the beginning of [D0 + 40], and the number of table segments is stored in [D0 + 38].
D1--form generation result
Allowed devices: D, R
D1 <0 generates a table error;
D1> 0 The table is successfully generated. D1 represents the total number of segments in the current table.
ECAMTBX instruction generating curve error code:
Error code | Content |
-1 | Condition parameter error |
-2 | The spindle pulse number is too few, not enough for synchronization area |
-3 | Unknown cam curve type |
-4 | Resolution range error |
-5 | Too many pulses of the slave axis calculated |
-6 | The calculated number of pulses from the slave axis is too small |
-7 | The calculated number of spindle pulses exceeds the set length |
-8 | The pulse number of the slave axis is set to 0 |
-10 | S type acceleration and deceleration curve calculation error |
-11 | Unknown curve type |
-12 | Curve left wrong |
-13 | The number of slave axes that exceeds the range |
Key point generating curve Error code:
Error code | Content |
-21 | The number of key points is out of range |
-22 | Total resolution exceeds range |
-23 | Incorrect relationship between spindle size |
-24 | The resolution setting of each segment is incorrect |
-25 | When calculating, the number of control points is insufficient |
-26 | Unknown acceleration curve type |
-27 | Spindle pulse number is negative |
S-type acceleration and deceleration generated curve Error code:
Error code | Content |
-31 | The number of pulses exceeds the range |
-32 | Maximum frequency out of range |
-33 | Acceleration and deceleration time out of range |
-34 | The number of pulses or frequency settings cannot meet the curve generation conditions |
✎Note: After the curve is successfully generated by the ECAMTBX instruction, the cam table can be uploaded to the upper computer for viewing in the PLC of the PLC Edit upper computer software.
The application of ECAM
A.Rotary saw application
In the feeding and cutting application, the traditional method is to use the stop-and-go method. The feeding shaft first walks to a fixed length, and then the cutting shaft moves again, and then the process of "feeding stop" and "cutting stop" is repeated. Disadvantages of the medium method. In the process of feeding shaft stop and stop, the required acceleration and deceleration can not improve the production efficiency. Therefore, the new method is to use the non-stop feeding method. Generally, there are two feeding and cutting methods: rotary saw and flying saw. The difference between the two is that rotary saw moves in the same direction, while flying saw moves back and forth, and the set CAM table curves are also different.
(1) Description of rotary saw action
1) Rotary saws control the cutting axis to rotate in the same direction, and cut when the tool touches the material. During this period, the feeding axis will continue to feed at a constant speed without stopping. The action and output stroke of rotary saw control are shown in the figure below:
①. Accelerate and move to the synchronization area from the beginning of the axis;
②. In the synchronization zone and the spindle at the same speed and output the cutting signal (CLR0);
③. After leaving the synchronization zone, the slave axis will decelerate and move back to the origin to complete a cycle of cutting. After knowing the stroke, the speed relationship can be drawn.
2) In the cutting process, the most important thing is speed synchronization. For example, when the cutting knife contacts the material, it must be synchronized with the material speed. If the cutting knife speed is greater than the synchronous speed during contact, a force that pulls the material forward will cause the material to be uneven. If the speed is lower than the material speed, it will appear. Blocking phenomenon.
3) The planning of the synchronization area will affect the operation of the actual equipment. If the synchronization area is larger in a cutting cycle, the acceleration and deceleration time will be smaller, which means that the equipment needs to be accelerated and decelerated in a short time. For motors and machines The impact of the cutter is very large, and it is easy to cause the servo over-current alarm and the equipment cannot operate normally.
4) The relationship between cutting length and cutter circumference:
Cutting length <cutter circumference: In the synchronization zone, the cutter linear speed is synchronized with the feeding speed. After the synchronization zone, in order to catch up with the next cutting, the cutting axis is accelerated, as shown in the figure. | ![]() |
Cutting length = cutter circumference: Average speed of cutting axis | ![]() |
1 times cutter circumference <cutting length <2 times cutter circumference:After the cutting action in the synchronization zone is completed, the cutting axis decelerates, then speed up to synchronize the next cutting, as shown in the figure. | ![]() |
Cutting length> 2 times the circumference of the cutter:When the cutting length is greater than 2 times the knife circumference (this is also the most common situation), in a cycle, after the cutting of the knife edge in the synchronization zone is completed, it decelerates to a stop, waits for a certain length to pass, and then starts the next cutting . | ![]() |
(2) Rotary saw generation
The PLC built-in rotary saw curve automatically generates instructions. For the parameters needed to generate the curve, please refer to the "Rotary saw Parameter Table". The CAM curve in depth 6 has 5 forms. The combination of these 5 forms can generate the required rotary saw curve. ,As shown below.
Rotary saw curve parameter setting | ||||
Parameter | Offset address | Name | Format | Instruction |
Parameter 1 | Address 0 | Spindle length | 32 Bits Integer | The cutting length of the feeding axis moving, the unit is Pulse. |
Address 1 | ||||
Parameter 2 | Address 2 | Slave length | 32-bit integer | The circumference of the cutting axis (including the tool length), the unit is Pulse. Range [-2000000000, 2000000000] |
Address 3 | ||||
Parameter 3 | Address 4 | Slave axis sync length | 32-bit integer | The length of the slave axis synchronization zone is smaller than the slave axis length, generally set to 1/3 of the slave axis length. (When the new S-type rotary saw is selected, the value satisfies 40 *synchronization ratio<=synchronization length<slave axis Length-2. ), synchronization area range: 0<synchronization area length<|slave axis length| |
Address 5 | ||||
Parameter 4 | Address 6 | Slave axis synchronization magnification | Floating | Calculation method 1: In the synchronization zone, the speed of the master axis and the slave axis are equal, and the calculation method of synchronization magnification: among them V1(V2)=Master (slave) axis speed F1(F2)=Master (slave) axis speed (Hz) D1(D2)=Master (slave) shaft diameter R1 (R2) = master (slave) axis pulse number per revolution Calculation method two: Slave axis synchronization magnification=1mm The number of pulses required by the slave axis/ Number of pulses required by 1mm spindle |
Address 7 | ||||
Parameter 5 | Address 8 | Slave axis maximum magnification limit | Floating | Maximum magnification= Maximum speed of slave axis/maximum speed of main axis |
Address 9 | ||||
Parameter 6 | Address 10 | Acceleration curve | Integer | 0: constant acceleration curve, the speed curve is T type 1: Constant jerk curve, speed curve is S type 2: reserved 3: reserved 4: New S type rotary saw curve (the synchronization zone is in the middle),Please refer to the appendix for details. The current curve only supports CAM curve 0 |
Parameter 7 | Address 11 | CAM curve | Integer | Start, stop, and various curve selections of different synchronization zone positions: 0: LeftCAM synchronization area is located on the front curve; 1: MidCAMall; 2: MidCAMBegin initial curve; 3: MidCAMEnd end curve; 4: RightCAM sync area is located at the back curve; BIT[15]=1: continue the previous data, used for splicing curves, such as setting the subdivision of the curve, the total resolution range of all splicing curves is 31 to 1024, and the two rotary saw curves are spliced into a shearing curve |
Parameter 8 | Address 12 | Resolution | Integer | Range [31,511], of which 20 synchronization areas; When CAM curve is selected as MdiCAMall (resolution range is [54, 511]) |
Address 13 | Reserved | Retained | Reserved | |
Parameter 9 | Address 14 | Synchronization zone start position | 32-bit integer | After the curve is generated correctly, the calculated starting position of the spindle synchronization area can be used to set the lower limit of the synchronization area. |
Address 15 | ||||
Parameter 10 | Address 16 | End of synchronization zone | 32-bit integer | After the curve is correctly generated, the calculated end position of the spindle synchronization area can be used to set the lower limit of the synchronization area. |
Address 17 | ||||
Parameter 11 | Address 18 | Slave axis minimum limit operation magnification | Floating | It is valid only when parameter 6 acceleration curve is set to 4. Make sure that the actual maximum speed of the slave axis cannot be less than the speed corresponding to this value. Thereby adjusting the slope of the deceleration section. |
Address 19 |
(3) Rotary saw configuration
1) Overview
Synchronization zone: At this time, the feeding axis and the cutter axis rotate at a fixed speed ratio (the linear velocity of the cutter head is equal to the linear velocity of the cutting surface), and the cutting of the material occurs in the synchronous zone.
Adjustment area: due to different cutting lengths, corresponding displacement adjustments are required. According to the cutting length adjustment zone, it can be divided into the following three situations.
Short material cutting: the cutter shaft first has a uniform speed in the adjustment area, and then decelerates to the synchronous speed.
Normal material cutting: In this case, the cutter axis accelerates first in the adjustment zone. Then decelerate to synchronous speed.
Long material cutting: In this case, the cutter shaft first accelerates to the minimum limit operating speed in the adjustment area, and then decelerates to the synchronous speed. After the cutter shaft makes one revolution, the cutter shaft decelerates to zero and stays for a while, then speed up and cycle operation. The longer the material length, the longer the residence time.
✎Note:
When setting the maximum limit magnification, synchronization magnification, and minimum limit operation magnification, the material length boundary is also determined. Several limit values are as follows:
①The speed of the shortest material (Lm1) satisfies: the actual maximum operating magnification = the maximum limit magnification, and the adjustment area is a constant speed + deceleration process.
②The shortest normal material (Lm2): the actual maximum operating magnification = the maximum limit magnification, the adjustment area is the acceleration + deceleration process.
③The shortest length of material (Lm3): the actual maximum operating magnification = the minimum limit operating magnification, the adjustment area is acceleration + deceleration + dwell process.
Therefore, the length of the material determines the type of operation of the slave axis:
① When Lm1 ≤ L <Lm2, this is a short material, and its 0 ≤ actual maximum operating magnification ≤ maximum limit magnification
② When Lm2 ≤ L <Lm3, this is a normal material, and its minimum limit operation magnification ≤ actual maximum operation magnification ≤ maximum limit magnification
③ When L ≥ Lm3, this is a long material, and the actual maximum operating magnification = minimum limit magnification. There is a residence zone, the longer the material, the longer the residence time.
2) Example
The process result will be different according to the difference of the maximum limit magnification, synchronization magnification and minimum limit operation magnification.
① Synchronous magnification <minimum limit operation magnification <maximum limit magnification
The parameter settings are as follows:
Short material:
Normal materials:
Long material:
② Synchronous magnification = minimum limit operation magnification <maximum limit magnification
In this case, when the material is long, there is no deceleration into the synchronization zone. The parameter settings are as follows:
The situation of short material and normal material is the same as described in 2.1.
Long material: (no deceleration process in the adjustment zone)
③ Synchronous magnification = minimum limit operation magnification = maximum limit magnification
In this case, there are no normal materials, only short materials and long materials. The parameter settings are as follows:
Short material Long material
(4) Case
1) Control requirements:
①. Use rotary saw curve to automatically generate cam table.
②. For the equipment matched with the cutting axis and the feeding axis, the servo parameter is 1,000 pulse/rev.
③. Related parameters:
Cutting material length is 1000 mm, cutting shaft circumference is 60πmm, feeding shaft circumference is 100πmm, and feeding shaft speed is 1,000 Hz
2) Parameters required to establish rotary saw curve
Parameter 1: You eed to input the length of the spindle cutting material because the cutting material length is 1000mm, it is converted to pulse
1000*1000/100Pi=3183 (pulse)
Parameter 2: The circumference of the slave shaft, that is, the number of pulses required for one revolution of the slave shaft 1000 pulse
Parameter 3: The synchronization length of the slave axis is set to approximately 1/3 of the circumference of the slave axis as 1000/3=333 pulse.
Parameter 4: During synchronization, the speed ratio of master and slave
Parameter 5: The maximum magnification limit is: set to 10 times the synchronization magnification as 50/3 (floating point number).
Parameter 6: Low WORD is set to 0 - uniform acceleration
High WORD set to 0 - LEFTCAM
Parameter 7: Set the curve generation result to 0
Using curve generation instructions, ECAMTBX generates curves.
Circuit program corresponding to the case:
Spindle length
Slave length
Slave synchronization length
Slave axis synchronization magnification
Slave axis maximum magnification limit
Acceleration curve
CAM curve solution resolution
Set as rotary saw curve
Curve generation instruction
The curve corresponding to the Circuit program:
Upload via PLC, check the electronic cam table, set the table address, and upload the generated cam curve.
Flying saw application
The flying saw system means that the feeding shaft will not stop while the system is cutting, so the camshaft must keep the same speed with the feeding shaft when cutting, and the same speed time must be enough for the cutter to complete the cutting and detach to safety s position. The flying saw camshaft will drive the cutter and the entire group of cutting mechanisms to move, so that it can maintain the same speed with the main shaft during cutting.
(1) Description of flying saw action
Suppose the wiring is as shown in the figure below, where 1, 2, 3, 4 are the waiting point (starting point), synchronization point, synchronization departure point, and waiting point (starting point), and its actions will follow the movement of the spindle. At the beginning, the camshaft stops at position 1, and then accelerates forward to position 2 to achieve speed synchronization, and continues to position 3, then decelerates and returns to position 4 in the opposite direction (assuming position 1 and position 4 are the same), and then repeat this action .
Flying saw control is used in pipe cutting machines, beverage filling and other equipment that needs to move with the processed product; its action is to add axis (slave axis)-start to accelerate and follow the processed product, and after moving to the synchronization zone, it will contact the processed product Start processing at a constant speed. After leaving the synchronization zone, the speed will decrease and stop, and then return to the starting position. All the stroke feeding axes (spindles) have been feeding at a constant speed. As shown below.
The stroke of the flying saw is divided into two parts: the following part and the returning part. The two moving distances must be the same. From the speed stroke point of view, that is, positive area = negative area.
During flying saw, you need to pay attention that the feeding will not stop during processing, so the processing axis must keep the same speed with the feeding axis, and the synchronization time must be enough for the equipment to complete processing and move to a safe position.
The stroke length of the synchronization area is also the processing time, which can be considered when planning the synchronization area. In addition, the planning of the synchronization area will affect the operation of the actual equipment. If the synchronization area is large in a cutting cycle, the acceleration and deceleration time will be smaller, indicating that the equipment needs to be accelerated and decelerated in a short time. For motors, machines, and cutters The impact is very large, and it is easy to cause the servo over-current alarm, and the equipment cannot operate normally.
(2) Flying saw parameter table
Parameter setting of flying saw curve | ||||
Parameter | Offset address | Name | Format | Instruction |
Parameter 1 | Address 0 | Spindle length | 32-bit integer | The cutting length of the feeding axis moving, the unit is Pulse. |
Address 1 | ||||
Parameter 2 | Address 2 | Slave length | 32-bit integer | The circumference of the cutting axis (including the tool length), the unit is Pulse. Range [-2000000000, 2000000000] |
Address 3 | ||||
Parameter 3 | Address 4 | Slave synchronization length | 32-bit integer | The length of the slave axis synchronization zone. Synchronization area range: 0<synchronization area length<|slave axis length/2| |
Address 5 | ||||
Parameter 4 | Address 6 | Slave axis synchronization magnification | Floating | Calculation method one: In the synchronization zone, the speed of the master axis and the slave axis are equal, and the synchronization magnification calculation method: V1(V2)=Master (slave) axis speed F1(F2)=Master (slave) axis speed (Hz) D1(D2)=Master (slave) shaft diameter R1 (R2) = master (slave) axis pulse number per revolution Calculation method two: Slave axis synchronization magnification=1mm The number of pulses required by the slave axis/1mm Number of pulses required by the spindle |
Address 7 | ||||
Parameter 5 | Address 8 | Slave axis maximum magnification limit | Floating | Maximum magnification = maximum speed of slave axis/maximum speed of main axis |
Address 9 | ||||
Parameter 6 | Address 10 | Acceleration curve | Integer | 0: constant acceleration curve, the speed curve is T type 1: Constant jerk curve, the speed curve is S type |
Address 11 | CAM curve | Integer | Start, stop, and various curve selections for different synchronization zone positions: (currently only one type is supported, the default tracking RightCam, and the return LeftCam curve type. May not be set) | |
Parameter 7 | Address 12 | Resolution | Integer | Range [62,511] |
Address 13 | Reserved | Retained | Reserved | |
Parameter 8 | Address 14 | synchronization zone start position | 32-bit integer | After the curve is generated correctly, the calculated starting position of the spindle synchronization area can be used to set the lower limit of the synchronization area. |
Address 15 | ||||
Parameter 9 | Address 16 | End of synchronization zone | 32-bit integer | After the curve is correctly generated, the calculated end position of the spindle synchronization area can be used to set the lower limit of the synchronization area. |
Address 17 | ||||
Parameter 10 | Address 18 | Reserved | Reserved | Reserved |
Address 19 | ||||
Parameter 11 | Address 20 | The maximum magnification of the actual operation of slave axis | Floating | The maximum magnification of the actual operation of slave axis: It is sync magnification when it is long material, and it is between sync magnification and maximum limit magnification when it is short material. |
Address 21 |
(3) Case
1) Control parameters
①. The servo parameter is 1000 pulse/rev.
②. Related parameters
The processing length of the feeding shaft is 660 mm, and the circumference of the feeding shaft is 60πmm
The machining length of the machining shaft is 40 mm
One rotation of the machining axis is 20 mm
The feed shaft speed is 1000 Hz
2) Establish flying saw curve by rotary saw curve
The parameters needed to establish rotary saw curve
Spindle length (processing length): Assuming that the spindle servo parameter is 1000 pulse/rev and the mechanism parameter is 60π mm/rev, then 1pulse is 0.188mm. If the actual processing length is 660mm→convert to 660/0.188=3501 pulse.
Slave axis length(machining axis length):
First consider that the slave axis servo parameter is 1000 pulse/rev and the mechanism parameter is 20mm/rev, then 1pulse=0.01mm can be obtained.
The actual measured slave shaft machining length is 40 mm → converted to 2000 Pulse.
The location of the synchronization zone;
The lower limit of the synchronization zone is when the actual START0 signal is triggered, the slave axis goes from 0 to the position 200 where it catches up with the spindle speed;
The upper limit of the synchronization zone is the position 500 where the processing time ends and the processing equipment also leaves.
The speed ratio of master and slave axis in synchronization zone: the speed ratio of the master axis and slave axis in the synchronization zone.
The speed ratio of master and slave axis when returning:
After the total length of the stroke subtracts the stroke of the following movement, the return stroke length can be obtained, and then use the following stroke distance = return stroke distance to know the speed ratio when returning = 3.
3) Establish flying saw curve automatically by rotary saw curve
① Establish a positive area curve
Parameter 1: It needs to input the processing length of the spindle feeding shaft to be 660mm, which is converted to pulse 660*1000/60pi=3501 pulse; Since the chase shear needs to return to the origin after the machining is completed, the pulse of the spindle = 3501/2 =1750 pulse;
Parameter 2: Slave shaft processing length is 40mm, conversion 40*1000/20=2000 pulse;
Parameter 3: Slave axis synchronization length setting agrees that 1/3 of the slave axis circumference is 2000/3 = 667 pulse;
Parameter 4:
Parameter 5: the highest synchronization magnification 10 (floating point number);
Parameter 6: Low word setting 0: uniform acceleration;
High word setting 0: LeftCam.
② Establish a negative area curve
Parameter 1: Need to input the processing length of the spindle feeding shaft to be 660mm, which is converted to pulse 660*1000/60pi=3501 pulse; Since the chase shear needs to return to the origin after the machining is completed, the pulse of the spindle =3501/2 =1750 pulse;
Parameter 2: Reverse running size is -2000;
Parameter 3: Same;
Parameter 4: Same;
Parameter 5: Same;
Parameter 6: Low word setting 0: uniform acceleration;
High word setting H8000: LeftCam continues the existing table data.
4) Generate tables with the function of flying saw
Parameter 1: Need to input the processing length of the spindle feeding shaft to be 660mm, which is converted to pulse 660*1000/60pi=3501 pulse;
Parameter 2: Slave shaft processing length is 40mm, conversion 40*1000/20=2000 pulse;
Parameter 3: Slave axis synchronization length setting agrees that 1/3 of the slave axis circumference is 2000/3=667 pulse;
Parameter 4:
Parameter 5: the highest synchronization magnification 10 (floating point number)
Parameter 6: Low word setting 1: Uniform acceleration;
High word setting 0: invalid.
Use ECAMTBX to generate curves:
Spindle length
Slave length
Slave synchronization length
Slave axis synchronization magnification
Slave axis maximum magnification limit
Acceleration curve
CAM curve solution resolution
Set as rotary saw curve
Curve generation instruction
Obtain the curve according to the ladder program:
S type acceleration and deceleration curve establishment
(1) S type acceleration and deceleration curve table parameters
S type acceleration and deceleration curve parameter setting | ||||||
Parameter | Offset address | Name | Format | Instruction | Unit | Range |
Parameter 1 | Address 0 | Total number of pulses (length) | 32-bit integer | Total number of output pulses | Pulse | 1 to 2147483647 |
Address 1 | ||||||
Parameter 2 | Address 2 | Set the maximum speed of pulse | 32-bit integer | Set the highest frequency of pulses | Hz | 1 to 200000 |
Address 3 | ||||||
Parameter 3 | Address 4 | Reserved | Retained | Reserved | ||
Address 5 | ||||||
Parameter 4 | Address 6 | Accelerated Time | 16-bit integer | Pulse acceleration time | ms | 2 to 32767 |
Parameter 5 | Address 7 | deceleration time | 16-bit integer | Pulse deceleration time | ms | 2 to 32767 |
Parameter 6 | Address 8 | Resolution | 16-bit integer | Pulse resolution | Length | 50 to 511 |
Parameter 7 | Address 9 | Reserved | Retained | Reserved | ||
Parameter 8 | Address 10 | Number of spindle pulses in the last segment | 32-bit integer | Number of spindle pulses in the last segment (high and low) | Pulse | Internally generated |
Address 11 | ||||||
Parameter 9 | Address 12 | Number of slave axis pulses in the last segment | 32-bit integer | Number of pulses from the last segment of the slave axis (high and low bits) | Pulse | |
Address 13 | ||||||
Parameter 10 | Address 14 | Uniform time | 32-bit integer | The length of the pulse at a constant speed | Pulse | |
Address 15 | ||||||
Parameter 11 | Address 16 | Maximum speed | 32-bit integer | Maximum speed of curve results during operation | Hz | |
Address 17 | ||||||
Parameter 12 | Address 18 | Reserved | ||||
Parameter 13 | Address 19 | Curve generation result |
✎Note:
Generate S type acceleration and deceleration curve (table) with the given acceleration time, deceleration time, and the highest speed. When calculating, the spindle uses the pulse input frequency of 1K (1ms) as the calculation basis.
(2) Case
1) Related control parameters
Calculation case:
Total number of pulses (length): 10000 pulses
Acceleration time: 100ms
Deceleration time: 100ms Resolution: 200
2) 2. Curve parameters:
Parameter 1: The total number of output pulses 10000
Parameter 2: Maximum speed 50000
Parameter 6: acceleration time 100
Parameter 7: acceleration time 100
Parameter 8: Resolution 200
Pulse maximum speed
Total pulse number
Acceleration time
Deceleration time
Resolution
Set S type acceleration and deceleration curve
Curve generation instruction
C.Customize specified key points to generate a table
(1) Specified key points generate table parameters
Specified key points generate table parameters | |||||
Address | Name | Length | Instruction | Range | |
S0 | Curve result | Single word | >0: The curve is generated successfully <0: Failed to generate curve | ||
S0+1 | Error parameter position | Single word | |||
S0+2 | Total resolution | Single word | 10 to 511 | ||
S0+3 | Number of key points (n) | Single word | 1 to 10 | ||
S0+4 | The initial position of slave axis | Double word | Set the initial offset position of slave axis | Reserved | |
S0+5 | |||||
S0+6 | Spindle segment 0 | Single word | The master/slave axis segment 0 is always 0 | Reserved | |
S0+7 | Slave axis segment 0 | Single word | |||
Key point 1 | S0+8 | Spindle segment 1 | Double word | Number of pulses of spindle segment 1 | 32-bit integer |
S0+9 | |||||
S0+10 | Slave axis segment 1 | Double word | Number of pulses of slave axis segment 1 | 32-bit integer | |
S0+11 | |||||
S0+12 | Curve type of segment 1 | Single word | *1 | ||
S0+13 | Resolution of segment 1 | Single word | *2 | ||
Key point 2 | S0+14 | Spindle segment 2 | Double word | Number of pulses of spindle segment 2 | 32-bit integer |
S0+15 | |||||
S0+16 | Slave axis segment 2 | Double word | Number of pulses of slave axis segment 2 | 32-bit integer | |
S0+17 | |||||
S0+18 | Curve type of segment 2 | Single word | *1 | ||
S0+19 | Resolution of segment 2 | Single word | *2 | ||
...... | ...... | ..... | ...... | ...... | |
Key point N | S0+n*6+2 | Spindle segment N | Double word | Number of pulses of spindle segment N | 32-bit integer |
S0+n*6+3 | |||||
S0+n*6+4 | Slave axis segment N | Double word | Number of pulses of slave axis segment N | 32-bit integer | |
S0+n*6+5 | |||||
S0+n*6+6 | Curve type of segment N | Single word | *1 | ||
S0+n*6+7 | Resolution of segment N | Single word | *2 |
Curve type: Different values represent different curve types.
0 = uniform acceleration, 1 = S acceleration and deceleration (uniform acceleration), 2 = cycloid, 3 = uniform speed.
The resolution range is 0-511, the total resolution of all segments does not exceed the total resolution set by [S0]. if the resolution of all segments is set to 0, the total resolution set by [S0] split equally. When the curve type is cycloid, the corresponding resolution range is 3-511.W
Refer to the setting method of PLC Editor to generate a table based on the given key points and the given function relationship. The parameter setting is the same as the setting method of the upper computer. The editing interface of the upper computer is shown below. When the table is generated in K2 mode, The generated result is similar to the table result set by the relevant parameters of the upper computer. This mode expands the function of the table generated by the lower computer through the key points. In the key point curve, the spindle must have an increasing relationship, that is, the spindle pulse number of the next point must be greater than the spindle pulse number of the previous point, otherwise an error will be reported.
(2) Case
1) Specified key points parameters
When the spindle has 0-600 pulses, the slave axis stops at position 0;
When the spindle has 600-1500 pulses, the slave axis moves to the position 2000;
When the spindle is 1500-1700 pulses, the slave axis stops at position 2000;
When the spindle has 1700-1900 pulses, the slave axis will return to position 600;
When the spindle has 1900-2000 pulses, the slave axis returns to position 0.
2) Specified key points for tabulation
Use PLC Editor software to create ECAM table, and set the parameter value of each key point in the table.
Then set the starting address of the parameter, check the ECam0 form in [Electronic Cam] when downloading, the system will automatically fill in the data of the above form into the corresponding parameter address.
3) Specified key point parameters table
Address | Instruction | Set value | Address | Instruction | Set value |
S0 | Curve generation result | S0+19 | Resolution of segment 2 | 0 | |
S0+1 | Error parameter location | S0+20 | Spindle position of segment 3 | 1700 | |
S0+2 | Total resolution | 100 | S0+21 | ||
S0+3 | Number of key point | 1-10 | S0+22 | Slave axis position of segment 3 | 2000 |
S0+4 | Initial position of slave axis | —— | S0+23 | ||
S0+5 | S0+24 | Curve type of segment 3 | 0 | ||
S0+6 | Spindle position of segment 0 | Reserved | S0+25 | Resolution of segment 3 | 0 |
S0+7 | Slave axis position of segment 0 | Reserved | S0+26 | Spindle position of segment 4 | 1900 |
S0+8 | Spindle position of segment 1 | 600 | S0+27 | ||
S0+9 | S0+28 | Slave axis position of segment 4 | 600 | ||
S0+10 | Slave axis position of segment 1 | 0 | S0+29 | ||
S0+11 | S0+30 | Curve type of segment 4 | 0 | ||
S0+12 | Curve type of segment 1 | 0 | S0+31 | Resolution of segment 4 | 0 |
S0+13 | Resolution of segment 1 | 0 | S0+32 | Spindle position of segment 5 | 2000 |
S0+14 | Spindle position of segment 2 | 1500 | S0+33 | ||
S0+15 | S0+34 | Slave axis position of segment 5 | 0 | ||
S0+16 | Slave axis position of segment 2 | 1200 | S0+35 | ||
S0+17 | S0+36 | Curve type of segment 5 | 0 | ||
S0+18 | Curve type of segment 2 | 0 | S0+37 | Resolution of segment 5 | 0 |
4) The table generated by specified key points is shown as below.
5) If you do not need to fill in the data in the form, you can use the Circuit program to replace the form data:
Special address
Devices | Content |
SD881 (high byte), SD880 (low byte) | Y000 Output pulse number. Decrease when reversed. (Use 32 bits) |
SD941 (high byte), SD940 (low byte) | Y001 Output pulse number. Decrease when reversed. (Use 32 bits) |
SD1001 (high byte), SD1000 (low byte) | Y002 Output pulse number. Decrease when reversed. (Use 32 bits) |
SD1061 (high byte), SD1060 (low byte) | Y003 output pulse number. Decrease when reversed. (Use 32 bits) |
SD1121 (high byte), SD1120 (low byte) | Y004 Output pulse number. Decrease when reversed. (Use 32 bits) |
SD1181 (high byte), SD1180 (low byte) | Y005 Output pulse number. Decrease when reversed. (Use 32 bits) |
SD1241 (high byte), SD1240 (low byte) | Y006 Number of output pulses. Decrease when reversed. (Use 32 bits) |
SD1301 (high byte), SD1300 (low byte) | Y007 Output pulse number. Decrease when reversed. (Use 32 bits) |
Devices | Content | Devices | Content |
SM882 | Y000 Pulse output stop (stop immediately) | SM880 | Y000 monitoring during pulse output (BUSY/READY) |
SM942 | Y001 Pulse output stop (stop immediately) | SM940 | Y001 Monitoring during pulse output (BUSY/READY) |
SM1002 | Y002 Pulse output stop (stop immediately) | SM1000 | Y002 Monitoring during pulse output (BUSY/READY) |
SM1062 | Y003 Pulse output stop (stop immediately) | SM1060 | Y003 Monitoring during pulse output (BUSY/READY) |
SM1122 | Y004 Pulse output stop (stop immediately) | SM1120 | Y004 Monitoring during pulse output (BUSY/READY) |
SM1182 | Y005 Pulse output stop (stop immediately) | SM1180 | Y005 Monitoring during pulse output (BUSY/READY) |
SM1242 | Y006 Pulse output stop (stop immediately) | SM1240 | Y006 Monitoring during pulse output (BUSY/READY) |
SM1302 | Y007 Pulse output stop (stop immediately) | SM1300 | Y007 Monitoring during pulse output (BUSY/READY) |
Appendix
Rotary saw parameter table
Rotary saw curve parameter setting | ||||
Parameter | Offset address | Name | Format | Instruction |
Parameter 1 | Address 0 | Spindle length | 32-bit integer | The moving cut length of the feeding axis moving. Unit: pulse. |
Address 1 | ||||
Parameter 2 | Address 2 | Slave length | 32-bit integer | The circumference of the cutting axis (including the tool length). Unit: pulse. Range [-2,000,000,000, 2,000,000,000] |
Address 3 | ||||
Parameter 3 | Address 4 | Slave sync length | 32-bit integer | The length of the slave axis synchronization zone is smaller than the slave axis length, generally set to 1/3 of the slave axis length. (When the new S type rotary saw is selected, the value satisfies 40 *sync ratio<=sync length< slave axis length-2. ). Sync area range: 0<sync area length<|slave axis length| |
Address 5 | ||||
Parameter 4 | Address 6 | Slave axis sync magnification | Floating | Calculation method one: In the synchronization zone, the speed of the master axis and the slave axis are equal, and the sync magnification calculation method: V1(V2)=Master (slave) axis speed F1(F2)=Master (slave) axis speed (Hz) D1(D2)=Master (slave) axis diameter R1 (R2) = master (slave) axis pulse number per revolution Calculation method two: Slave axis sync magnification=the number of pulses required by 1mm slave axis/the number of pulses required by 1mm spindle |
Address 7 | ||||
Parameter 5 | Address 8 | Slave axis maximum magnification limit | Floating | Maximum magnification = maximum speed of slave axis/maximum speed of spindle |
Address 9 | ||||
Parameter 6 | Address 10 | Acceleration curve | Integer | 0: Constant acceleration curve, the speed curve is T type 1: Constant jerk curve, the speed curve is S type 2: reserved 3: reserved 4: New S rotary saw curve (synchronization zone is in the middle), see appendix for details. Current curve only supports CAM curve as 0. |
Parameter 7 | Address 11 | CAM curve | Integer | Start, stop, and various curve selections of different synchronization zone positions: 0: LeftCAM synchronization area is on the front curve; 1: MidCAMall; 2: MidCAMBegin start curve; 3: MidCAMEnd end curve; 4: RightCAM synchronization area is on the back curve; BIT[15]=1: Continuing the previous data, used for splicing curves, such as setting the subdivision of the curve, the total resolution range of all splicing curves is 31 to 1024, and the two rotary saw curves are spliced into a shearing curve |
Parameter 8 | Address 12 | Resolution | Integer | Range [31,511], of which 20 synchronization areas; When CAM curve is selected as MdiCAMall (resolution range is [54, 511]) |
Address 13 | Reserved | Retained | Reserved | |
Parameter 9 | Address 14 | Synchronization zone start position | 32-bit integer | After the curve is generated correctly, the calculated start position of the spindle synchronization area could be used to set the lower limit of the synchronization area. |
Address 15 | ||||
Parameter 10 | Address 16 | End of synchronization zone | 32-bit integer | After the curve is correctly generated, the calculated end position of the spindle synchronization area could be used to set the lower limit of the synchronization area. |
Address 17 | ||||
Parameter 11 | Address 18 | Slave axis minimum limit operation magnification | Floating | It is valid only when parameter 6 acceleration curve is set to 4. Make sure that the actual maximum speed of the slave axis cannot be less than this value magnification corresponds to the speed so as to adjust the slope of the deceleration section. |
Address 19 | ||||
Parameter 11 | Address 20 | The maximum magnification of the actual operation of slave axis | Floating | The maximum magnification of the actual operation of slave axis: It is sync magnification when it is long material, and it is between sync magnification and maximum limit magnification when it is short material. |
Address 21 |
9.2.5.2 Flying saw parameter table
Parameter setting of flying saw curve | |||||
Parameter | Offset address | Name | Format | Instruction | |
Parameter 1 | Address 0 | Spindle length | 32-bit integer | The cutting length of the feeding axis moving. Unit: Pulse. | |
Address 1 | |||||
Parameter 2 | Address 2 | Slave length | 32-bit integer | The circumference of the cutting axis (including the tool length). Unit: Pulse. Range [-2,000,000,000, 2,000,000,000] | |
Address 3 | |||||
Parameter 3 | Address 4 | Slave synchronization length | 32-bit integer | The length of the slave axis synchronization zone. Synchronization area range: 0<synchronization area length<|slave axis length/2| | |
Address 5 | |||||
Parameter 4 | Address 6 | Slave axis synchronization magnification | Floating | Calculation method one: In the synchronization zone, the speed of master axis and the slave axis are equal, and the synchronization magnification calculation method is as below. among them V1(V2)=Master (slave) axis speed F1(F2)=Master (slave) axis speed (Hz) D1(D2)=Master (slave) axis diameter R1 (R2) = master (slave) axis pulse number per revolution Calculation method two: Slave axis synchronization magnification=1mm The number of pulses required by the slave axis/1mm The number of pulses required by the spindle | |
Address 7 | |||||
Parameter 5 | Address 8 | Slave axis maximum magnification limit | Floating | Maximum magnification = maximum speed of slave axis/maximum speed of main axis | |
Address 9 | |||||
Parameter 6 | Address 10 | Acceleration curve | Integer | 0: constant acceleration curve, the speed curve is T type 1: Constant jerk curve, the speed curve is S type | |
Address 11 | CAM curve | Integer | Start, stop, and various curve selections for different synchronization zone positions: (currently only one type is supported, the tracking RightCam and the return LeftCam curve type are defaulted and can not be set) | ||
Parameter 7 | Address 12 | Resolution | Integer | Range [62,511] | |
Address 13 | Reserved | Reserved | Reserved | ||
Parameter 8 | Address 14 | Synchronization zone start position | 32-bit integer | After the curve is generated correctly, the calculated starting position of the spindle synchronization area can be used to set the lower limit of the synchronization area. | |
Address 15 | |||||
Parameter 9 | Address 16 | End of synchronization zone | 32-bit integer | After the curve is correctly generated, the calculated end position of the spindle synchronization area can be used to set the lower limit of the synchronization area. | |
Address 17 | |||||
Parameter 11 | Address 20 | The maximum magnification of the actual operation of slave axis | Floating | The maximum magnification of the actual operation of slave axis: It is sync magnification when it is long material, and it is between sync magnification and maximum limit magnification when it is short material. | |
Address 21 |
S type acceleration and deceleration curve parameter table
S type acceleration and deceleration curve parameter setting | ||||||
Parameter | Offset address | Name | Format | Instruction | Unit | Range |
Parameter 1 | Address 0 | Total number of pulses (length) | 32-bit integer | Total number of output pulses | Pulse | 1 to 2147483647 |
Address 1 | ||||||
Parameter 2 | Address 2 | Set the maximum speed of pulse | 32-bit integer | Set the highest frequency of pulses | Hz | 1 to 200000 |
Address 3 | ||||||
Parameter 3 | Address 4 | Reserved | Retained | Reserved | 2 to 32767 | |
Address 5 | ||||||
Parameter 4 | Address 6 | Accelerated time | 16-bit integer | Pulse acceleration time | ms | 2 to 32767 |
Parameter 5 | Address 7 | Deceleration time | 16-bit integer | Pulse deceleration time | ms | 50 to 511 |
Parameter 6 | Address 8 | Resolution | 16-bit integer | Pulse resolution | Length | 51 to 512 |
Parameter 7 | Address 9 | Reserved | Reserved | Reserved | ||
Parameter 8 | Address 10 | Number of pulses of spindle in the last segment | 32-bit integer | Number of pulses of spindle in the last segment (high and low) | Pulse | Internally generated |
Address 11 | ||||||
Parameter 9 | Address 12 | Number of pulses of slave axis in the last segment | 32-bit integer | Number of pulses of slave axis in the last segment(high and low) | Pulse | |
Address 13 | ||||||
Parameter 10 | Address 14 | Uniform time | 32-bit integer | The time span when outputting pulses at a constant speed | Pulse | |
Address 15 | ||||||
Parameter 11 | Address 16 | Maximum speed | 32-bit integer | The maximum speed of curve during operation | Hz | |
Address 17 | ||||||
Parameter 12 | Address 18 | Reserved | ||||
Parameter 13 | Address 19 | Curve generation result |
4 Specified key points generate a table
Specified key points generate table parameters | |||||
Address | Name | Length | Instruction | Range | |
S0 | Curve generation result | Single word | >0: The curve is generated successfully <0: Failed to generate the curve | ||
S0+1 | Error parameter location | Single word | |||
S0+2 | Total resolution | Single word | 10 to 511 | ||
S0+3 | Number of key points (n) | Single word | 1 to 10 | ||
S0+4 | Start position of slave axis | Double word | Set the start offset position of slave axis | Reserved | |
S0+5 | |||||
S0+6 | Spindle segment 0 | Single word | The master/slave axis of segment 0 is always 0 | Reserved | |
S0+7 | Slave axis segment 0 | Single word | |||
Key point 1 | S0+8 | Spindle segment 1 | Double word | The number of pulse of spindle segment 1 | 32-bit integer |
S0+9 | |||||
S0+10 | Slave axis segment 1 | Double word | The number of pulse of slave axis segment 1 | 32-bit integer | |
S0+11 | |||||
S0+12 | Curve type of segment 1 | Single word | *1 | ||
S0+13 | Resolution of segment 1 | Single word | *2 | ||
Key Point 2 | S0+14 | Spindle segment 2 | Double word | The number of pulse of spindle segment 2 | 32-bit integer |
S0+15 | |||||
S0+16 | Slave axis segment 2 | Double word | The number of pulse of slave axis segment 2 | 32-bit integer | |
S0+17 | |||||
S0+18 | Curve type of segment 2 | Single word | *1 | ||
S0+19 | Resolution of segment 2 | Single word | *2 | ||
...... | ...... | .... | ...... | ...... | |
Key point N | S0+n*6+2 | Spindle segment N | Double word | The number of pulse of spindle segment N | 32-bit integer |
S0+n*6+3 | |||||
S0+n*6+4 | Slave axis segment N | Double word | The number of pulse of slave axis segment N | 32-bit integer | |
S0+n*6+5 | |||||
S0+n*6+6 | Curve type of segment N | Single word | *1 | ||
S0+n*6+7 | Resolution of segment N | Single word | *2 |