Manual ADVANTECH System 8000 Chapter 13 Digital input modules - DI 16xDC24V/1C Digital input modules - DI 16xDC24V/1C Order data DI 16xDC24V/1 C Description The digital input accepts binary control signals from the process and provides an electrically isolated interface to the central bus system. It has 16 channels that indicate the respective status by means of LEDs. Additionally, the first two channels may head for counters. Properties • 16 inputs, isolated from the backplane bus • 2 inputs of this configurable as one counter, frequency or period measurement • Pull up abbr. pull down resistors are inside, so sensors with positive and negative logic can be connected. • Suitable for standard switches and proximity switches • Status indicator for each channel by means of an LED Construction ADVANTECH 8221-1BH20 [1] [2] [3] 1 Label for module name LED status indicator Edge connector 2 3 Status indicator connector assignment LED .0 ... .7 Description LEDs (green) I.0 to I.7 (per byte) A "1" signal level is recognized as of app. 15V and the respective LED is turned on Pin DI 16xDC24V/1C +0 .0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .2 .3 .4 .5 .6 .7 +1 ADAM 8221 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Assignment 1 2 3 4 L+ DC 24V or Ground*) Input I.0 / Counter (A) Input I.1 / Counter (B) Input I.2 . . . . . . 15 16 17 18 Input I.13 Input I.14 Input E 15 Ground X 2 3 4 *) DC 24V or Ground to connect sensors with positive or negative logic at I.0 or I.1 HB97E - Rev. 04/39 1 Chapter 13 Digital input modules - DI 16xDC24V/1C Circuit and schematic diagram Wiring diagram 1 Manual ADVANTECH System 8000 Schematic diagram Input I.0, I.1 (negative logic) L+, (M) Input module 2 1 R Load 3 + DC 24V - 4 5 LED 6 . . . Optocoupler DC 24V V-Bus ~ ~ 18 Mintern 17 Input I.0, I.1 (positive logic) 18 Input module M 1 R Load LED DC 24V + Optocoupler - V-Bus 18 Mintern Input I.2 … I.15 Input module Optocoupler LED 24V DC V-Bus Mintern Note! The inputs I.0 and I.1 have also internal pull up (-down) resistors, which lead to pin 1 of the connector strip. You can connect the sensors with negative logic output directly to the inputs I.0 and I.1. Here you have to supply pin 1 with DC 24V. Connect pin 1 to Ground (bridge to pin 18) when I.0 and I.1 are used as "normal" inputs with positive logic. 2 HB97E - Rev. 04/39 Manual ADVANTECH System 8000 Overview Module Functions Chapter 13 Digital input modules - DI 16xDC24V/1C The Counter Module is a 16Bit digital input module forSystem 8000 combined with a one-channel 32Bit counter. Inputs DI [0] and DI [1] are used as ‘normal’ process inputs and as counter inputs (signal A and signal B) simultaneously. Parameter Data Counter Mode Output Data DO V-BUS Load Value Byte 0 Load Value Byte 1 Load Value Byte 2 Load Value Byte 3 Control FREF Input Data DI Counter Byte 0 Counter Byte 1 Counter Byte 2 Counter Byte 3 DI Data Byte 0 32 Bit Counter A B DI(0) DI(1) DI Data Byte 1 DI(0:7) DI(8:15) By writing DO data to the module, you may preset a counter value as well as a reference frequency. The activation of this values is via control bytI. By means of 1Byte parameter data, you may set the counter modI. There are 5 counter modes supported. By read access at the according bytes of the input data, the counter state is shown. The counting is started res. stopped via the control byte (SW gate). Count Range / Limit values The counter module can count up and down. The count value is 32Bit wide and is to be interpreted as of type unsigned integer. Therefore the count limits are given as: Lower Count Limit 0 HB97E - Rev. 04/39 Upper Count Limit + 4.294.967.295 (232 – 1) 3 Chapter 13 Digital input modules - DI 16xDC24V/1C Manual ADVANTECH System 8000 Load Value It is possible to specify a load value for the counter. After loading the counter starts counting up res. down from this new value to the upper res. lower limit valuI. After receiving a new counting pulse, the counter jumps to the lower (counting up) res. upper limit (counting down) and starts the counting again. In the operation mode "Frequency Measurement" the load value is used to define the time window of the measurement. The load mechanism is controlled via the bit LOAD in the control bytI. Continuous Counting In all counter modes, a continuous counter function is used as described in the following paragraphs and as shown in figurI. If the counter reaches the upper count limit when counting up and a further count pulse is received, the counter jumps to the lower count limit and starts to add the count pulses again, meaning it counts continuously. If the counter reaches the lower count limit when counting down and a further count pulse is received, the counter jumps to the upper count limit and continues to count down from therI. The count range in all modes is 0 to +4.294.967.295 and cannot be changed. The counter starts to count at 0 when a complete restart (PowerOn Reset or VBUS-Reset) is executed on the module or the counter is cleared by setting bit CLEAR in the control bytI. Counter Value Upper Count Limit Load Value 0 4 Time HB97E - Rev. 04/39 Manual ADVANTECH System 8000 Chapter 13 Digital input modules - DI 16xDC24V/1C Counter activation via Software Gate Many applications require that the count can be started or stopped at a defined time depending on other events. This starting and stopping of the count process is done via a software gate function. If the gate is opened, count pulses can reach the counter and the count is started. If the gate is closed, count pulses can no longer reach the counter and the count is stopped. The software gate is controlled via the bits START and STOP in the Control BytI. Setting the bit START will open the software gate whereas setting the bit STOP will close the software gatI. Module access For input and output data, the module occupies each 6Byte in the address area. For setting the counter mode there are 1Byte parameter data at disposal. Loading the counter res. presetting of a reference frequency is via a control byte by typing the wanted value into the output address area and setting the Bit 2 of the control byte to activate the counter. You may see the counter value and the state of the inputs in the input address area. Also during count operation you may call all input channels. Input data DI data bytes The module has 6Byte input data that can be accessed by direct reading. Input bytes 0 to 3 are assigned to the 32Bit counter value whereas bytes 4 and 5 are assigned to the 16Bit digital inputs. Byte 0 1 2 3 4 5 HB97E - Rev. 04/39 Bit 7 ... 0 Counter Value Byte 0 Counter Value Byte 1 Counter Value Byte 2 Counter Value Byte 3 DI Data Byte 0 (I.7 ... I.0) DI Data Byte 1 (I.15 ... I.8) 5 Chapter 13 Digital input modules - DI 16xDC24V/1C Output data DO data bytes Manual ADVANTECH System 8000 The module has 6Byte output data. Byte 0 to 3 are assigned to a load value according to the selected counter modI. Byte 4 is used as control byte for the counter. Byte 5 selects a reference frequency for the counter modes "Frequency Measurement" and "Period Measurement". Byte 0 1 2 3 4 5 Bit 7 ... 0 Load Value Byte 0 Load Value Byte 1 Load Value Byte 2 Load Value Byte 3 Control Byte Reference Frequency Control Byte: Bit 0 1 2 3 4 ... 7 Function ‘1’ = START counter (the software gate is open) ‘1’ = STOP counter (the software gate is closed) ‘1’ = LOAD counter ‘1’ = CLEAR counter reserved Reference Frequency Selection: Value Reference Frequency 00h 16 MHz 01h 8 MHz 02h 4 MHz 03h 1 MHz 04h 100 kHz 05h 10 kHz 06h 1 kHz 07h 100 Hz others not allowed 6 HB97E - Rev. 04/39 Manual ADVANTECH System 8000 Parameter Data Chapter 13 Digital input modules - DI 16xDC24V/1C The module has 1Byte parameter data for selecting the counter modI. Byte 0 Bit 7 ... 0 Counter Mode Counter Mode Selection: Value 00h 01h 02h 03h 04h others Counter Mode Quadruple Pulse Evaluation Pulse and Direction Evaluation Clock Up / Clock Down Evaluation Frequency Measurement Period Measurement not allowed Counter Modes Quadruple Pulse Evaluation (Mode 00h) Quadruple evaluation means that the rising and falling edges of A and B are evaluated; whether up or down count pulses are generated depends on which channel hurries first. In this counting mode I.0 and I.1 have the following assignment and function: I.0 as channel A: If channel A hurries in front, the counter counts up. I.1 as channel B: If channel B hurries in front, the counter counts down. SW-Gate Signal A Signal B Up count pulses Down count pulses up HB97E - Rev. 04/39 down 7 Chapter 13 Digital input modules - DI 16xDC24V/1C Pulse and Direction Evaluation Mode (01h) Manual ADVANTECH System 8000 Every rising edge of A is evaluated. Channel B defines the counter direction. In this counting mode I.0 and I.1 have the following assignment and function: I.0 as channel A: Clock pulse for the counter at rising edgI. I.1 as channel B: Defines the counter direction (0 = up, 1 = down) SW-Gate Signal A Signal B Up count pulses Down count pulses up Clock Up / Clock Down Evaluation (Mode 02h) down The rising edges of channel A and B are evaluated. The counter is incremented with every rising edge of A and decremented with every rising edge of B. In this counting mode I.0 and I.1 have the following assignment and function: I.0 as channel A: Clock up pulse for the counter at rising edgI. I.1 as channel B: Clock down pulse for the counter at rising edgI. SW-Gate Signal A Signal B Up count pulses Down count pulses up 8 down HB97E - Rev. 04/39 Manual ADVANTECH System 8000 Chapter 13 Digital input modules - DI 16xDC24V/1C In frequency measurement mode, the module counts the number of rising edges of channel A received within a specified time window. Channel B is not used in this modI. The time window TW is specified indirectly by selecting a reference frequency with DO byte 5 and defining a load value in DO bytes 0 to 3: Frequency Measurement (Mode 03h) TW = 1 ∗ Load Value Reference Frequency By setting the Bit 2 of the control byte, the time window is transferred. When the counter is enabled (software gate is open), the reference counter is started with the first rising edge of channel A and is incremented with every rising edge of the reference clock. When the reference counter reaches the load value (time TW has expired), the current counter value is copied to DI byte 0 to 3 and can be read. Then the counter and the reference counter is cleared automatically and the next frequency measurement is started with the next rising edge of channel A. If there aren’t at least two rising edges of channel A within the time window TW , the counter value will be read as 0 for this measurement. Frequency measurement is started and ended by using the software gate, that is as long as the software gate is open, the frequency of channel A is measured. The counter can be cleared at any time by CLEAR=’1’ in the Control Byte while the load value stays valid until a new value is loaded or a Reset is detected. The recent frequency can be computed by using the following formula: Frequency = Reference Frequency ∗ Counter Value Load Value Tw next measurement Signal A SW-Gate Counter 0 Reference Counter 0 DI Data 1 0 1 2 m 2 3 4 5 6 n 7 0 1 1 2 3 4 5 m 0 Example: Reference Frequency : Load Value (n) : Counter Value (m) : Frequency = 1 MHz ∗ HB97E - Rev. 04/39 0 1 MHz 1.000.000 10.000 10.000 =10 kHz 1.000.000 9 Chapter 13 Digital input modules - DI 16xDC24V/1C Manual ADVANTECH System 8000 With very small frequencies, it is convenient to measure the period instead of the frequency. In the operating mode "Period Measurement", the time between two rising edges of channel A is measured by counting the number of rising edges of the selected reference clock occurring between two rising edges of channel A. Channel B is not used in this modI. Period measurement is started and ended by using the software gate, that is: as long as the software gate is open the period of channel A is measured continuously. The counter can be cleared at any time by CLEAR=’1’ in the Control BytI. The period measurement will then start again with the next rising edge of channel A. The recent signal period can be computed by using the following formula: Period Measurement (Mode 04h) Period = 1 ∗ Counter Value Reference Frequency next measurement Signal A SW-Gate Reference Counter DI Data 0 0 1 2 3 4 5 6 7 n n 0 Example: Reference Frequency : Counter Value (n) : Period = 0 0 1 2 3 4 5 n 1 MHz 10.000 1 ∗ 10.000 = 10 ms 1 MHz Note! The counter value stays valid until the next measurement is completed or the counter is cleared. If the next measurement is never completed (I.g. because the second rising edge of channel A never occurs), you will always see the ‘old’ counter value and not the current value of the Reference Counter. 10 HB97E - Rev. 04/39 Manual ADVANTECH System 8000 Technical data Chapter 13 Digital input modules - DI 16xDC24V/1C Electrical data Number of inputs Counter Rated input voltage Signal voltage "0" Signal voltage "1" Input filter time delay Input filter counter Max. frequency Input current Power supply Current consumption via backplane bus Isolation Status indicator Programming specifications Input data Output data Parameter data Diagnostic data Dimensions and weight Dimensions (WxHxD) in mm Weight HB97E - Rev. 04/39 ADVANTECH8221-1BH20 16 1 (2 inputs A, B) DC 24V (18 ... 28.8V) 0 ... 5V 15 ... 28.8V 3ms 100µs 100kHz typ. 7mA 5V via backplane bus 100mA 500Vrms (field voltage - backplane bus) via LEDs located on the front 6 Byte 6 Byte 1 Byte 25.4 x 76 x 76 50g 11