Changes for page 11 PID Control Instruction
Last modified by Iris on 2025/09/17 20:56
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -157,8 +157,8 @@ 157 157 |4D80H|The sampling time is out of range.(T,,S,,≤0) 158 158 |4D81H|Input filter constant (α) is out of range (α<0 or α>1023) 159 159 |4D82H|The maximum ascent rate (△//T//) is out of range.(△//T//<0 or △//T//>1023) 160 -|4D86H|The sampling time (Ts) is less than the operation cycle. (T//s//<Scanning cycle)161 -|4D87H|The proportional gain (K//p//) is out of range.(K//p//<1 or K//p//>32000) 160 +|4D86H|The sampling time (Ts) is less than the operation cycle.(T//s//<Scanning cycle) 161 +|4D87H|The proportional gain (K//p//) is out of range.(K//p//<1 or K//p//>32000) 162 162 |4D88H|The integral time constant (Ti) is out of range.(K//i//<0 or K//i//>3600) 163 163 |4D89H|The differential time constant (T//d//) is out of range.(K//d//<0 or K//d//>1000) 164 164 |4D90H|The upper limit of CCPID output is less than the lower limit. ... ... @@ -357,7 +357,7 @@ 357 357 358 358 |**Unit**|**Features**|**Setting instructions**|**Supplement** 359 359 |[[image:11_html_6dcdd8fc88703a47.jpg]]|Sample time (TS)|The set range is 1 to 32,767 (ms), but greater than PLC program scan cycle.|It is how often the instruction calculates and updates the output value (MV). When TS is less than one scan time, PID instruction is executed with one scan time and alarm 4D86H. When TS ≤ 0, alarm 4D80H and no execution. 360 -|+1|Action direction (ACT)|((( 360 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+1|Action direction (ACT)|((( 361 361 bit0: 0=positive action; 1=reverse action bit2: auto-tuning transition zone switch. 0=not open;1=open 362 362 363 363 bit3: 0=unidirection; 1=bidirection ... ... @@ -378,12 +378,12 @@ 378 378 379 379 bit4: **✎**When bit4=1 and bit6 and bit7 are not 1, auto-tuning is not executed. **✎**When bit4=0 and one of bit6 and bit7 is 1, auto-tuning is not executed. **✎**When bit4=1 and bit6 and bit7 are both 1, auto-tuning is executed 380 380 ))) 381 -|+2|Filter coefficient|The first-order inertia filter of feedback amount (0 to 100%) has a range of 0 to100|When the value is greater than or equal to 100, it will be executed as 0, that is, no filtering will be executed; 382 -|+3|Proportional gain(Kp)|Set range: 0 to 30,000[%]|Overrun error 4D87H 383 -|+4|Integration time (Ti)|Ti is integration time, and the range is 0 to 3,600 (s)|Overrun error 4D88H 384 -|+5|Differential time (Td)|Td is derivative time, and the range is 0 to 1,000 (s)|Overrun error 4D89H 385 -|+6|Working interval|Operating temperature setting enabled by PID (0 indicates no effect) The range is 0 to 1,000|It is recommended to be greater than 5°C, that is, 50 (precision 0.1°C). If it exceeds the range, the boundary value will be taken. 386 -|+7|Output low limit|((( 381 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+2|Filter coefficient|The first-order inertia filter of feedback amount (0 to 100%) has a range of 0 to100|When the value is greater than or equal to 100, it will be executed as 0, that is, no filtering will be executed; 382 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+3|Proportional gain(Kp)|Set range: 0 to 30,000[%]|Overrun error 4D87H 383 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+4|Integration time (Ti)|Ti is integration time, and the range is 0 to 3,600 (s)|Overrun error 4D88H 384 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+5|Differential time (Td)|Td is derivative time, and the range is 0 to 1,000 (s)|Overrun error 4D89H 385 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+6|Working interval|Operating temperature setting enabled by PID (0 indicates no effect) The range is 0 to 1,000|It is recommended to be greater than 5°C, that is, 50 (precision 0.1°C). If it exceeds the range, the boundary value will be taken. 386 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+7|Output low limit|((( 387 387 Range: -10,000 to 10,000. 388 388 389 389 Recommended setting range: -2,000 or 0 (when S3+1 bit3=0, the lower limit = 0; ... ... @@ -398,7 +398,7 @@ 398 398 399 399 2. During the control process, the lower limit is dynamically adjustable. If the lower limit is greater than or equal to the upper limit, error 4D90H will be reported. 400 400 ))) 401 -|+8|Output upper limit|((( 401 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+8|Output upper limit|((( 402 402 Value range: -10,000 to 10,000. 403 403 404 404 Recommended setting value is 2,000 ... ... @@ -411,7 +411,7 @@ 411 411 412 412 2. During the control process, the upper limit is dynamically adjustable. If the lower limit is greater than or equal to the upper limit, error 4D90H will be reported. 413 413 ))) 414 -|+9|Mode setting|((( 414 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+9|Mode setting|((( 415 415 0: Overshoot allowed 416 416 417 417 1: Slight overshoot or no overshoot ... ... @@ -422,36 +422,36 @@ 422 422 423 423 1: Slight overshoot or no overshoot mode (ukd = 300) 424 424 ))) 425 -|+10|((( 425 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+10|((( 426 426 Scale factor 427 427 428 428 (ukp) 429 429 )))|Typically sets value to 100 (default 100) [enabled when S3+9 is set to 2].The range is 1 to 500.|When the value is less than or equal to 0, or greater than 500, the boundary value will be taken. 430 -|+11|Integral coefficient (uki)|Typically sets value to 50 (default 50) [enabled when S3+9 is set to 2]. The range is 1 to 300.|When the value is less than or equal to 0, or greater than 300, the boundary value will be taken. 431 -|+12|Differential coefficient (ukd)|Typically sets value to 50 (default 100. 300 to 400 can be set when slight overshoot is required) [Enable when S3+9 is set to 2]. The range is 1 to 500.|When the value is less than or equal to 0, or greater than 500, the boundary value will be taken. 432 -|+13|Maximum ascent rate (DeltaT)|The range is 0 to 32,000, which is the threshold of integral increment|Overrun error 4D82H 433 -|+14|Filtering (C0)|The range is 0 to 1,023, integral part filtering|Overrun error 4D81H 434 -|+15|(% rowspan="3" %)reserved for internal control|(% rowspan="3" %)Internal control space occupation|(% rowspan="3" %) 430 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+11|Integral coefficient (uki)|Typically sets value to 50 (default 50) [enabled when S3+9 is set to 2]. The range is 1 to 300.|When the value is less than or equal to 0, or greater than 300, the boundary value will be taken. 431 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+12|Differential coefficient (ukd)|Typically sets value to 50 (default 100. 300 to 400 can be set when slight overshoot is required) [Enable when S3+9 is set to 2]. The range is 1 to 500.|When the value is less than or equal to 0, or greater than 500, the boundary value will be taken. 432 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+13|Maximum ascent rate (DeltaT)|The range is 0 to 32,000, which is the threshold of integral increment|Overrun error 4D82H 433 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+14|Filtering (C0)|The range is 0 to 1,023, integral part filtering|Overrun error 4D81H 434 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+15|(% rowspan="3" %)reserved for internal control|(% rowspan="3" %)Internal control space occupation|(% rowspan="3" %) 435 435 |┆ 436 -|+21 437 -|+22|(% rowspan="3" %)used space for self-tuning|(% rowspan="3" %)New self-tuning space for internal use|(% rowspan="3" %) 436 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+21 437 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+22|(% rowspan="3" %)used space for self-tuning|(% rowspan="3" %)New self-tuning space for internal use|(% rowspan="3" %) 438 438 |┆ 439 -|+51 439 +|[[image:11_html_6dcdd8fc88703a47.jpg]]+51 440 440 441 441 1) The auto-tuning process occupies the space of S3+22 to S3+51. When the auto-tuning is successful, the adjusted parameters will be written into the space of S3+2 to S3+21. 442 442 443 -2) +2 filter coefficient α: Processing in first-order inertial filter 443 +2)[[image:11_html_6dcdd8fc88703a47.jpg]] +2 filter coefficient α: Processing in first-order inertial filter 444 444 445 445 Formula: **T,,now,,=(100-α)×T,,α,,+α×T,,old,,** 446 446 447 447 T,,α ,,is the currently measured temperature. T,,old ,,is the temperature that participated in the PID calculation last time. T,,now ,,is the temperature used for the current PID calculation. α is the filter coefficient (when α=0, no filtering is performed, and the range of α is 0 to 100.(If there is a temperature with a small overshoot but a long stabilization time, the parameter can be set to 80, and analyze the specific problems in detail) 448 448 449 -3) +6 work range: Twork(example: 170 represents 17℃) 449 +3)[[image:11_html_6dcdd8fc88703a47.jpg]] +6 work range: Twork(example: 170 represents 17℃) 450 450 451 451 (% style="text-align:center" %) 452 452 [[image:企业微信截图_17581105436817.png||height="197" width="652"]] 453 453 454 -4) +9 working mode: 454 +4) [[image:11_html_6dcdd8fc88703a47.jpg]]+9 working mode: 455 455 456 456 0: Working mode that allows overshoot 457 457 ... ... @@ -459,7 +459,7 @@ 459 459 460 460 2: Custom settings; to achieve by setting [[image:1758111151287-920.png||height="15" width="28"]]+10, [[image:1758111151287-920.png||height="15" width="28"]]+11, [[image:1758111151287-920.png||height="15" width="28"]]+12 three coefficients. 461 461 462 -5) +1 bit2 self-tuning transition zone switch: (upper limit 1℃, low limit 0.5℃) 462 +5)[[image:11_html_6dcdd8fc88703a47.jpg]] +1 bit2 self-tuning transition zone switch: (upper limit 1℃, low limit 0.5℃) 463 463 464 464 The transition zone description in forward control: 465 465 ... ... @@ -614,7 +614,148 @@ 614 614 (% style="text-align:center" %) 615 615 [[image:11_html_74a7527eace55103.gif||class="img-thumbnail"]] 616 616 617 +=== ** CCPIN_SHT operation** === 617 617 619 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps294.png]]**CCPIN_SHT** 620 + 621 +This instruction is used to perform PID control that changes the output value according to the variation of the input. 622 + 623 +-[CCPID_SHT (s1) (s2) (s3) (d)] 624 + 625 +**Content, range and data type** 626 + 627 +|**Parameter**|**Content**|**Range**|**Data type**|**Data type (label)** 628 +|(s1)|The device number that stores the target value (SV)|-32767 to 32767|Signed BIN 16 bit|ANY16 629 +|(s2)|The device number that stores the measured value (SV)|-32767 to 32767|Signed BIN 16 bit|ANY16 630 +|(s3)|The device number that stores parameters|1 to 32767|Signed BIN 16 bit|ANY16 631 +|(d)|The device number that stores the output value (SV)|-32767 to 32767|Signed BIN 16 bit|ANY16 632 + 633 +**Device used** 634 + 635 +|(% rowspan="2" %)**Instruction**|(% rowspan="2" %)**Parameter**|(% colspan="8" %)**Devices**|((( 636 +**Offset** 637 + 638 +**modification** 639 +)))|((( 640 +**Pulse** 641 + 642 +**extension** 643 +))) 644 +|**D**|**R**|**SD**|**LC**|**HSC**|**K**|**H**|**E**|**[D]**|**XXP** 645 +|(% rowspan="4" %)CCPID_SHT|Parameter 1|●|●|●| | | | | | | 646 +|Parameter 2|●|●|●| | | | | | | 647 +|Parameter 3|●|●|●| | | | | | | 648 +|Parameter 4|●|●|●| | | | | | | 649 + 650 +**Features** 651 + 652 +This instruction is to complete the temperature control operation, used to control the parameters of the closed-loop control system. 653 + 654 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps295.png]] is the target value of CCPID SHT control (SV). 655 + 656 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps296.png]] is the measured feedback value (PV). 657 + 658 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps297.png]] is the start address of the cache where the parameters required by CCPID_SHT operation and intermediate results are saved, 659 + 660 +occupying a total of 36 variable units of subsequent addresses. The value range is from D0 to D7946 or from R0 to R29964. It is better to specify power failure retention, and the setting value remains after power supply is off. Otherwise, the cache needs to be assigned value before starting the calculation for the first time. The function and parameter description of each unit are described in this section. 661 + 662 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps298.png]] is the storage unit of the CCPID_SHT calculation result. Please specify it as a non-battery retentive area, otherwise it needs to be initialized and cleared before the first start of calculation. 663 + 664 +**Programming example** 665 + 666 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps299.png]] 667 + 668 +The parameter description is as follows: 669 + 670 +The target value of CCPID_SHT adjustment is stored in D1, and D0 is the closed-loop feedback value. Note that D0 and D9 must be of the same dimension, such as both 0.01MPa units, or 1℃ units, etc.. 671 + 672 +A total of 36 units of D1000 to D1035 are used to store the set value and process value of CCPID_SHT operation. These values must be set item by item before the first CCPID_SHT calculation. 673 + 674 +D100 unit is used to store the calculated control output value to control the execution of the action. 675 + 676 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps300.png]]The functions and setting methods of the parameter values of each unit at the beginning are described in the table below: 677 + 678 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps301.png]] to [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps302.png]]+15 is the parameter range that can be set (parameters set when CCPID_SHT is executed). 679 + 680 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps303.png]]+2 to [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps304.png]]+31 is the parameter space used in the self-tuning process. (This space is multiplexed with the parameter space during control) 681 + 682 + 683 +The functions and setting methods of the parameter values of each unit started by [[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps305.png]] are described in the following table: 684 + 685 +|**Unit**|**Function**|**Description** 686 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps306.png]]|Sampling time (TS)|Range: 1 to 32767 (ms). It must be longer than PLC program scan cycle. 687 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps307.png]]+1|Control flag bit|((( 688 +bit0: 0=Forward action; 1=Reverse action 689 + 690 +bit3: 0=one-way; 1=two-way 691 + 692 +bit4: 0=Self-tuning does not act; 1=Perform self-tuning and the others are not available. 693 + 694 +bit6: 0=Two-segment self-tuning does not act; 1=Perform two-segment self-tuning (bit4 must set to 1) 695 + 696 +bit7: 0=Three-segment self-tuning does not act; 1=Perform three-segment self-tuning (bit4 must set to 1) 697 + 698 +Bit15: The instruction initialization flag bit. When initialization is complete, it is set to 1. 699 +))) 700 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps308.png]]+2|Maximum rate of increase (DeltaT)|Range: 0 to 32000. Threshold of integral increment 701 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps309.png]]+3|Proportional gain (Kp)|Range: 0 to 32767. This value is magnified 256 times and the actual value is Kp/256. 702 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps310.png]]+4|Integral gain (Ki)|Range: 0 to 32767, Ki=16384Ts/Ti,Ti is integral time 703 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps311.png]]+5|Differential gain (Kd)|Range: 0 to 32767, Kd≈Td/Ts, Td is differential time 704 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps312.png]]+6|Filter constant (Co)|Range: 0 to 1023, Integral partial filtering. 705 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps313.png]]+7|Output lower limit|Recommended setting range: -2000 to 2000 706 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps314.png]]+8|Output upper limit|Recommended setting value: 2000. When the upper and lower limits are both 0, the upper limit becomes 2000 and the lower limit becomes 0. 707 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps315.png]]+9|Reserved|Reserved for internal use 708 +|┇|┇|┇ 709 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps316.png]]+35|Reserved|Reserved for internal use 710 + 711 +Parameter space corresponding to the self-tuning time 712 + 713 +|**Unit**|**Function**|**Description** 714 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps317.png]]|Sampling time (TS)|Range: 1 to 32767 (ms). It must be longer than PLC program scan cycle. 715 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps318.png]]+1|Control flag bit|((( 716 +bit0: 0=Forward action; 1=Reverse action 717 + 718 +bit3: 0=one-way; 1=two-way 719 + 720 +bit4: 0=Self-tuning does not act; 1=Perform self-tuning and the others are not available. 721 + 722 +bit6: 0=Two-segment self-tuning does not act; 1=Perform two-segment self-tuning (bit4 must set to 1) 723 + 724 +bit7: 0=Three-segment self-tuning does not act; 1=Perform three-segment self-tuning (bit4 must set to 1) 725 + 726 +Bit15: This instruction initializes the flag bit. When initialization is complete, the position is set to 1. 727 +))) 728 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps319.png]]+2|Sampling time of PID running after self-tuning|Setting range: 1 to 32767 ms(). When Ts≦0, Ts=3000 729 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps320.png]]+3|Coefficient ukp for PID parameter calculation|Setting range: 0 to 500. When ukp≦0, ukp=100; When ukp≧500, ukp=500. 730 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps321.png]]+4|Coefficient uki for PID parameter calculation|Setting range: 0 to 32767. When uki≦0, uki=50. 731 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps322.png]]+5|Coefficient ukd for PID parameter calculation|Setting range: 0 to 32767. When ukd≦0, ukd=50. 732 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps323.png]]+6|Reserved|Reserved 733 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps324.png]]+7|Output lower limit|Recommended setting range: -2000 to 2000 734 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps325.png]]+8|Output upper limit|Recommended setting value: 2000. When the upper and lower limits are both 0, the upper limit becomes 2000 and the lower limit becomes 0. 735 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps326.png]]+9|Reserved|Reserved for internal use 736 +|┇|┇|┇ 737 +|[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps327.png]]+35|Reserved|Reserved for internal use 738 + 739 +**Error code** 740 + 741 +|**Error code**|**Content** 742 +|4085H|Read application instruction (S1), (S2), (S3) and (d) output results exceed the range of device. 743 +|4086H|The devices specified in write application instruction (S3) and (d) exceed the range of the corresponding device. 744 +|4DB0H|Sampling time (Ts) exceeds the range the object (Ts≦0) 745 +|4DB1H|Output filter constant (Co) exceeds the range the object (Co<0 or Co>1023) 746 +|4DB2H|Maximum rate of increase (DeltaT) exceeds the range the object (deltaT<0 or deltaT>32000) 747 +|4DB3H|Proportional gain (Kp) exceeds the range the object (Kp≦0) 748 +|4DB4H|Integral gain (Ki) exceeds the range the object (Ki≦0) 749 +|4DB5H|Differential gain (Kd) exceeds the range the object (Kd≦0) 750 +|4DB6H|Sampling time (Ts) < operation cycle 751 + 752 +**Example** 753 + 754 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps328.png]] 755 + 756 +[[image:file:///C:\Users\Administrator\AppData\Local\Temp\ksohtml11524\wps329.png]] 757 + 758 + 618 618 == **LAGCDL Large time-delay temperature control instruction** == 619 619 620 620 **LAGCDL**