Вы находитесь на странице: 1из 43

Messung Systems

NEXGEN PLC I/O Modules

NEXGEN Series of PLCs


Multi-Function Input Module (Ordering Code 4633)
Document No.:ED-2002-021 Version: 2.0 Published Nov 2003

MESSUNG SYSTEMS EL-2, J- Block MIDC Bhosari, Pune 411026.(INDIA) Tel: (+91)-020-712 0807, 712 2807. Email : marketing@ms.messung.com
WEB: www.messung.com

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 1 of 43

Messung Systems

NEXGEN PLC I/O Modules

Revision Version
1.0

Date
Nov 2003

Description
Multi Function Input Module (Ordering Code 4633) NEXGEN Series of PLCs.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 2 of 43

Messung Systems

NEXGEN PLC I/O Modules

INDEX
1 Module Overview ............................................................................................................................ 5 1.1 1.2 1.3 2 Module Overview ...................................................................................................................... 5 LED Indications......................................................................................................................... 7 General Specifications .............................................................................................................. 8

Module Operation ........................................................................................................................... 9 2.1 Block Diagram........................................................................................................................... 9 2.1.1 Normal Input................................................................................................................... 11 2.1.2 Interrupt Input ................................................................................................................. 11 2.1.3 Pulse Catch Input ........................................................................................................... 12 2.1.4 Counter Input.................................................................................................................. 13

Installation and Wiring .................................................................................................................. 17 3.1 Module Installation .................................................................................................................. 17 3.2 Connection Details.................................................................................................................. 17 3.2.1 Precautions to be taken ................................................................................................. 19

Configuration and Programming................................................................................................... 20 4.1 4.2 4.3 Configuration........................................................................................................................... 20 Data ........................................................................................................................................ 22 Programming .......................................................................................................................... 23

INDEX OF FIGURES
Figure 1: Front view of Multi Function Input Module.............................................................................. 6 Figure 2 : Block Diagram ..................................................................................................................... 10 Figure 3 : Interrupt Input ...................................................................................................................... 11 Figure 4 :Pulse Catch Input ................................................................................................................. 12 Figure 5 : Up Counter .......................................................................................................................... 13 Figure 6 : Counter Updating during MFIP FB execution...................................................................... 14 Figure 7 : Up Down Counter ................................................................................................................ 15 Figure 8 :Counting Range.................................................................................................................... 15 Figure 9 : Up / Down Counter .............................................................................................................. 16 Figure 10 : Connection Diagram of Multi Function Input Module........................................................ 18 Figure 11 :Program PLC_PRG ............................................................................................................ 39 Figure 12: Program Up Counter........................................................................................................... 40 Figure 13 :Program Up Down Counter ................................................................................................ 41

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 3 of 43

Messung Systems

NEXGEN PLC I/O Modules Guidelines for the Safety of the user and protection of I/O Module

a)

DESIGN ENGINEER Any engineer who is responsible for the planning, design, and construction of automatic equipment using the product associated with this manual should be of a competent nature, trained and qualified to the local and national standards required to fulfill the role.. These engineers should be fully aware of all the aspects of safety with regards to automated equipment. COMMISSIONING/SERVICE ENGINEER. Any engineer who is responsible for the commissioning, use and maintenance of automatic equipment using the product associated with this manual should be of a competent nature, trained and qualified to the local and national standards required to fulfill the role. This includes being completely familiar with all the associated documentation for the said system. Maintenance to be carried out in accordance to the established safety practices. OPERATORS. The personnel using the completed equipment should be trained to use the product in a safe and coordinated manner in compliance to established safety practices. They should be also familiar with documentation, which is relevant to the actual operation of the equipment. Note: The term-completed equipment refers to a third party constructed device, which contains or uses the product associated with this manual.

b)

c)

Notes on Symbols used in this Manual The following symbols will be used throughout this manual to highlight points of information regarding the users personal SAFETY and protection of the unit's integrity. The meaning of the symbols must be clearly understood and due cognizance be taken of the associated note where these symbols appear. The symbols and their descriptions are given ahead for ready reference HARDWARE RELATED 1 Indicates that the identified danger WILL cause physical and property damage. Indicates that the identified danger could POSSIBLY cause physical and property damage. Indicates a point of further interest or explanation.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 4 of 43

Messung Systems

NEXGEN PLC I/O Modules

Module Overview This chapter describes the following Module Overview LED Indications General Specifications

1.1 Module Overview


The multi function input module provides Twelve inputs with adjustable filter time. The filter time is selectable in steps of 10 ms (default), 1 ms and 100 s. The selected filter time is applicable for a group of four inputs and there are four such groups. Alternately, the inputs can be configured as two interrupt inputs, two pulse catch inputs and four reset inputs to counters. The last four inputs can be programmed as reset inputs for four 8 bit up counters. Programmable counters with external reset. The counters can be configured as o Four Up counters or o Two Up / down counters or o Two Up counters and one Up / Down counter. Maximum counter input frequency is up to 10 KHz. Inputs hardware interface for open collector (PNP or NPN, 24 or 12 VDC) inputs depending on type of connections to the module.

