550 560 04
This section provides full details about the structure and contents of the Digital Input Channels incorporated in M36 series.
Channel Register Structure and Function
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 = TRUE) and subsequently writing the state to the input flag. The input flag is FALSE after a reset in simulation mode.
Each channel has a timer, used with the special functions. The timer is preset 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.
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.
This variable totalises the time period during which InFlag is True.
This register holds the preset value for the IOTimer when the channel is in Input Hold Mode or in Input Delay Mode.
The ChConfig variable is a record having the following structure:
where each field is interpreted as follows:
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.
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.
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:
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:
For the digital I/O channels, ChType is a record having the following structure:
ChType has the following value:
ChannelType = 15
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.