The text of a manual · part 40 of 53
DL06 Micro PLC User Manual, Volume 1 of 2, pages 390 to 399
Pages 390 to 399 of 524
The original document is the PDF (6.4 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 Direct Logic DL06 and Koyo DL06 D0-06DD1
Page 390
Chapter 5: Intelligent Box (IBox) Instructions
Analog Output Module Pointer Setup (ANLGOUT) (IB-461)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
DS5
Used
HPP
N/A
5–236
Analog Output Module Pointer Setup generates the logic to configure the pointer method for one analog output module on the first PLC scan following a Program to Run transition. This IBox determines the data format and Pointer addresses based on the CPU type, the Base#, and the Slot#. The Output Data Address is the starting location in user V-memory where the analog output data values will be placed by ladder code or external device, one location for each output channel enabled. Since this logic only executes on the first scan, this IBox cannot have any input logic. ANLGOUT Parameters • Base # (K0-Local): must be 0 for DL06 PLC • Slot #: specifies which PLC option slot is occupied by the analog module (1–4) • Number of Output Channels: specifies the number of analog output channels that will be used • Output Data Format (0-BCD 1-BIN): specifies the format of the analog output data (BCD or Binary) • Output Data Address: specifies the starting V-memory location that will be used to source the analog output data
Parameter Base # (K0-Local) . . . . . . . . . . . . . . . . . . . . . . . K Slot # . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K Number of Output Channels . . . . . . . . . . . . . . . K Output Data Format (0-BCD 1-BIN). . . . . . . . . . K Output Data Address . . . . . . . . . . . . . . . . . . . . . V
DL06 Range K0 (local base only) K1-4 K1-8 BCD: K0; Binary: K1 See DL06 V-memory map - Data Words
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 391
Chapter 5: Intelligent Box (IBox) Instructions
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.
Permissive contacts or input logic cannot be used with this instruction
DL06 Micro PLC User Manual, 3rd Edition Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–237
Page 392
Chapter 5: Intelligent Box (IBox) Instructions
Analog Scale 12 Bit BCD to BCD (ANSCL) (IB-423)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
DS5
Used
HPP
N/A
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
DL06 Range See DL06 V-memory map - Data Words K0-9999 K0-9999 See DL06 V-memory map - Data Words
ANSCL Example
5–238
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.
1
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 393
Chapter 5: Intelligent Box (IBox) Instructions
Analog Scale 12 Bit Binary to Binary (ANSCLB) (IB-403) DS5 HPP
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.
1 2 3 4 5 6 7 ANSCLB Parameters • Raw (12 bit binary): specifies the V-memory location of the unipolar unsigned raw decimal 8 unscaled value (12 bit binary = 0-4095 decimal) • High Engineering: specifies the high engineering value when the raw input is 4095 decimal 9 • 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 10 Parameter DL06 Range 11 12 13 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 - 14 high engineering value). The scaled value will be placed in V2100 in binary format. A B C D Used
N/A
Raw (12 bit binary) . . . . . . . . . . . . . . . . . . . . V,P High Engineering . . . . . . . . . . . . . . . . . . . . . . . . K Low Engineering . . . . . . . . . . . . . . . . . . . . . . . . K Engineering (binary) . . . . . . . . . . . . . . . . . . . . V,P
See DL06 V-memory map - Data Words K0-65535 K0-65535 See DL06 V-memory map - Data Words
1
DL06 Micro PLC User Manual, 3rd Edition Rev. A
5–239
Page 394
Chapter 5: Intelligent Box (IBox) Instructions
Filter Over Time - BCD (FILTER) (IB-422)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
DS5
Used
HPP
N/A
5–240
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
DL06 Range T0-377 K0-9999 See DL06 V-memory map - Data Words K1-100 See DL06 V-memory map - Data Words
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 395
Chapter 5: Intelligent Box (IBox) Instructions
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.
1
DL06 Micro PLC User Manual, 3rd Edition Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–241
Page 396
Chapter 5: Intelligent Box (IBox) Instructions
Filter Over Time - Binary (FILTERB) (IB-402)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
DS5
Used
HPP
N/A
5–242
Filter Over Time in Binary (decimal) 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 any other place 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
DL06 Range T0-377 K0-9999 See DL06 V-memory map - Data Words K1-100 See DL06 V-memory map - Data Words
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 397
Chapter 5: Intelligent Box (IBox) Instructions
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.0. 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
1
DL06 Micro PLC User Manual, 3rd Edition Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–243
Page 398
Chapter 5: Intelligent Box (IBox) Instructions
Hi/Low Alarm - BCD (HILOAL) (IB-421)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
DS5
Used
HPP
N/A
5–244
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 High-High 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
DL06 Range See DL06 V-memory map - Data Words K0-9999; or see DL06 V-memory map - Data Words See DL06 V-memory map K0-9999; or see DL06 V-memory map - Data Words See DL06 V-memory map K0-9999; or see DL06 V-memory map - Data Words See DL06 V-memory map K0-9999; or see DL06 V-memory map - Data Words See DL06 V-memory map
DL06 Micro PLC User Manual, 3rd Edition Rev. A
Page 399
Chapter 5: Intelligent Box (IBox) Instructions
HILOAL Example In the following example, the HILOAL instruction is used to monitor a BCD value that is in V2000. If the value in V2000 meets/exceeds the high limit of K900, C101 will turn on. If the value continues to increase to meet/exceed the high-high limit, C100 will turn on. Both bits would be on in this case. The high and high-high limits and alarms can be set to the same value if one “high” limit or alarm is desired to be used. If the value in V2000 meets or falls below the low limit of K200, C102 will turn on. If the value continues to decrease to meet or fall below the low-low limit of K100, C103 will turn on. Both bits would be on in this case. The low and low-low limits and alarms can be set to the same value if one “low” limit or alarm is desired to be used.
1
DL06 Micro PLC User Manual, 3rd Edition Rev. A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
5–245