Multi function input module has two versions which is specified on the right side on the serial no. label. The compatibility with various types of Nexgen processor modules is explained in the table below.
Module version 1.00 NEXGEN4000V1X (OS 1.56) Yes (Configuration by Advanced Info screen in DMP) NEXGEN4000V2X NEXGEN521X (OS 2.00 onwards) No Yes (Configuration and reading by FB MFIP or functions IM_Write and IM_Read) Yes (Configuration Yes by function (Configuration and WRITE_W and reading by FB reading by MFIP or functions function READ_W IM_Write and IM_Read) NEXGEN522X Yes (Configuration and reading by FB MFIP or functions IM_Write and IM_Read) Yes (Configuration and reading by FB MFIP or functions IM_Write and IM_Read)

2.01

Yes (Configuration by Advanced Info screen in DMP)

The figure 1 shows front view of the multi function input module.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 5 of 43

Messung Systems

NEXGEN PLC I/O Modules

Terminal Block Fixing Screw Module Status LED

Front Shield Plate

Input Status LEDs 38 Pin Removable Terminal Block

IO Label

Terminal Block Fixing Screw Input Status LEDs Wiring Label

Figure 1: Front view of Multi Function Input Module

The module provides LED indications on the front side. Brief information about inputs can be written on the front door. Behind the front door, 38-pin removable terminal block is provided for interfacing. The wiring details are shown on backside of door. The multi-function input module can be configured in any slot of the PLC. The number of the multi-function input modules is limited by back panel current capacity. The input signals are optically isolated and filtered. The multi-function input module provides various configuration options. These options along-with corresponding inputs are given in a tabular form below.
Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0 Published Nov 2003 Page 6 of 43

Messung Systems

NEXGEN PLC I/O Modules Input No. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Primary function Programmable Filter Time Programmable Filter Time Programmable Filter Time Programmable Filter Time Programmable Filter Time Programmable Filter Time Programmable Filter Time Programmable Filter Time Programmable Filter Time Programmable Filter Time Programmable Filter Time Programmable Filter Time Counter 0 Counter 1 / Direction Input Counter 2 Counter 3/ Direction Input Special function Interrupt Input Interrupt Input Pulse Catch Input Pulse Catch Input No alternate function No alternate function No alternate function No alternate function Reset to Counter 0 Reset to Counter 1 Reset to Counter 2 Reset to Counter 3 No alternate function No alternate function No alternate function No alternate function

1.

1.2 LED Indications


The following table explains significance of LEDs provided on the module.
LED Error (1) Inputs (16) One for each input Color Yellow Green Status OFF ON OFF ON Description Module Healthy and configured. Module Hardware Fault Module not configured Input OFF Input ON

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 7 of 43

Messung Systems

NEXGEN PLC I/O Modules

1.3 General Specifications


The general specifications of the multi function input module are as below
Input type Channels Filter Time Voltage Level High Low (min) (max) Remark

Digital

Programmable Filter Time Pulse catch Up Counter with programmable reset

12 (max) 2 4

Up-Down counter with direction input and programmable reset General Maximum frequency Indications Type of inputs Isolation Back plane current IO points consumed Terminal connection Ordering code

100 sec, 1ms, 18 V 10 ms (Default) 500 sec 10 s (default), 100 s, 1ms, 10 ms 18/9 V 10 s (default), 100 s, 1ms, 10 ms

5V

Counter

24 V field interface. Input types can be selected in groups of 4. 24 / 12 V field interface. These are accumulating type counters. 24 / 12 V field interface. The counter has external direction input.

5/4 V

10 KHz 3 mm Green LED for each input provided on digital side 3 mm orange LED for error Sink / Source selectable as per group connection Optical (1.5 KV from internal bus) 205 mA 16 Removable 38-pin terminal block 4633

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 8 of 43

Messung Systems

NEXGEN PLC I/O Modules

Module Operation This chapter describes the basic operation of the module. This chapter explains operational details of Normal Input Pulse Catch Input Up Counter Mode Up Down Counter Mode

2.1

Block Diagram The module operation is controlled by the configuration written by the application program. During PLC scan, the module can be configured by executing IM_Write / WRITE_W instruction. Refer chapter 4 for configuration and programming details. Depending upon the configuration, mode selection circuit configures the functionality of the inputs and counters. All the input signals are optically isolated. The details of operation are discussed in subsequent sections. In Nexgen 4000 Processor (version 1.56), the Processor writes configuration to the multi function input module (ver. 1.00) during warm start initialization and cold start initialization. The user can configure the module from the advanced configuration screen provided in programming software DOXMINI+. In DOXMINI+, PLC type selected is NEXGEN4000V1X. Also, user can define PLC variables to hold the counter values. This configuration information is downloaded to the Processor module along with the application program. The Processor reads the counter values from the module in every input scan and updates the user defined PLC variables as per the configuration. There is no need to write any application program to configure and read the multi function input module. In Nexgen 4000 Processor (version 2.00 onwards), the user can configure the multi function input module (ver. 2.01) by executing WRITE_W instruction. The counter values can be read and manipulated in the application program by executing READ_W instruction. These instructions are supported in the programming software DOXMINI+ (version 2.00 onwards) for the PLC type NEXGEN4000V2X. The multi function input module (ver. 1.00) can not be used with Nexgen 4000 Processor (version 2.00 onwards) In Nexgen 5000 Processor, the user can configure the multi function input module (ver. 1.00) by executing FB MFIP from MFIP library and can be programmed by programming software CoDeSys (version 2.2 onwards). In Nexgen 5000 Processor, the user can configure the multi function input module (ver. 2.01) by executing IM_Write function or FB MFIP. The counter values can be read and manipulated in the application program by executing function IM_read.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 9 of 43

Messung Systems Normal Input 0 Interrupt 0 Normal Input 1 Interrupt 1 Normal Input 2 Pulse Catch 2 Normal Input 3 Pulse Catch 3 Normal Input 4 Mode Selection Circuit Mode Selection Circuit Mode Selection Circuit Mode Selection Circuit

NEXGEN PLC I/O Modules

Optical Isolation

Input 0

Optical Isolation

Input 1

Optical Isolation

Input 2

Optical Isolation Optical Isolation Optical Isolation

Input 3

Input 4 Input 7

Normal Input 7 Normal Input 8

CPU Interface Circuit

Counter 1

Reset Pulse In Direction Pulse Out

Input 8 Input 12
Mode Selection Circuit Optical Isolation

Normal Input 9 Counter 2 Reset Pulse In Direction Pulse Out

Input 9 Input 13

Normal Input 8 Counter 1 Reset Pulse In Direction Pulse Out

Input 10 Input 14
Mode Selection Circuit Optical Isolation

Normal Input 9 Counter 2 Reset Pulse In Direction Pulse Out

Input 11 Input 15

Figure 2 : Block Diagram

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 10 of 43

Messung Systems

NEXGEN PLC I/O Modules

2.1.1

Normal Input Normally input filter time of input is 10 msec. The filter time adds delay in taking relevant control action after sensing the input. In order to interface fast input, this module can be used. The available filter times are 100 s, 1 ms and 10 ms. The module provides 12 programmable filter time inputs and 4 counters. These are divided in four groups each group having four inputs. The filter time of inputs can be set group wise. If the input is programmed to have special function i.e. interrupt, pulse catch or reset to counter, then the filter time for special function overrides group filter time setting.

2.1.2

Interrupt Input In general, the Processor module of the PLC reads all the inputs in input scan. Subsequently these inputs are processed in the logic scan and related action is taken. However, some inputs demand instant action from the control system. Such inputs can be connected to the interrupt inputs of this module. Upon activation of these inputs, relevant Interrupt task is instantly executed depending upon interrupts priority. The execution of the interrupt task is asynchronous to the PLC scan cycle. The module provides two user configurable Interrupt Inputs, Input 0 and Input 1. The input should be ON for at least 500 s for proper recognition and action by the operating system. The following figure describes operational details of Interrupt input.
PLC scan PLC scan PLC scan

Field Input

Interrupt Task

500 s Figure 3 : Interrupt Input

The PLC operating system keeps on performing PLC scan cyclically. As the interrupt input activates, the operating system puts related interrupt task for execution. After interrupt task execution, the PLC resumes from where it left. The interrupt input is latched and need to be cleared in the application program. After clearing the interrupt input, control logic is again set to generate interrupt event. Nexgen 522x series of the Processor modules support interrupt event execution. For more details, refer ED-2000-068 Events Library User Manual.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 11 of 43

Messung Systems

NEXGEN PLC I/O Modules

2.1.3

Pulse Catch Input Normally the input remains on for sufficient time. This time is very large as compared to sum of input filter and PLC scan time. In such case the input can be detected with standard digital input module. Sometimes input remains on for very short time. This time is very less as compared to standard filter time and PLC scan time. Such inputs can be connected to pulse catch input of the module. The module can detect a pulse as short as 500 s. The module provides two inputs 2 and 3 as configurable pulse catch inputs individually. The status of these inputs is available in input image. The following figure describes operation of pulse catch input.
PLC Scan Input Image Status Field Input 500 s Figure 4 :Pulse Catch Input This pulse is ignored PLC Scan PLC Scan PLC Scan PLC Scan PLC Scan

The pulse catch input latches the pulse till it is read in subsequent input scan in Nexgen 4000 CPUs. After reading the pulse catch, control logic is again set to catch next pulse. As can be noticed, if additional pulses occur after latching of the first pulse and reading of the same, then these pulses are not recognized. Thus the time between two consecutive pulses should be more than the PLC scan time. In Nexgen 5000 CPU, the latched input needs to be cleared in the application program so that next pulse catch input is detected.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 12 of 43

Messung Systems

NEXGEN PLC I/O Modules

2.1.4

Counter Input The module provides two modes of counting operation Up counter mode Up down counter mode

2.1.4.1

Up Counter Mode The module provides four 8-bit counters with programmable reset input. The range of counter is 0 to 255. The maximum frequency that can be counted is 10 KHz. The counters can be configured for required mode of operation. The configuration of the module is done through MFIP Function Block. The hardware counter value is read through MFIP Function Block. The reset input clears hardware counter. The pulse width of reset input should be more than the filter time of associated input group. The reset input, if not used as reset input, can be used as normal input with adjustable filter time. The MFIP Function Block encapsulates total handling of the MultiFunction Module as shown below
Module Configuration WRITE Operation Mode Selection Circuit 8-Bit Hardware Counter Reset Pulses

READ Operation

Status of Reset Counter Data Figure 5 : Up Counter

. Hardware counter counts up to 255. When counter reaches the maximum value i.e. 255, it rolls over to 0. As overflow indication is not available, care should be taken to use counter in operational range to avoid unpredictable results. FB MFIP reads hardware counter value which is available in 8 bit register array. When ever counter value is read, it is stored in user defined register array and hardware counter is cleared. In this way every time when ever hardware counter is read using FB MFIP, difference count (i.e. count from last FB call to current call) is available. So this count has to be accumulated in user defined register by externally adding current count to previously accumulated count. When reset input is TRUE, hardware counter is cleared and reset status is latched. When ever reset status is read in the input scan, the latch is cleared in Nexgen 4000 (PLC type NEXGEN4000V1X). In Nexgen 4000 (PLC type NEXGEN4000V2X) CPU and Nexgen 5000 CPU, the latched reset input need to be cleared in the application program. This provision is useful as external reset input when TRUE, clears the counter asynchronous to PLC scan and counter can count further pulses if reset input is FALSE again. In such a case, the status of external reset input is available till subsequent FB MFIP execution. If reset input status is detected as TRUE, user should transfer hardware counter value to user defined register instead of adding to previous count. The following figure explains the operation of counter.
Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0 Published Nov 2003 Page 13 of 43

Messung Systems

NEXGEN PLC I/O Modules

Counter updating during FB MFIP execution

Reset Input

Pulse Input

Pulses Counted

7 Pulses Accumulated

3 Pulses Accumulated 2 Pulses Accumulated 5

Pulses Accumulated 14

0
Accumulated Count

Figure 6 : Counter Updating during MFIP FB execution

2.1.4.2

Up Down Counter Mode The module realizes up down counter by cascading two 8bit counters. Counter 0 & 1 form one Up / Down counter and counter 2 & 3 form second. The range of counter is 0 to 65535. The hardware counter value and reset input status can be read by executing READ_W instruction. The reset input clears hardware counter. The reset input, if not configured as reset input, can be used as normal input or pulse catch input. Also the reset inputs of unused 8-bit counters i.e. counter 2 and counter 4 can be used as normal inputs with adjustable filter time. The figure 7 shows the block diagram and counting range.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 14 of 43

Messung Systems Module Configuration

NEXGEN PLC I/O Modules

WRITE Operation

Mode Selection Circuit Cascaded 16bit hardware counters

Reset Pulses Direction

FB MFIP
READ Operation

Status of Reset Input

16 bit Counter Data

Figure 7 : Up Down Counter

Up Down 0
Figure 8 :Counting Range

65535

The operation of up / down counter is as below. Direction 1 0 x X Pulses Reset 0 0 1 Action Count up Count down Reset counter

At rising edge of incoming pulses, depending on status of direction input 0 or 1, counter counts up or down.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 15 of 43

Messung Systems

NEXGEN PLC I/O Modules

The following figure explains the operation of counter Counter Updating during PLC Scan Reset Input Direction Input Pulse Input Pulses Counted Pulses Copied to register

3 -4 Pulses Copied

4 Pulses Copied 4

6 Pulses Copied 2 Pulses Copied 8

Figure 9 : Up / Down Counter

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 16 of 43

Messung Systems

NEXGEN PLC I/O Modules

Installation and Wiring This chapter provides the following information Module Installation Connection Details

3.1

Module Installation The installation procedure for multi function input module is same as any other discrete I/O module. Put the module in to the desired slot of the PLC. Tighten the screw provided at the top of the module. Connect the terminal block at the front of the module and tighten it.

3.2

Connection Details The figure shows the connection diagram of multi function input module.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 17 of 43

Messung Systems

NEXGEN PLC I/O Modules

PNP type of Input device

NPN type of Input device

GND +24 VDC

Figure 10 : Connection Diagram of Multi Function Input Module

To the module, NPN and PNP type of input interface is provided. For counter inputs, 12V or 24 VDC input can be connected. The input devices can be connected for source or sink type of operation in groups. For counter, individual input can be connected for sink or source operation (12 or 24 VDC). In the figure, first 4 inputs are connected for source type of operation with ground connected to terminal no. 5. Next 4 inputs are connected for sink type of operation with 24 VDC connected to terminal no. 10. The figure shows the counter input connections. PNP type of device is connected to counter0 and NPN type of device is connected to counter1.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 18 of 43

Messung Systems

NEXGEN PLC I/O Modules

3.2.1

Precautions to be taken All the normal precautions concerning the wiring and protection of an electronic equipment in an industrial environment should be observed. To guard against coupling noise from one conductor to another, follow the guidelines given below. Inside control panel Following guidelines to be observed inside control panel. All power circuit wiring e.g. connected to Power Supply Module, power contactors, etc i.e. high voltage wiring should be kept separate and apart from high frequency counter input signals. Digital Input wiring and Digital Output wiring (especially, relay output and AC output) should be separately bundled and kept as apart as possible from high frequency counter input signals. High frequency counter input signals should be carried through shielded cables.

Outside control panel Following guidelines to be observed outside control panel. Depending upon the type of modules used in PLC, separate ducts should be provided for Power circuit wiring and power cables. Input cables Output cables All cables carrying high frequency signals.

Wherever possible, it is recommended to Avoid parallel routing of cables carrying analog signals and power cables, etc over long distances. Ensure that cables carrying analog signals cross at right angles to power cables so that minimum length of cable will be in close vicinity of power cables. Run cables on metallic surfaces. Avoid number of joints. Keep cable lengths as short as possible.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 19 of 43

Messung Systems

NEXGEN PLC I/O Modules

Configuration and Programming This chapter describes the configuration settings as required from programming point of view. The topics covered are as mentioned below Configuration of the module Data Programming

4.1

Configuration To configure the module, it is necessary to write appropriate configuration data to specific memory of the module. The inputs are grouped in 4 groups. Input 0 to 3 form Group0. Input 4 to 7 form Group1 and so on. The subsequent sections explain the details. Module Byte MB 20H The module byte 20H holds configuration of inputs from group 0. Input 0 and 1 can be configured as normal or interrupt input individually. Input 2 and 3 can be configured as normal or pulse catch input individually. The module byte 20H holds configuration information as shown in the table below.
Item Description Input 0 as normal input Input 0 as interrupt input Input 1 as normal input Input 1 as interrupt input Input 2 as normal input Input 2 as pulse catch input Input 3 as normal input Input 3 as pulse catch input -7 6 5 4 3 2 1 0 1 0 1 0 1 0 0 0 0 0 0 1

Group 0 Input Modes

Res

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 20 of 43

Messung Systems

NEXGEN PLC I/O Modules

Module Byte MB 21H The module byte 21H holds configuration of inputs from group 2 and group 3. Inputs 8, 9, 10 and 11 can be configured as normal or reset to counter input individually. Inputs 12, 13, 14 and 15 are counter inputs and can be configured as up counter or up down counter. The module byte 21H holds counter configuration information as shown in the table below.
Item Description Channel 8 as normal input Channel 8 as reset to counter input Channel 9 as normal input Channel 9 as reset to counter input Channel 10 as normal input Channel 10 as reset to counter input Channel 11 as normal input Channel 11 as reset to counter input Channel 12, 13 as Up counters Channel 12, 13 Up Down counter Channel 14, 15 as Up counters Channel 14, 15 as Up Down counter 7 6 5 4 3 0 1 0 1 0 1 0 0 0 0 0 1 0 1 2 0 1 1 0

Group 2 Input Modes

Group 3 Input Modes

Module Byte MB 22H For the normal inputs, delay is programmable as 0.1 ms or 1 ms or 10 ms group wise. Group 1 can be configured only as normal inputs. The module byte 22H holds group wise programmable delay configuration information as shown in the table below.
Item Group 0 Description 10 ms delay 1 ms delay 0.1 ms delay Invalid 10 ms delay 1 ms delay 0.1 ms delay Invalid 0.01 ms delay 0.1 ms delay 1 ms delay 10 ms delay 0.01 ms delay 0.1 ms delay 1 ms delay 10 ms delay 7 6 5 4 3 2 1 0 0 1 1 0 0 1 0 1

Group 1 Group Delays

0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1

0 1 0 1

Group 2

Group 3

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 21 of 43

Messung Systems

NEXGEN PLC I/O Modules

Module Byte MB 24H The special inputs like interrupt input, pulse catch input and reset to counter input is latched when it is 1 and is available in the input image. The latch should be cleared in the application program when special inputs are read from the input image. This facilitates to sense the fast inputs in the application program. After clearing the latch, module is ready for next input detection. After sensing the special input as 1, application program should write 1 at respective bit position of the module byte 24H. This clears the respective latch. The table below shows which bit clears particular latched input.
Description Clear interrupt input 0 latch Clear interrupt input 1 latch Clear pulse catch input 2 latch Clear pulse catch input 3 latch Latch Clear Clear reset input 8 latch Clear reset input 9 latch Clear reset input 10 latch Clear reset input 11 latch Item 7 6 5 4 3 2 1 1 1 1 1 1 1 1 0 1

4.2

Data All the inputs are also mapped in the input image which is updated in every input scan or on demand in the application program. For the counters, count data is stored in module byte 0 to 3.
MB 0H MB 1H MB 2H MB 3H Counter 0 data Counter 1 data Counter 2 data Counter 3 data

This data need to be manipulated as explained the subsequent topics of programming.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 22 of 43

Messung Systems

NEXGEN PLC I/O Modules

4.3

Programming As explained earlier, module has two versions as 1.00 and 2.01. The module can be used with NEXGEN4000 as well as Nexgen5000 CPUs. The subsequent topics explain how to handle the module version operation for different types of CPUs. NEXGEN4000V1X with module version 1.00 NEXGEN4000V1X CPU has operating system version 1.56. The module version 1.00 or 2.01 can be configured in any slot using advanced information configuration screen in the programming software DOXMINI+. In Advanced Information, the operating modes of counters and special functionality like pulse catch input or reset to counter can be set. The figure below shows a typical screen of DOXMINI+ software for configuring the multi function Input module.

Check the inputs that are to be used as pulse catch. The associated inputs are shown in circular bracket. The interrupt handling is not supported for this CPU. Group Filter Time The adjustable input filter time can be set in-groups of four. The associated inputs are shown in circular bracket. Select the required filter time from available options. Options available for first twelve inputs are 100 s, 1 ms, 10 ms. Options available for counter inputs are 10 s, 100 s, 1 ms, 10 ms

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 23 of 43

Messung Systems

NEXGEN PLC I/O Modules

Counter The operating modes of timers can be set here. Following configurations are provided for counters. Four Up counters or Two Up / down counters or Two Up counters and one Up / Down counter. Information at Address Enter the address where counter information is to be stored. Depending on counter setting, the operating system consumes subsequent words. The operating system consumes 2 bytes per Up counter or Up / Down counter. For the same consecutive words are used as given below. Suppose MW100 is programmed as user defined register then Case 1: 4 x Up counter MW100 is assigned to Counter 0 MW102 is assigned to Counter 1 MW104 is assigned to Counter 2 MW106 is assigned to Counter 3 Case 2: 2 x Up / Down counter MW100 is assigned to Counter 0 MW102 is assigned to Counter 2 Case 3: 2 x Up counter and 1 x Up/ Down counter MW100 is assigned to Up Counter 0 MW102 is assigned to Up Counter 1 MW104 is assigned to Up/ Down Counter Periodic / Cyclic Updation Counter updation once in a PLC scan or periodically (after 10 msec) can be selected depending upon scan time of PLC and frequency of incoming pulses. In cyclic updation, the counter is read and user defined register is updated at the end of PLC scan. In periodic updation, the counter is read and updated every 10 msec. This updation is asynchronous to PLC scan. If periodic updation is selected, it will be applicable for all the four counters. The module configuration along-with the application program is downloaded to the CPU of the PLC. CPU writes configuration to the multi-function input module on every power on and after program modification (downloading, program transfer through keyboard etc).

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 24 of 43

Messung Systems

NEXGEN PLC I/O Modules

Input and Memory data mapping The module consumes 2 bytes of input image. The status of input variables when the inputs are configured as normal inputs is same as discrete input module. The counter inputs are also mapped in the input image. The operating system updates the values of counters periodically asynchronous to the PLC scan. Depending on counter modes, the operating system consumes successive words. For each Up or Up/ Down counter, the operating system consumes one subsequent word. The various cases are explained below. It is assumed that MW10 is entered in this field. Case 1: 4 x Up counter - 4 Subsequent words are consumed. Case 2: 2 x Up / Down counter - 2 Subsequent words are consumed Case 3: 2 x Up counter and 1 x Up/ Down counter - 3 Subsequent words are consumed

NEXGEN4000V2X with module version 2.01 NEXGEN4000V2X CPU has operating system version 2.00 onwards. The module version 1.00 is not configurable and hence not used with this CPU. The module version 2.01 can be configured in any slot using WRITE_W function. The Advanced information configuration screen in the programming software DOXMINI+ should be programmed with dummy entries. The module data can be read using READ_W function. The following example shows the configuration and handling of 4 up counters The table below gives the declaration of global variable used in the program.
Project : MFIPTST1 Global Variables -----------------Symbol Address Data_type Init_val Comment -----------------------------------------------------------------------------INIT MX0.0 BIT CFG_WREN MX0.1 BIT CFG_WRDN MX0.2 BIT DATA_RD MX0.3 BIT CLEAR0 MX1.0 BIT CLEAR1 MX1.1 BIT CLEAR2 MX1.2 BIT CLEAR3 MX1.3 BIT DATA0 MB10 BYTE DATA1 MB11 BYTE DATA2 MB12 BYTE DATA3 MB13 BYTE WENABLE MW2 WORD $0 WDISABLE MW4 WORD $2 CONFIG MW6 WORD $CC00 DATA MW10 INT CNTR0 MD120 DOUBLE_WORD CNTR1 MD124 DOUBLE_WORD CNTR2 MD128 DOUBLE_WORD CNTR3 MD132 DOUBLE_WORD Global Variable

The ladder rungs in the subsequent pages explains the program along with self explanatory rung description.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 25 of 43

Messung Systems NEXGEN PLC I/O Modules Rung no 1 Rung description : This rung informs module that it is configuring the module INIT ------ WRITE_W ---CFG_WREN +---|/|---| EN ENO|-+---------+---------+---------+---------+---( )--| | | | #0 | SLOT | | | | | WENABLE| DATA | | | | | #1 | LEN | | | | | $42 | ADDR | | | ------------------Rung no 2 Rung description : This rung writes two byte configuration information of group 2 and 3. Here, configuration data $CC00 is written so that counters are configured as 4 up counters without reset input. INIT CFG_WREN ------ WRITE_W ---CFG_WRDN +---|/|---+---| |---| EN ENO|-+---------+---------+---------+---( )--| | | | #0 | SLOT | | | | | CONFIG | DATA | | | | | #1 | LEN | | | | | $20 | ADDR | | | ------------------Rung no 3 Rung description : Once the configuration is written successfully, the module is informed so. BOOLean variable INIT is 1 when configuration activity is completed in all respects. INIT CFG_WRDN ------ WRITE_W ---INIT +---|/|---+---| |---| EN ENO|-+---------+---------+---------+---(S)--| | | | #0 | SLOT | | | | | WDISABLE| DATA | | | | | #1 | LEN | | | | | $42 | ADDR | | | -------------------

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 26 of 43

Messung Systems NEXGEN PLC I/O Modules Rung no 4 Rung description : Once INIT is 1, counter data (4 bytes) is read and stored at DATA mapped at MW10. INIT ------ READ_W ----DATA_RD +---| |---| EN ENO|-+---------+---------+---------+---------+---( )--| | | | #0 | SLOT | | | | | #0 | ADDR | | | | | #2 | LEN | | | | | DATA | DATA | | | ------------------Rung no 5 Rung description : After reading data, counter 0 data is accumulated and stored in CNTR0 mapped at MD120. Rungs 5 to 8 are programmed to accumulated the count. DATA_RD ------- ADD_B ----+---| |---| EN ENO|| | | | DATA0 | DAT1 DOUT|| | | | MB120 | DAT2 | | | ------------------Rung no 6 Rung description : DATA_RD ------ ADDC_B ----+---| |---| EN ENO|| | | | MB121 | DAT1 DOUT|| | | | #0 | DAT2 | | | ------------------Rung no 7 Rung description : DATA_RD ------ ADDC_B ----+---| |---| EN ENO|| | | | MB122 | DAT1 DOUT|| | | | #0 | DAT2 | | | -------------------

MB120

MB121

MB122

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 27 of 43

Messung Systems Rung no 8 Rung description : DATA_RD ------ ADDC_B ----+---| |---| EN ENO|| | | | MB123 | DAT1 DOUT|| | | | #0 | DAT2 | | | -------------------

NEXGEN PLC I/O Modules

MB123

Rung no 9 Rung description : After reading data, counter 1 data is accumulated and stored in CNTR1 mapped at MD124. Rungs 9 to 12 are programmed to accumulated the count. DATA_RD ------- ADD_B ----+---| |---| EN ENO|| | | | DATA1 | DAT1 DOUT|| | | | MB124 | DAT2 | | | ------------------Rung no 10 Rung description : DATA_RD ------ ADDC_B ----+---| |---| EN ENO|| | | | MB125 | DAT1 DOUT|| | | | #0 | DAT2 | | | ------------------Rung no 11 Rung description : DATA_RD ------ ADDC_B ----+---| |---| EN ENO|| | | | MB126 | DAT1 DOUT|| | | | #0 | DAT2 | | | -------------------

MB124

MB125

MB126

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 28 of 43

Messung Systems Rung no 12 Rung description :

NEXGEN PLC I/O Modules

DATA_RD ------ ADDC_B ----+---| |---| EN ENO|| | | | MB127 | DAT1 DOUT|MB127 | | | | #0 | DAT2 | | | ------------------Rung no 13 Rung description : After reading data, counter 2 data is accumulated and stored in CNTR2 mapped at MD128. Rungs 13 to 16 are programmed to accumulated the count. DATA_RD ------- ADD_B ----+---| |---| EN ENO|| | | | DATA2 | DAT1 DOUT|| | | | MB128 | DAT2 | | | ------------------Rung no 14 Rung description : DATA_RD ------ ADDC_B ----+---| |---| EN ENO|| | | | MB129 | DAT1 DOUT|| | | | #0 | DAT2 | | | ------------------Rung no 15 Rung description : DATA_RD ------ ADDC_B ----+---| |---| EN ENO|| | | | MB130 | DAT1 DOUT|| | | | #0 | DAT2 | | | -------------------

MB128

MB129

MB130

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 29 of 43

Messung Systems MFIP_CFG : Rung no 16 Rung description :

NEXGEN PLC I/O Modules

DATA_RD ------ ADDC_B ----+---| |---| EN ENO|| | | | MB131 | DAT1 DOUT|MB131 | | | | #0 | DAT2 | | | ------------------Rung no 17 Rung description : After reading data, counter 3 data is accumulated and stored in CNTR3 mapped at MD132. Rungs 17 to 20 are programmed to accumulated the count. DATA_RD ------- ADD_B ----+---| |---| EN ENO|| | | | DATA3 | DAT1 DOUT|| | | | MB132 | DAT2 | | | ------------------Rung no 18 Rung description : DATA_RD ------ ADDC_B ----+---| |---| EN ENO|| | | | MB133 | DAT1 DOUT|| | | | #0 | DAT2 | | | ------------------Rung no 19 Rung description : DATA_RD ------ ADDC_B ----+---| |---| EN ENO|| | | | MB134 | DAT1 DOUT|| | | | #0 | DAT2 | | | -------------------

MB132

MB133

MB134

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 30 of 43

Messung Systems Rung no 20 Rung description :

NEXGEN PLC I/O Modules

DATA_RD ------ ADDC_B ----+---| |---| EN ENO|| | | | MB135 | DAT1 DOUT|MB135 | | | | #0 | DAT2 | | | ------------------Rung no 21 Rung description : Counter can be reset in the application program by moving 0 to the accumulator. The rungs 21 to 24 are programmed to move 0 to accumulator when the respective condition is satisfied in the application program. CLEAR0 ------ MOVE_D ----+---| |---| EN ENO|| | | | #0 | DAT1 DOUT|| | ------------------Rung no 22 Rung description : CLEAR1 ------ MOVE_D ----+---| |---| EN ENO|| | | | #0 | DAT1 DOUT|| | ------------------Rung no 23 Rung description : CLEAR2 ------ MOVE_D ----+---| |---| EN ENO|| | | | #0 | DAT1 DOUT|| | ------------------Rung no 24 Rung description : CLEAR3 ------ MOVE_D ----+---| |---| EN ENO|| | | | #0 | DAT1 DOUT|| | -------------------

CNTR0

CNTR1

CNTR2

CNTR3

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 31 of 43

Messung Systems

NEXGEN PLC I/O Modules

The following example shows the configuration and handling of 2 up down counters with reset. The table below gives the declaration of global variable used in the program.
Global Variables -----------------Symbol Address Data_type Init_val Comment -----------------------------------------------------------------------------INIT MX0.0 BIT CFG_WREN MX0.1 BIT CFG_WRDN MX0.2 BIT DATA_RD MX0.3 BIT CLEAR0 MX0.4 BIT CLEAR1 MX0.5 BIT CLEAR2 MX0.6 BIT CLEAR3 MX0.7 BIT WENABLE MW2 WORD $0 WDISABLE MW4 WORD $2 CONFIG MW6 WORD $5500 DATA1 MW10 INT DATA2 MW12 INT RSTCLR0 MW20 WORD $10 RSTCLR1 MW22 WORD $20 RSTCLR2 MW24 WORD $40 RSTCLR3 MW26 WORD $80

The ladder rungs in the subsequent pages explains the program along with self explanatory rung description
Rung no 1 Rung description : This rung informs module that it is configuring the module INIT ------ WRITE_W ---CFG_WREN +---|/|---| EN ENO|-+---------+---------+---------+---------+---( )--| | | | #0 | SLOT | | | | | WENABLE| DATA | | | | | #1 | LEN | | | | | $42 | ADDR | | | -------------------

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 32 of 43

Messung Systems NEXGEN PLC I/O Modules Rung no 2 Rung description : This rung writes two byte configuration information of group 2 and 3. Here, configuration data $DDF0 is written so that counters are configured as 2 up down counters with reset input. INIT CFG_WREN ------ WRITE_W ---CFG_WRDN +---|/|---+---| |---| EN ENO|-+---------+---------+---------+---( )--| | | | #0 | SLOT | | | | | CONFIG | DATA | | | | | #1 | LEN | | | | | $20 | ADDR | | | ------------------Rung no 3 Rung description : Once the configuration is written successfully, the module is informed so. BOOLean variable INIT is 1 when configuration activity is completed in all respects. INIT CFG_WRDN ------ WRITE_W ---INIT +---|/|---+---| |---| EN ENO|-+---------+---------+---------+---(S)--| | | | #0 | SLOT | | | | | WDISABLE| DATA | | | | | #1 | LEN | | | | | $42 | ADDR | | | ------------------Rung no 4 Rung description : Once INIT is 1, counter data (4 bytes) is read and stored at DATA1 mapped at MW10 and DATA2 mapped at MW12. INIT ------ READ_W ----DATA_RD +---| |---| EN ENO|-+---------+---------+---------+---------+---( )--| | | | #0 | SLOT | | | | | #0 | ADDR | | | | | #2 | LEN | | | | | DATA1 | DATA | | | -------------------

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 33 of 43

Messung Systems NEXGEN PLC I/O Modules Rung no 5 Rung description : When Reset input to up down counter 0 is sensed, respective input becomes 1. The required action can be programmed in the application program and latch is cleared by writing $1 to module memory byte 25. INIT IX1.0 ------ WRITE_W ---CLEAR0 +---| |---+---| |---| EN ENO|-+---------+---------+---------+---( )--| | | | #0 | SLOT | | | | | RSTCLR0| DATA | | | | | #1 | LEN | | | | | $24 | ADDR | | | ------------------Rung no 6 Rung description : When Reset input to up down counter 1 is sensed, respective input becomes 1. The required action can be programmed in the application program and latch is cleared by writing $4 to module memory byte 25. INIT IX1.2 ------ WRITE_W ---CLEAR2 +---| |---+---| |---| EN ENO|-+---------+---------+---------+---( )--| | | | #0 | SLOT | | | | | RSTCLR2| DATA | | | | | #1 | LEN | | | | | $24 | ADDR | | | -------------------

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 34 of 43

Messung Systems

NEXGEN PLC I/O Modules

NEXGEN5000 with module version 1.00 or 2.01 FB MFIP from MFIP library is used to configure multi function input module. The 4 byte data is manipulated externally. The Module is configured by writing three different configurations bytes on the module through FB MFIP as shown below

Description of ParametersRUN VAR_IN BOOL This input should be TRUE for accessing the Multi Function Module. On rising edge of this input, the configuration bytes are written to the module. Then from next scan onwards, the counter data from the module is read and available at Output parameter aCNTR This parameter defines the slot number of the MFIP module. The valid Slot numbers are 0-31. This byte defines the configuration of first four I/Ps. The details are explained in following table. This byte defines the configuration of counter modes. The details are explained in following table. This byte defines the filter delays applicable for four different groups of I/Ps. Details are explained on following pages. It is TRUE when the MFIP module is present in the defined SLOT and it is healthy. As long as this O/P is TRUE, the counter values are properly read from the module. This O/P is TRUE if the identity of the module present is defined SLOT is not matching with that of MFIP module. Even if the SLOT is empty or the module is faulty, then this O/P is TRUE. This O/P is TRUE if the module is not properly configured. In working condition of the module, this O/P is FALSE.

SLOT INTR_PULSE_ CONFIG COUNTER_ CONFIG PROG_DELAY_ CONFIG DONE

VAR_IN VAR_IN VAR_IN VAR_IN

BYTE BYTE BYTE BYTE

VAR_OUT BOOL

IO_ERR

VAR_OUT BOOL

CONFIG_ERR aCNTR

VAR_OUT BOOL

VAR_OUT ARRAY This array holds the values of four counter bytes read from the [0..3] OF module. These values should be interpreted as per counter BYTE modes defined by COUNTER_CONFIG. Detail explanation is given on following pages.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 35 of 43

Messung Systems

NEXGEN PLC I/O Modules

Interrupt and Pulse Catch Configuration byte- INTR_PULSE_CONFIG This parameter of the MFIP FB defines the type of Input for GR-0 (CH 0 to CH 3). It specifies whether the inputs are to be used as Programmable Delay Input or Special Function Input. Special Functions for Inputs in GR-0 are CH 0 - Interrupt Input CH 1 - Interrupt Input CH 2 - Pulse Catch Input CH 3 - Pulse Catch Input If the inputs are defined as Programmable Delay Inputs, then PROG_DELAY_CONFIG byte defines the delay (filter time). If the inputs are defined as Special inputs, then once the input is sensed it gets latched and it is to be cleared by CPU after reading it.
D7 D6 D5 D4 D3 D2 D1 D0

Reserved CH 3

0 1
CH 2

Programmable Delay Input Special Input as Pulse Catch Input

0 1
CH 1

Programmable Delay Input Special Input as Pulse Catch Input

0 1
CH 0

Programmable Delay Input Special Input as Interrupt Input

0 1

Programmable Delay Input Special Input as Interrupt Input

Counter Mode Configuration byte- COUNTER_CONFIG This parameter of the MFIP FB defines the configuration of on board counters and external reset inputs for these counters. It specifies whether the inputs of GR. 2 (CH 8 to CH 11) are to be used as Programmable Delay Inputs or Special Function Input as Reset to Counters. Counter Reset Inputs [GR-2 - CH 8 to CH11] If these inputs are defined as Programmable Delay Inputs, then PROG_DELAY_CONFIG Byte defines the delay (filter time). Alternately these Inputs can be assigned for special function as Reset to Counters. Once these Inputs are sensed, they remain latched to inform the CPU that respective counter has been reset. After reading the status of these Inputs, CPU should clear their status.

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 36 of 43

Messung Systems

NEXGEN PLC I/O Modules

Counter Modes [GR3 CH 12 to CH15] Two counter modes are provided. Basic four 8 bit counters (C0, C1, C2, C3) are divided into 2 groups (Cntr.Gr.1 and Cntr.Gr.2). Cntr Gr 1 - Cntrs C0 & C1 Cntr Gr 2 - Cntrs C2 & C3 Input CH 12 & CH 13 respectively. Input CH 14 & CH 15 respectively.

Mode 1 - Four 8 bit UP Counters (C0, C1, C2, and C3) Mode 2 - Two 16 bit UP / DOWN Counters with Direction and Count Inputs (Cntr.Gr.1 & Cntr.Gr.2) External Reset Input to counter [GR-2 - CH 8 to CH11] a) For 16 bit counters (Mode 2 & Mode 3) reset inputs are CH. 8 for Cntr.Gr.1 & CH. 10 for Cntr.Gr.2. The other two inputs CH 9 & CH 11 can be used as Programmable Delay Inputs. For 8 bit counters (Mode 1) each 8-bit counter. (C0 to C3) has separate Reset Input (CH 8 to CH 11) respectively.
D5 D4 D3 D2 D1 D0

