[Instruction] Contents
[Instruction] Contents [Instruction] Contents
Advanced Function InstructionFUN 95RAMPRAMP FUNCTION FOR D/A OUTPUTFUN 95RAMPRamp controlPause controlUp/Down outputENPAUU/DLadder symbol95.RAMPTn :ERRPV :S :LASLS U :D : ASUTn : Timer for ramp functionPV : Preset value of ramp timer (the unit is 0.01 second)or the increment value of every 0.01 secondS L : Lower limit value(ramp floor value).S U : Upper limit value(ramp ceiling value).D : Register storing current ramping value.D+1 : Working registerS U, S L could be positive or negative value when incorporatewith AO module application.OperandRangeWX WY WM WS TMR CTR HR IR OR SR ROR DR KWX0∣WX240WY0∣WY240WM0∣WM1896WS0∣WS984T0∣T255C0∣C255R0∣R3839R3840∣R3903R3904∣R3967R3968∣R4167R5000∣R8071D0∣D409516-bit+/- numberTn ○PV ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○S L ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○S U ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○D ○ ○ ○ ○ ○ ○ ○ ○ ○* ○Description• Tn must be a 0.01 sec time base timer and never used in other part of program.• PV is the preset value of ramp timer. Its unit is 10ms (0.01 second).• When input control “EN↑” changes from 0→1, it first reset the timer Tn to 0.When “U/D”=1 it will load the value of SL to register D. And when M1974 = 0 it will be increased by S U−S L /PV every 0.01 sec or when M1974 = 1 it will increase by PV every 0.01 sec. When the D value reaches theS U value the output “ASU” =1.When “U/D”=0 it will load the value of S U to register D. When M1974 = 0 it will be decreased by S U−S L / PVevery 0.01 sec or when M1974 = 1 it will be decreased by PV every 0.01 sec. When the D value reaches theS L value the output “ASL” =1.• The ramping direction(U/D) is determined at the time when input control “EN↑” changes from 0→1. After theoutput D start to ramp, the change of U/D is no effect.• If it is required to pause the ramping action, it must let the input control “PAU” = 1; when “PAU”=0, and theramping action is not completed, it will continue to complete the ramping action.• The value of S U must be larger than S L, otherwise the ramp function will not be performed, and the output“ERR” will set to 1.• This instruction use the register D to store the output ramping value; if the application use the D/A module tosend the speed command, then speed command can be derived from the RAMP function to get a moresmooth movement.• In addition to use register D to store the ramping value, this instruction also used the register D+1 to act asinternal working register; therefore the other part of program can not use the register D+1.7-81
Advanced Function InstructionFUN 95RAMPRAMP FUNCTION FOR D/A OUTPUTFUN 95RAMPProgram exampleM0M195.RAMPEN Tn : T20 ERRPV : R100PAU SL : R101 ASLM100M101Move the ramping value to AO output registerR3904M2U/DSU : R102D : R103ASUM102M0EN8.MOVS : R103D : R3904T20: Ramp timer (timer with 0.01 second time base)R100: preset value of ramp timer (the unit is 0.01 second, 100 for a second).R101: Lower limit value.R102: Upper limit value.R103: Register storing current ramp value.R104: Working register• If M1974=0, When input control M0 changes from 0→1, it first reset the timer T20 to 0. If M2=1, it will loadthe R101 (lower limit) value into the R103, and it will increase the output with fixed value (R102-R101 / R100)for every 0.01 second and stores it to register R103. When the T2 timer going up to the preset value R100,the output value equals to R102, and the output M102 will set to 1. If M2=0, will load the R102 (upper limit)value into the R103, and it will decrease the output amount with fixed ratio (R102-R101 / R100) for every 0.01second and store it to register R103. The T2 timer going up to the preset value R100, the output value equalsto R102, and the output M101 will set to 1.• M1=1, pause the ramping action.• The value of R102 must be greater than R101, otherwise the ramp action will not be performed, and theoutput M100 will set to 1.SUSLPVPVt7-82
- Page 138 and 139: Advanced Function InstructionFUN55
- Page 140 and 141: Advanced Function InstructionFUN56
- Page 142 and 143: Advanced Function InstructionFUN 58
- Page 144 and 145: Advanced Function InstructionFUN 59
- Page 146 and 147: Advanced Function InstructionFUN 59
- Page 148 and 149: Advanced Function InstructionFUN 61
- Page 150 and 151: Advanced Function InstructionFUN 63
- Page 152 and 153: Advanced Function InstructionFUN 64
- Page 154 and 155: Advanced Function InstructionEND PR
- Page 156 and 157: Advanced Function InstructionFUN 66
- Page 158 and 159: Advanced Function InstructionFUN 68
- Page 160 and 161: Advanced Function InstructionFUN 70
- Page 162 and 163: Advanced Function InstructionFUN 74
- Page 164 and 165: Advanced Function InstructionFUN 76
- Page 166 and 167: Advanced Function InstructionFUN 78
- Page 168 and 169: Advanced Function InstructionFUN 79
- Page 170 and 171: Advanced Function InstructionFUN 81
- Page 172 and 173: Advanced Function InstructionFUN 82
- Page 174 and 175: Advanced Function InstructionFUN 84
- Page 176 and 177: Advanced Function InstructionFUN 86
- Page 178 and 179: Advanced Function InstructionFUN 86
- Page 180 and 181: Advanced Function InstructionFUN89/
- Page 182 and 183: Advanced Function InstructionFUN 90
- Page 184 and 185: Advanced Function InstructionFUN 92
- Page 186 and 187: Advanced Function InstructionFUN 94
- Page 190 and 191: Advanced Function InstructionTable
- Page 192 and 193: Advanced Function InstructionFUN101
- Page 194 and 195: Advanced Function InstructionFUN103
- Page 196 and 197: Advanced Function InstructionFUN105
- Page 198 and 199: Advanced Function InstructionFUN107
- Page 200 and 201: Advanced Function InstructionFUN109
- Page 202 and 203: Advanced Function InstructionFUN110
- Page 204 and 205: Advanced Function InstructionFUN111
- Page 206 and 207: Advanced Function InstructionFUN112
- Page 208 and 209: Advanced Function InstructionFUN114
- Page 210 and 211: Advanced Function InstructionFUN120
- Page 212 and 213: Advanced Function InstructionFUN122
- Page 214 and 215: Advanced Function InstructionFUN124
- Page 216 and 217: Advanced Function InstructionFUN126
- Page 218 and 219: Advanced Function InstructionFUN128
- Page 220 and 221: Advanced Function InstructionFUN130
- Page 222 and 223: Advanced Function InstructionFUN 13
- Page 224 and 225: Advanced Function InstructionFUN141
- Page 226 and 227: Advanced Function InstructionFUN143
- Page 228 and 229: Advanced Function InstructionFUN146
- Page 230 and 231: Advanced Function InstructionFUN 15
- Page 232 and 233: Advanced Function InstructionFUN160
- Page 234 and 235: Advanced Function InstructionFUN201
- Page 236 and 237: Advanced Function InstructionFUN 20
Advanced Function <strong>Instruction</strong>FUN 95RAMPRAMP FUNCTION FOR D/A OUTPUTFUN 95RAMPProgram exampleM0M195.RAMPEN Tn : T20 ERRPV : R100PAU SL : R101 ASLM100M101Move the ramping value to AO output registerR3904M2U/DSU : R102D : R103ASUM102M0EN8.MOVS : R103D : R3904T20: Ramp timer (timer with 0.01 second time base)R100: preset value of ramp timer (the unit is 0.01 second, 100 for a second).R101: Lower limit value.R102: Upper limit value.R103: Register storing current ramp value.R104: Working register• If M1974=0, When input control M0 changes from 0→1, it first reset the timer T20 to 0. If M2=1, it will loadthe R101 (lower limit) value into the R103, and it will increase the output with fixed value (R102-R101 / R100)for every 0.01 second and stores it to register R103. When the T2 timer going up to the preset value R100,the output value equals to R102, and the output M102 will set to 1. If M2=0, will load the R102 (upper limit)value into the R103, and it will decrease the output amount with fixed ratio (R102-R101 / R100) for every 0.01second and store it to register R103. The T2 timer going up to the preset value R100, the output value equalsto R102, and the output M101 will set to 1.• M1=1, pause the ramping action.• The value of R102 must be greater than R101, otherwise the ramp action will not be performed, and theoutput M100 will set to 1.SUSLPVPVt7-82