The text of a manual · part 28 of 40
DL05 Micro PLC User Manual, Volume 1 of 2: Chapter 5: Standard RLL and Intelligent Box Instructions, pages 254 to 263
Pages 254 to 263 of 379, from DL05 Micro PLC User Manual, Volume 1 of 2
The original document is the PDF (5.8 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the AutomationDirect D0-05AA
Page 254
Chapter 5: Intelligent Box (IBox) - Analog Helper
ANLGOUT Example In the following example, the ANLGOUT instruction is used to setup the pointer method for an analog output module that is installed in option slot 3. Two output channels are enabled and the analog data will be read from V2100 - V2101 in BCD format.
No permissive contact or input logic is used with this instruction
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
DL05 Micro PLC User Manual, 6th Edition, Rev. A
5–131
Page 255
Chapter 5: Intelligent Box (IBox) - Analog Helper
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Analog Scale 12 Bit BCD to BCD (ANSCL) (IB-423) DS5
Used
HPP
N/A
5–132
Analog Scale 12 Bit BCD to BCD scales a 12 bit BCD analog value (0-4095 BCD) into BCD engineering units. You specify the engineering unit high value (when raw is 4095), and the engineering low value (when raw is 0), and the output V memory address you want the to place the scaled engineering unit value. The engineering units are generated as BCD and can be the full range of 0 to 9999 (see ANSCLB Analog Scale 12 Bit Binary to Binary if your raw units are in Binary format). Note that this IBox only works with unipolar unsigned raw values. It does NOT work with bipolar or sign plus magnitude raw values. ANSCL Parameters • Raw (0-4095 BCD): specifies the V-memory location of the unipolar unsigned raw 0-4095 unscaled value • High Engineering: specifies the high engineering value when the raw input is 4095 • Low Engineering: specifies the low engineering value when the raw input is 0 • Engineering (BCD): specifies the V-memory location where the scaled engineering BCD value will be placed
Parameter Raw (0-4095 BCD) . . . . . . . . . . . . . . . . . . . . . V,P High Engineering . . . . . . . . . . . . . . . . . . . . . . . . K Low Engineering . . . . . . . . . . . . . . . . . . . . . . . . K Engineering (BCD). . . . . . . . . . . . . . . . . . . . . . V,P
DL05 Range See DL05 V-memory map - Data Words K0-9999 K0-9999 See DL05 V-memory map - Data Words
DL05 Micro PLC User Manual, 6th Edition, Rev. A
Page 256
Chapter 5: Intelligent Box (IBox) - Analog Helper
ANSCL Example In the following example, the ANSCL instruction is used to scale a raw value (0-4095 BCD) that is in V2000. The engineering scaling range is set 0-100 (low engineering value - high engineering value). The scaled value will be placed in V2100 in BCD format.
DL05 Micro PLC User Manual, 6th Edition, Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–133
Page 257
Chapter 5: Intelligent Box (IBox) - Analog Helper
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Analog Scale 12 Bit Binary to Binary (ANSCLB) (IB-403) DS5
Used
HPP
N/A
5–134
Analog Scale 12 Bit Binary to Binary scales a 12 bit binary analog value (0-4095 decimal) into binary (decimal) engineering units. You specify the engineering unit high value (when raw is 4095), and the engineering low value (when raw is 0), and the output V-memory address you want to place the scaled engineering unit value. The engineering units are generated as binary and can be the full range of 0 to 65535 (see ANSCL - Analog Scale 12 Bit BCD to BCD if your raw units are in BCD format). Note that this IBox only works with unipolar unsigned raw values. It does NOT work with bipolar, sign plus magnitude, or signed 2's complement raw values.
ANSCLB Parameters • Raw (12 bit binary): specifies the V-memory location of the unipolar unsigned raw decimal unscaled value (12 bit binary = 0-4095 decimal) • High Engineering: specifies the high engineering value when the raw input is 4095 decimal • Low Engineering: specifies the low engineering value when the raw input is 0 decimal • Engineering (binary): specifies the V-memory location where the scaled engineering decimal value will be placed
Parameter Raw (12 bit binary) . . . . . . . . . . . . . . . . . . . . V,P High Engineering . . . . . . . . . . . . . . . . . . . . . . . . K Low Engineering . . . . . . . . . . . . . . . . . . . . . . . . K Engineering (binary) . . . . . . . . . . . . . . . . . . . . V,P
DL05 Range See DL05 V-memory map - Data Words K0-65535 K0-65535 See DL05 V-memory map - Data Words
DL05 Micro PLC User Manual, 6th Edition, Rev. A
Page 258
Chapter 5: Intelligent Box (IBox) - Analog Helper
ANSCLB Example In the following example, the ANSCLB instruction is used to scale a raw value (0-4095 binary) that is in V2000. The engineering scaling range is set 0-1000 (low engineering value high engineering value). The scaled value will be placed in V2100 in binary format.
DL05 Micro PLC User Manual, 6th Edition, Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–135
Page 259
Chapter 5: Intelligent Box (IBox) - Analog Helper
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Filter Over Time - BCD (FILTER) (IB-422) DS5
Used
HPP
N/A
5–136
Filter Over Time BCD will perform a first-order filter on the Raw Data on a defined time interval. The equation is: New = Old + [(Raw - Old) / FDC] where, New: New Filtered Value Old: Old Filtered Value FDC: Filter Divisor Constant Raw: Raw Data The Filter Divisor Constant is an integer in the range K1 to K100, such that if it equaled K1 then no filtering would be done. The rate at which the calculation is performed is specified by time in hundredths of a second (0.01 seconds) as the Filter Freq Time parameter. Note that this Timer instruction is embedded in the IBox and must NOT be used anywhere else in your program. Power flow controls whether the calculation is enabled. If it is disabled, the Filter Value is not updated. On the first scan from Program to Run mode, the Filter Value is initialized to 0 to give the calculation a consistent starting point. FILTER Parameters • Filter Frequency Timer: specifies the Timer (T) number which is used by the Filter instruction • Filter Frequency Time (0.01sec): specifies the rate at which the calculation is performed • Raw Data (BCD): specifies the V-memory location of the raw unfiltered BCD value • Filter Divisor (1-100): this constant used to control the filtering effect. A larger value will increase the smoothing effect of the filter. A value of 1 results with no filtering. • Filtered Value (BCD): specifies the V-memory location where the filtered BCD value will be placed
Parameter Filter Frequency Timer . . . . . . . . . . . . . . . . . . . T Filter Frequency Time (0.01 sec) . . . . . . . . . . . K Raw Data (BCD) . . . . . . . . . . . . . . . . . . . . . . . . V Filter Divisor (1-100) . . . . . . . . . . . . . . . . . . . . . K Filtered Value (BCD) . . . . . . . . . . . . . . . . . . . . . V
DL05 Range T0-177 K0-9999 See DL05 V-memory map - Data Words K1-100 See DL05 V-memory map - Data Words
DL05 Micro PLC User Manual, 6th Edition, Rev. A
Page 260
Chapter 5: Intelligent Box (IBox) - Analog Helper
FILTER Example In the following example, the Filter instruction is used to filter a BCD value that is in V2000. Timer(T0) is set to 0.5 sec, the rate at which the filter calculation will be performed. The filter constant is set to 2. A larger value will increase the smoothing effect of the filter. A value of 1 results with no filtering. The filtered value will be placed in V2100.
DL05 Micro PLC User Manual, 6th Edition, Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–137
Page 261
Chapter 5: Intelligent Box (IBox) - Analog Helper
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Filter Over Time - Binary (FILTERB) (IB-402) DS5
Used
Filter Over Time in Binary (decimal) will perform a first-order filter on the Raw Data on a defined time interval. The equation is:
HPP
N/A
New = Old + [(Raw - Old) / FDC] where
5–138
New: New Filtered Value Old: Old Filtered Value FDC: Filter Divisor Constant Raw: Raw Data The Filter Divisor Constant is an integer in the range K1 to K100, such that if it equaled K1 then no filtering would be done. The rate at which the calculation is performed is specified by time in hundredths of a second (0.01 seconds) as the Filter Freq Time parameter. Note that this Timer instruction is embedded in the IBox and must NOT be used anywhere else in your program. Power flow controls whether the calculation is enabled. If it is disabled, the Filter Value is not updated. On the first scan from Program to Run mode, the Filter Value is initialized to 0 to give the calculation a consistent starting point. FILTERB Parameters • Filter Frequency Timer: specifies the Timer (T) number which is used by the Filter instruction • Filter Frequency Time (0.01sec): specifies the rate at which the calculation is performed • Raw Data (Binary): specifies the V-memory location of the raw unfiltered binary (decimal) value • Filter Divisor (1-100): this constant used to control the filtering effect. A larger value will increase the smoothing effect of the filter. A value of 1 results with no filtering. • Filtered Value (Binary): specifies the V-memory location where the filtered binary (decimal) value will be placed
Parameter Filter Frequency Timer . . . . . . . . . . . . . . . . . . . T Filter Frequency Time (0.01 sec) . . . . . . . . . . . K Raw Data (Binary) . . . . . . . . . . . . . . . . . . . . . . . V Filter Divisor (1-100) . . . . . . . . . . . . . . . . . . . . . K Filtered Value (Binary) . . . . . . . . . . . . . . . . . . . . V
DL05 Range T0-177 K0-9999 See DL05 V-memory map - Data Words K1-100 See DL05 V-memory map - Data Words
DL05 Micro PLC User Manual, 6th Edition, Rev. A
Page 262
Chapter 5: Intelligent Box (IBox) - Analog Helper
FILTERB Example In the following example, the FILTERB instruction is used to filter a binary value that is in V2000. Timer(T1) is set to 0.5 sec, the rate at which the filter calculation will be performed. The filter constant is set to 3. A larger value will increase the smoothing effect of the filter. A value of 1 results with no filtering. The filtered value will be placed in V2100.
SP1
DL05 Micro PLC User Manual, 6th Edition, Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–139
Page 263
Chapter 5: Intelligent Box (IBox) - Analog Helper
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Hi/Low Alarm - BCD (HILOAL) (IB-421) DS5
Used
HPP
N/A
5–140
Hi/Low Alarm - BCD monitors a BCD value V-memory location and sets four possible alarm states, High-High, High, Low, and Low-Low whenever the IBox has power flow. You enter the alarm thresholds as constant K BCD values (K0-K9999) and/or BCD value V-memory locations. You must ensure that threshold limits are valid, that is HH >= H > L >= LL. Note that when the High-High or Low-Low alarm condition is true, that the High and Low alarms will also be set, respectively. This means you may use the same threshold limit and same alarm bit for the HighHigh and the High alarms in case you only need one "High" alarm. Also note that the boundary conditions are inclusive. That is, if the Low boundary is K50, and the Low-Low boundary is K10, and if the Monitoring Value equals 10, then the Low Alarm AND the Low-Low alarm will both be ON. If there is no power flow to the IBox, then all alarm bits will be turned off regardless of the value of the Monitoring Value parameter. HILOAL Parameters • Monitoring Value (BCD): specifies the V-memory location of the BCD value to be monitored • High-High Limit: V-memory location or constant specifies the high-high alarm limit • High-High Alarm: On when the high-high limit is reached • High Limit: V-memory location or constant specifies the high alarm limit • High Alarm: On when the high limit is reached • Low Limit: V-memory location or constant specifies the low alarm limit • Low Alarm: On when the low limit is reached • Low-Low Limit: V-memory location or constant specifies the low-low alarm limit • Low-Low Alarm: On when the low-low limit is reached
Parameter Monitoring Value (BCD) . . . . . . . . . . . . . . . . . . V High-High Limit . . . . . . . . . . . . . . . . . . . . . . . V, K High-High Alarm . . . . . . . . . . . X, Y, C, GX,GY, B High Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . V, K High Alarm . . . . . . . . . . . . . . . . X, Y, C, GX,GY, B Low Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . V, K Low Alarm . . . . . . . . . . . . . . . . X, Y, C, GX,GY,B Low-Low Limit . . . . . . . . . . . . . . . . . . . . . . . V, K Low-Low Alarm. . . . . . . . . . . . . X, Y, C, GX,GY, B
DL05 Range See DL05 V-memory map - Data Words K0-9999; or see DL05 V-memory map - Data Words See DL05 V-memory map K0-9999; or see DL05 V-memory map - Data Words See DL05 V-memory map K0-9999; or see DL05 V-memory map - Data Words See DL05 V-memory map K0-9999; or see DL05 V-memory map - Data Words See DL05 V-memory map
DL05 Micro PLC User Manual, 6th Edition, Rev. A