b)

D7

D6

Mode Selection for Cntr Gr 2 0 0 Mode 1 0 1 Mode 2 1 0 Invalid 1 1 Invalid CH10 0 Programmable Delay Input 1 Special Input as Reset to Counter C2 or Cntr Gr 2 CH11 0 Programmable Delay Input 1 Special Input as Reset to Counter C3

Mode Selection for Cntr Gr 1 0 0 Mode 1 0 1 Mode 2 1 0 Invalid 1 1 Invalid CH8 0 Programmable Delay Input 1 Special Input as Reset to Counter C0 or Cntr Gr 1

CH9 0 Programmable Delay Input 1 Special Input as Reset to Counter C1

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 37 of 43

Messung Systems

NEXGEN PLC I/O Modules

Programmable Delay Configuration byte- PROG_DELAY_CONFIG This byte defines the programmable delay for each group of inputs, when the inputs are configured as programmable delay inputs. Total 16 inputs are divided into four groups as mentioned below GR 0 GR 1 GR 2 GR 3 Input 0 to 3 Input 4 to 7 Input 8 to 11 Input 12 to 15

b7

b6

b5

b4

b3

b2

b1

b0

Group 3 Delay 0 0 10 ms 0 1 1 ms 1 0 0.1 ms 1 1 Invalid

