Changes for page 09 Electronic cam

Last modified by Devin Chen on 2025/01/09 11:57

From version 7.2
edited by Stone Wu
on 2022/09/26 14:26
Change comment: There is no comment for this version
To version 10.1
edited by Devin Chen
on 2024/02/01 11:10
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Stone
1 +XWiki.DevinChen
Content
... ... @@ -1,10 +1,10 @@
1 1  = **Electronic CAM (ECAM) instruction** =
2 2  
3 -== {{id name="_Toc15695"/}}**{{id name="_Toc25745"/}}{{id name="_Toc16425"/}}DEGEAR/Electronic gear/32 bit hand wheel instruction** ==
3 +== **DEGEAR/Electronic gear/32 bit hand wheel instruction** ==
4 4  
5 5  **DEGEAR**
6 6  
7 -Electronic gear function refers to the function of multiplying the speed of the driving shaft by the set gear ratio and outputting to the driven shaft at this speed to control the mechanical operation.
7 +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.
8 8  
9 9  -[DEGEAR (s1) (s2) (s3) (d1) (d2)]
10 10  
... ... @@ -14,27 +14,27 @@
14 14  **Content, range and data type**
15 15  
16 16  (% class="table-bordered" %)
17 -|**Parameter**|(% style="width:478px" %)**Content**|(% style="width:218px" %)**Range**|(% style="width:185px" %)**Data type**|(% style="width:108px" %)**Data type (label)**
18 -|(s1)|(% style="width:478px" %)Specify the high-speed counter or ordinary double-word counter that receives the master axis pulse|(% style="width:218px" %)-2147483648 to 2147483647|(% style="width:185px" %)Signed BIN 32 bit|(% style="width:108px" %)ANY32
19 -|(s2)|(% style="width:478px" %)Specify the data buffer of the electronic gear command|(% style="width:218px" %) |(% style="width:185px" %)Form type|(% style="width:108px" %)LIST
20 -|(s3)|(% style="width:478px" %)Response time, that is, how often the gear calculation is performed|(% style="width:218px" %)0~~500|(% style="width:185px" %)Signed BIN 32 bit|(% style="width:108px" %)ANY32
21 -|(d)|(% style="width:478px" %)Specify pulse output axis|(% style="width:218px" %)Y0~~Y7|(% style="width:185px" %)Bit|(% style="width:108px" %)ANY_BOOL
22 -|(d)|(% style="width:478px" %)Specify direction output shaft|(% style="width:218px" %)Y/M/S/D.b|(% style="width:185px" %)Bit|(% style="width:108px" %)ANY_BOOL
17 +|=(% scope="row" %)**Parameter**|=(% style="width: 478px;" %)**Content**|=(% style="width: 218px;" %)**Range**|=(% style="width: 185px;" %)**Data type**|=(% style="width: 108px;" %)**Data type (label)**
18 +|=(s1)|(% style="width:478px" %)Specify the high-speed counter or ordinary double-word counter that receives the master axis pulse|(% style="width:218px" %)-2147483648 to 2147483647|(% style="width:185px" %)Signed BIN 32 bit|(% style="width:108px" %)ANY32
19 +|=(s2)|(% style="width:478px" %)Specify the data buffer of the electronic gear command|(% style="width:218px" %) |(% style="width:185px" %)Form type|(% style="width:108px" %)LIST
20 +|=(s3)|(% style="width:478px" %)Response time, that is, how often the gear calculation is performed|(% style="width:218px" %)0~~500|(% style="width:185px" %)Signed BIN 32 bit|(% style="width:108px" %)ANY32
21 +|=(d)|(% style="width:478px" %)Specify pulse output axis|(% style="width:218px" %)Y0~~Y7|(% style="width:185px" %)Bit|(% style="width:108px" %)ANY_BOOL
22 +|=(d)|(% style="width:478px" %)Specify direction output axis|(% style="width:218px" %)Y/M/S/D.b|(% style="width:185px" %)Bit|(% style="width:108px" %)ANY_BOOL
23 23  
24 24  **Device used**
25 25  
26 26  (% class="table-bordered" %)
27 -|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameters**|(% colspan="10" %)**Device**|(((
27 +|=(% rowspan="2" %)**Instruction**|=(% rowspan="2" %)**Parameters**|=(% colspan="10" %)**Device**|=(((
28 28  **Offset**
29 29  
30 30  **modification**
31 -)))|(((
31 +)))|=(((
32 32  **Pulse**
33 33  
34 34  **extension**
35 35  )))
36 -|**Y**|**M**|**S**|**D.b**|**D**|**R**|**LC**|**HSC**|**K**|**H**|**[D]**|**XXP**
37 -|(% rowspan="5" %)DECAM|Parameter 1| | | | | | |●|●| | | |
36 +|=**Y**|=**M**|=**S**|=**D.b**|=**D**|=**R**|=**LC**|=**HSC**|=**K**|=**H**|=**[D]**|=**XXP**
37 +|=(% rowspan="5" %)DEGEAR|Parameter 1| | | | | | |●|●| | | |
38 38  |Parameter 2| | | | |●|●| | | | | |
39 39  |Parameter 3| | | | |●|●| | |●|●| |
40 40  |Parameter 4|●| | | | | | | | | | |
... ... @@ -42,7 +42,7 @@
42 42  
43 43  **Features**
44 44  
45 -•When the instruction is turned on, the PLC obtains the number of pulses of the master axis (s1) according to the set response time (s2), 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 shaft is greater than the set maximum frequency, it will output according to the set maximum frequency.
45 +•When the instruction is turned on, the PLC obtains the number of pulses of the master axis (s1) according to the set response time (s2), 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.
46 46  
47 47  •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.
48 48  
... ... @@ -51,47 +51,50 @@
51 51  • Electronic gear data buffer (s2) table:
52 52  
53 53  (% class="table-bordered" %)
54 -|(% colspan="5" %)**Electronic gear instruction parameter description table**
55 -|**Offset**|(% style="width:348px" %)**Content**|(% style="width:401px" %)**Instruction**|(% style="width:141px" %)**Range**|(% style="width:127px" %)**Read and write permission**
56 -|0|(% style="width:348px" %)Electronic gear ratio (numerator)|(% rowspan="2" style="width:401px" %)(((
57 -Number of outputs =
58 -
59 -Number of inputs in response time*numerator/denominator
54 +|=(% colspan="5" scope="row" %)**Electronic gear instruction parameter description table**
55 +|=**Offset**|=(% style="width: 348px;" %)**Content**|=(% style="width: 401px;" %)**Instruction**|=(% style="width: 141px;" %)**Range**|=(% style="width: 127px;" %)**Read and write permission**
56 +|=0|(% style="width:348px" %)Electronic gear ratio (numerator)|(% rowspan="2" style="width:401px" %)(((
57 +Number of outputs = Number of inputs in response time*numerator/denominator
60 60  )))|(% style="width:141px" %)0 to 32767|(% rowspan="2" style="width:127px" %)Read/write
61 -|1|(% style="width:348px" %)Electronic gear ratio (denominator)|(% style="width:141px" %)1 to 32767
62 -|2|(% style="width:348px" %)Maximum output frequency (low word)|(% style="width:401px" %)Max frequency|(% rowspan="2" style="width:141px" %)1 to 200000|(% style="width:127px" %)Read/write
63 -|3|(% style="width:348px" %)Maximum output frequency (high word)|(% style="width:401px" %)Max frequency|(% style="width:127px" %)Read/write
64 -|4|(% style="width:348px" %)Average spindle frequency (low word)|(% style="width:401px" %)Hand crank input frequency|(% rowspan="2" style="width:141px" %)-|(% style="width:127px" %)Read-only
65 -|5|(% style="width:348px" %)Average spindle frequency (high word)|(% style="width:401px" %)Hand crank input frequency|(% style="width:127px" %)Read-only
66 -|6|(% style="width:348px" %)Accumulative electronic gear input pulse number (low word)|(% rowspan="2" style="width:401px" %)Cumulative number of electronic gear input pulses|(% rowspan="2" style="width:141px" %)-|(% rowspan="2" style="width:127px" %)Read-only
67 -|7|(% style="width:348px" %)Cumulative number of electronic gear input pulses(High word)
68 -|8|(% style="width:348px" %)Sign|(% style="width:401px" %)After the electronic gear is initialized, the flag is equal to 1|(% style="width:141px" %)Reserved|(% style="width:127px" %)Reserved
69 -|9|(% style="width:348px" %)interval|(% style="width:401px" %)Confirmation value|(% style="width:141px" %)-|(% style="width:127px" %)Read-only
70 -|10|(% style="width:348px" %)Electronic gear ratio (numerator)|(% style="width:401px" %)Confirmation value|(% style="width:141px" %)-|(% style="width:127px" %)Read-only
71 -|11|(% style="width:348px" %)Electronic gear ratio (denominator)|(% style="width:401px" %)Confirmation value|(% style="width:141px" %)-|(% style="width:127px" %)Read-only
72 -|12|(% style="width:348px" %)Maximum output frequency (low word)|(% rowspan="2" style="width:401px" %)Confirmation value|(% rowspan="2" style="width:141px" %)1 to 200000|(% style="width:127px" %)Read-only
73 -|13|(% style="width:348px" %)Maximum output frequency (high word)|(% style="width:127px" %)Read-only
74 -|14|(% style="width:348px" %)Dynamically switch gear ratio|(% style="width:401px" %)(((
59 +|=1|(% style="width:348px" %)Electronic gear ratio (denominator)|(% style="width:141px" %)1 to 32767
60 +|=2|(% style="width:348px" %)Maximum output frequency (low word)|(% style="width:401px" %)Max frequency|(% rowspan="2" style="width:141px" %)1 to 200000|(% style="width:127px" %)Read/write
61 +|=3|(% style="width:348px" %)Maximum output frequency (high word)|(% style="width:401px" %)Max frequency|(% style="width:127px" %)Read/write
62 +|=4|(% style="width:348px" %)Average spindle frequency (low word)|(% style="width:401px" %)Hand crank input frequency|(% rowspan="2" style="width:141px" %)-|(% style="width:127px" %)Read-only
63 +|=5|(% style="width:348px" %)Average spindle frequency (high word)|(% style="width:401px" %)Hand crank input frequency|(% style="width:127px" %)Read-only
64 +|=6|(% style="width:348px" %)Accumulative electronic gear input pulse number (low word)|(% rowspan="2" style="width:401px" %)Cumulative number of electronic gear input pulses|(% rowspan="2" style="width:141px" %)-|(% rowspan="2" style="width:127px" %)Read-only
65 +|=7|(% style="width:348px" %)Cumulative number of electronic gear input pulses(High word)
66 +|=8|(% style="width:348px" %)Sign|(% style="width:401px" %)After the electronic gear is initialized, the flag is equal to 1|(% style="width:141px" %)Reserved|(% style="width:127px" %)Reserved
67 +|=9|(% style="width:348px" %)interval|(% style="width:401px" %)Confirmation value|(% style="width:141px" %)-|(% style="width:127px" %)Read-only
68 +|=10|(% style="width:348px" %)Electronic gear ratio (numerator)|(% style="width:401px" %)Confirmation value|(% style="width:141px" %)-|(% style="width:127px" %)Read-only
69 +|=11|(% style="width:348px" %)Electronic gear ratio (denominator)|(% style="width:401px" %)Confirmation value|(% style="width:141px" %)-|(% style="width:127px" %)Read-only
70 +|=12|(% style="width:348px" %)Maximum output frequency (low word)|(% rowspan="2" style="width:401px" %)Confirmation value|(% rowspan="2" style="width:141px" %)1 to 200000|(% style="width:127px" %)Read-only
71 +|=13|(% style="width:348px" %)Maximum output frequency (high word)|(% style="width:127px" %)Read-only
72 +|=14|(% style="width:348px" %)Dynamically switch gear ratio|(% style="width:401px" %)(((
75 75  * 1: Switch to the newly set gear ratio immediately. And set the address back to 0.
76 76  * 2: The cycle is completed and the gear ratio is switched, and the value is set back to 0 after the switching is completed. (The value of the spindle count reaching the denominator is regarded as a cycle)
77 77  )))|(% style="width:141px" %)0 to 2|(% style="width:127px" %)Read/write
78 -|15|(% style="width:348px" %)16-bit gear ratio and 32-bit gear ratio switch|(% style="width:401px" %)(((
76 +|=15|(% style="width:348px" %)16-bit gear ratio and 32-bit gear ratio switch|(% style="width:401px" %)(((
79 79  * 0: Use 16-bit gear ratio
80 80  * 1: Use 32-bit gear ratio
81 81  
82 -✎**Note:     **After changing this bit, it will only take effect after the DEGEAR command is re-enabled or the dynamic gear ratio function is used.
80 +(% class="box infomessage" %)
81 +(((
82 +✎**Note: **After changing this bit, it will only take effect after the DEGEAR command is re-enabled or the dynamic gear ratio function is used.
83 +)))
83 83  )))|(% style="width:141px" %)0 to 1|(% style="width:127px" %)Read/write
84 -|16|(% style="width:348px" %)32-bit electronic gear ratio numerator (low word)|(% rowspan="4" style="width:401px" %)(((
85 +|=16|(% style="width:348px" %)32-bit electronic gear ratio numerator (low word)|(% rowspan="4" style="width:401px" %)(((
85 85  Number of outputs = Spindle input number within response time*numerator/denominator
86 86  )))|(% rowspan="2" style="width:141px" %)0 to 214748647|(% rowspan="2" style="width:127px" %)Read/write
87 -|17|(% style="width:348px" %)32-bit electronic gear ratio numerator (high word)
88 -|18|(% style="width:348px" %)32-bit electronic gear ratio denominator (low word)|(% rowspan="2" style="width:141px" %)1 to 214748647|(% rowspan="2" style="width:127px" %)Read/write
89 -|19|(% style="width:348px" %)32-bit electronic gear ratio denominator (high word)
90 -|20|(% style="width:348px" %)32-bit electronic gear ratio numerator (low word)|(% rowspan="4" style="width:401px" %)Confirmation value|(% rowspan="2" style="width:141px" %)-|(% rowspan="2" style="width:127px" %)Read-only
91 -|21|(% style="width:348px" %)32-bit electronic gear ratio numerator (high word)
92 -|22|(% style="width:348px" %)32-bit electronic gear ratio denominator (low word)|(% rowspan="2" style="width:141px" %)-|(% rowspan="2" style="width:127px" %)Read-only
93 -|23|(% style="width:348px" %)32-bit electronic gear ratio denominator (high word)
88 +|=17|(% style="width:348px" %)32-bit electronic gear ratio numerator (high word)
89 +|=18|(% style="width:348px" %)32-bit electronic gear ratio denominator (low word)|(% rowspan="2" style="width:141px" %)1 to 214748647|(% rowspan="2" style="width:127px" %)Read/write
90 +|=19|(% style="width:348px" %)32-bit electronic gear ratio denominator (high word)
91 +|=20|(% style="width:348px" %)32-bit electronic gear ratio numerator (low word)|(% rowspan="4" style="width:401px" %)Confirmation value|(% rowspan="2" style="width:141px" %)-|(% rowspan="2" style="width:127px" %)Read-only
92 +|=21|(% style="width:348px" %)32-bit electronic gear ratio numerator (high word)
93 +|=22|(% style="width:348px" %)32-bit electronic gear ratio denominator (low word)|(% rowspan="2" style="width:141px" %)-|(% rowspan="2" style="width:127px" %)Read-only
94 +|=23|(% style="width:348px" %)32-bit electronic gear ratio denominator (high word)
94 94  
96 +(% class="box infomessage" %)
97 +(((
95 95  **✎Note:**
96 96  
97 97  • 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.
... ... @@ -101,26 +101,27 @@
101 101  • The electronic gear commands can only be enabled at most 8 (Y0 ~~ Y7) at the same time.
102 102  
103 103  • 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.
107 +)))
104 104  
105 105  **Error code**
106 106  
107 107  (% class="table-bordered" %)
108 -|**Error code**|**Content**
109 -|4085H|The read address of (s1), (s2) and (s3) exceeds the device range
110 -|4084H|The data exceeds the settable range
111 -|4EC0H|Electronic gear ratio setting error
112 -|4088H|High-speed pulse instructions use the same output shaft (d1)
112 +|=(% scope="row" %)**Error code**|=**Content**
113 +|=4085H|The read address of (s1), (s2) and (s3) exceeds the device range
114 +|=4084H|The data exceeds the settable range
115 +|=4EC0H|Electronic gear ratio setting error
116 +|=4088H|High-speed pulse instructions use the same output shaft (d1)
113 113  
114 114  **Example**
115 115  
116 116  **(1) Realize the 1:1 follow function of Y0 output pulse to Y3 output pulse.**
117 117  
118 -1) Configure the high-speed counter, enable HSC0, and configure it as one-way output and count-up mode.
122 +Configure the high-speed counter, enable HSC0, and configure it as one-way output and count-up mode.
119 119  
120 120  (% style="text-align:center" %)
121 121  [[image:09_html_c27f358df2fb693.png||class="img-thumbnail"]]
122 122  
123 -2) Ladder
127 +Ladder
124 124  
125 125  (% style="text-align:center" %)
126 126  [[image:09_html_242f6504931e93b5.png||class="img-thumbnail"]]