550 560 04

 

Digital Input Channel

This section provides full details about the structure and contents of the Digital Input Channels incorporated in M36 series.

 

RegNo.

Identifier

MEMORY TYPE

Read Out

Type

SI unit

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

FlagReg

IOTimer

Counter

 

Operatingtime

 

 

InputPreset

 

ChConfig

 

 

 

Maintenance

ChType

CHError

RAM Read Write

RAM Read Write

RAM Auto Save

 

RAM Auto Save

 

 

RAM Init EEPROM

 

EEPROM RPW

 

 

 

EEPROM RPW

PROM Read Only

RAM Read only

Binary

Decimal

Decimal

Decimal

Decimal

Decimal

Decimal

Decimal

Decimal

------

 

Decimal

Decimal

------

------

Binary

Bit8

Real

LongInteger

Real

Real

Real

Real

Real

Record

Record

 

Record

Record

Record

Record

Record

---

s

---

A

s

s

s

s

---

 

---

---

---

---

---

 


Channel Register Structure and Function

 

 

RegNo. 0: FlagReg

 

 

FlagReg:

Bit8;

 

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: Control

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: InFlag

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: Not used

 

 

 

 

 

 

 

 

 

 

The FlagReg can be accessed as one Byte or as individual bits.

 

Bit 3: Control

The Control flag follows the InFlag. After a power-up or a reset of the module, the Control flag is FALSE.

 

Bit 6: InFlag

The input flag is controlled by the input detector, and shows the logic level on the input terminals. The input flag is true, when the input is ON. If the output terminals are short-circuited, the input flag will not follow the output flag. The input signal can be simulated, by setting the channel into input simulation mode (ChConfig.Enablebit[0] = TRUE) and subsequently writing the state to the input flag. The input flag is FALSE after a reset in simulation mode.

 

 

RegNo. 1: IOTimer [s]

 

 

IOTimer:

Real;

 

 

Each channel has a timer, used with the special functions. The timer is pre­set via P-NET or  InputPreset register, depending on which function is selected for the channel. The timer counts down. The count continues through negative values. The timer register is cleared after a power failure.

 

 


RegNo. 2: Counter

 

 

Counter:

LongInteger;

 

 

The counter counts the number of pulses at the input. The counter counts up to a maximum of 2147483647 (a LongInteger). When the counter exceeds +2147483647, it re-starts at -2147483648. On a rising edge at the input the counter increments by one.

 

 

RegNo. 4: Operatingtime [s]

 

 

Operatingtime:

Real;

 

 

This variable totalises the time period during which InFlag is True.

 

 

RegNo. 7: InputPreset [s]

 

 

InputPreset:

Real;

Only PD 622 ver. 1.11 or higher

 

This register holds the preset value for the IOTimer when the channel is in Input Hold Mode or in Input Delay Mode.

 

 


RegNo. 9: ChConfig

The ChConfig variable is a record having the following structure:

 

Record

 

Enablebit:

ARRAY[0..7] OF BOOLEAN;

 

 

Functions:

BYTE;

 

 

Notification:

ARRAY[0..7] OF BOOLEAN;

 

 

User:

BYTE;

 

End;

 

where each field is interpreted as follows:

 

Enablebit :

         

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: InputSimulation

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: Not used

 

 

 

 

 

 

 

 

 

 

InputSimulation must be used with the utmost care because whenever simulation mode is deselected, the input will remain in the state the user left it, regardless of the actual signal level on the input. The real input level can only be detected again after a reset, or following a positive or negative input change, because the input state is based on edge detection.

 

Functions :

 

= 0

=> Input mode

 

 

= 1

=> Input hold mode

Only PD 622 ver. 1.11 or higher

 

= 7

=> Input delay mode

Only PD 622 ver. 1.11 or higher

 

 

Notification:

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: FallingEdgeOnControl

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: RisingEdgeOnControl

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: FallingEdgeOnInFlag

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: RisingEdgeOnInFlag

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: Not used

 

 

 

 

 

 

 

 

 

 

A bit in the Notification register in the Service Channel will be set if the condition described for any bit that is set in this Notification field has been met. The Notification bit number in the Service Channel register will correspond with the channel number that detected the condition.

 

Input mode.

InFlag and Control bits are controlled by the input detector, and show the logic level on the input terminals.

 


Input hold mode. (Only PD 622 ver. 1.11 or higher)

The IOTimer is preset from InputPreset on a rising edge at the input.

 

Input delay mode. (Only PD 622 ver. 1.11 or higher)

By using this function, it is possible to specify a time delay between when an input is detected on the input terminal and when the InFlag and Control flags are set True.

 

Input delay mode provides a filter on the input that ensures that the InFlag is only set True if the signal is stable during the entire period when the IOTimer is decrementing towards zero. This mode also avoids the counter being incremented if the input is ON for a shorter period of time than that specified in the InputPreset register.

 

Precise Function description:

 

 

 

 

RegNo. 13: Maintenance

The Maintenance variable is used for service management and maintenance purposes, and holds the last date of service (Date, Month, Year), and an indication of the type of service (Category).

 

Maintenance is a Record having the following structure:

 

RECORD

 

Date:

BYTE;

 

 

Month:

BYTE;

 

 

Year:

BYTE;

 

 

Category:

BYTE;

 

End;

 

 


RegNo. 14: ChType

For the digital I/O channels, ChType is a record having the following structure:

 

RECORD

 

ChannelType:

WORD;

 

 

Exist:

Bit16;

 

 

Functions:

Bit16;

 

End;

 

 

ChType has the following value:

 

ChannelType = 15

 

Exist =

15

 

 

 

 

 

 

 

7

 

 

 

 

 

 

0

1

1

1

0

0

0

1

0

1

0

0

1

0

1

1

1

 

Functions =

15

 

 

 

 

 

 

 

7

 

 

 

 

 

 

0

 

 

0

0

0

0

0

0

0

0

1

0

0

0

0

0

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: InputMode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: InputHoldMode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: OutputMode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: FollowMode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: ToggleOutput

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: OneShotOutput

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: DutyCycleOutput

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: InputDelayMode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8: InputEdgeDetectMode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

RegNo. 15: CHError

 

Record

 

His:

Bit8;

 

 

Act:

Bit8;

 

End;

 

The 8 bits in ChError.His and ChError.Act have the following meaning. When an error occurs, the corresponding bit is set in both ChError.His and ChError.Act. When the error disappears, the bit is cleared in ChError.Act. The corresponding bit in ChError.His remains set until it is read, whereupon it is cleared automatically. See summary for how ChError.His can be cleared in particular M36 slave modules.

 

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6: Not used

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7: ModuleError

 

 

 

 

 

 

 

 

 

 

 

Bit 7

ModuleError. If this bit is set, the rest of the bits have no meaning because a module error can cause random error codes on the individual channels (see also "Service channel").