Group 2 Delay 0 0 10 ms 0 1 1 ms 1 0 0.1 ms 1 1 Invalid

Group 1 Delay 0 0 10 ms 0 1 1 ms 1 0 0.1 ms 1 1 Invalid

Group 0 Delay 0 0 10 ms 0 1 1 ms 1 0 0.1 ms 1 1 Invalid

The example below shows how to program FB MFIP and use it in the application program. The configuration data defined at I/P variables of FB MFIP is transferred to Multi Function Input module on rising edge of 'RUN' input. The Input and Output image of the module is updated in regular I/O Scan. The contents of on board counters are read from the module through FB MFIP, as long as the RUN input is TRUE. The counters values are available from second scan onwards, if the IO_ERR and CONF_ERR outputs are FALSE. Multi function Input Module is configured in slot 1 of PLC. It is configured as either 4 x 8 Bit Up Counting Mode or as 2 x 16 bit Up / Down Counting Mode, by calling appropriate POU from PLC_PRG. For 4 x 8 Bit Up Counting Mode, the CounterConf BYTE := 16#CC. For 2 x 16 Bit Up / Down Counting Mode, CounterConf BYTE := 16#55. For 4 x 8 bit Up Counting Mode, the on board counter value is accumulated in external array of WORD - Acc_Data[0..3]. For 2 x 16 bit Up / Down Counting Mode, the on board counter value is copied to external array of WORD - Acc_Data[0..1].

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 38 of 43

Messung Systems

NEXGEN PLC I/O Modules

Figure 11 :Program PLC_PRG

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 39 of 43

Messung Systems

NEXGEN PLC I/O Modules

Figure 12: Program Up Counter

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 40 of 43

Messung Systems

NEXGEN PLC I/O Modules

Figure 13 :Program Up Down Counter

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 41 of 43

Messung Systems

NEXGEN PLC I/O Modules

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 42 of 43

Messung Systems

NEXGEN PLC I/O Modules

MESSUNG SYSTEMS EL 2, J - Block, MIDC, Bhosari, PUNE 411 026. INDIA Tel. (+91)0202712 0807, 2712 2807 Fax. (+91)0202712 0391

NEXGEN PLC I/O Modules Multi Function Input Module (4633) Document No.:ED-2002-021

Multi Function Input Module (4633) Document No.: ED-2002-021/V1.0

Published Nov 2003 Page 43 of 43

Вам также может понравиться