550 561 04 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Digital Output ChannelThis section provides full details about the structure and contents of a Digital Output Channel.
Channel Register Structure and Function
RegNo. 0: FlagReg
The FlagReg can be accessed as one Byte or as individual bits.
Bit 1: Error The purpose of the Error bit is to indicate an error condition on the channel (overload, underload and hardware errors). Error = TRUE, indicates ChError.Act <> 0.
Bit 3: Control The Control flag is used to control special functions (see ChConfig.Functions). After a power-up or a reset of the module, the Control flag is FALSE. If ChConfig.Functions is set to Input mode or Input hold mode the Control flag follows the InFlag.
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 channel is used as an output, the input flag will follow the output flag. 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.
Bit 7: OutFlag This flag shows the logic level on the digital output. When OutFlag is TRUE, the output is ON.
A P-NET transmission can control the OutFlag if the ChConfig.Function is set to Output Mode. In other cases, the OutFlag is controlled by the special output function, and the OutFlag is treated as a read only bit from P-NET.
After a power-up or a reset of the module, OutFlag is FALSE.
RegNo. 1: IOTimer [s]
Each channel has a timer, used with the special functions. The timer is either preset via P‑NET, or from the OutputPreset.OnPreset / PTPreset registers, 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
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. 3: OutCurrent [A]The OutCurrent register indicates the value of the current in the output load.
RegNo. 4: Operatingtime [s]
This variable totalises the time period during which InFlag is True.
RegNo. 6: MinMaxCurTimer [s]
The MinMaxCurTimer is used to disable current control for a short period after the output is switched on. control together with the MinMaxCurrent. The MinMaxCurTimer is preset from OutputPreset.MinMaxCurPreset when the output is set. The timer counts down, and continues through negative values. As long as the value of the timer is positive, current control is disabled. Refer to MinMaxCurrent for a precise function description.The timer register is cleared after a power failure.
RegNo. 7: InputPreset[s]
This register holds the preset value for the IOTimer when the channel is in Input hold mode, Input delay mode or Input edge detect mode.
RegNo. 8: OutputPreset [s]This register holds the preset Values for the IOTimer and the preset value for the MinMaxCurrentTimer. The preset values are passed to the timer by the special functions. The IOPreset variable is a record having the following structure:
The function of OnPreset and PTPreset is described under ChConfig.
The function of the MinMaxCurPreset is described under MinMaxCurrent and MinMaxCurTimer. The value of MinMaxCurPreset should not exceed 2 seconds if the value of MaxCurrent exceeds 1 A.
RegNo. 9: ChConfigThe ChConfig variable is a record having the following structure:
where each field is interpreted as follows:
Enablebit:
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:
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 621 ver. 1.11 or higher)
The IOTimer is preset from InputPreset on a rising edge at the input.
Output mode. The output can be controlled by writing to OutFlag from P-NET.
Follow mode. The output follows the Control flag.
Toggle output. Precise Function description:
One shot output. If the Control flag is set to True, the output will be set True for a period equal to the value of OutputPreset.OnPreset. The time can be varied by reloading the IOTimer. The Output is reset if the Control flag is set to False.
Precise Function description:
Duty-cycle Output. This function can produce a variable duty-cycle output. The On time is specified in OutputPreset.OnPreset and the total period in OutputPreset.PTPreset.
Precise Function description:
Input delay mode. (Only PD 621 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:
Input edge detect mode. (Only PD 621 ver. 1.11 or higher) This function will cause the IOTimer to be preset when a positive edge is detected on the input terminal. The IOTimer will decrement down to zero, and this can be used to trigger the output on another channel. As shown below, the IOTimer cannot be preset again until its value reaches zero or contains a negative value.
When InputPreset is <= 0, one or more outputs in the module that are pointing to this input can be activated immediately or delayed by a positive time specified in InputPreset.
Precise Function description:
Notification:
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.
ControlledbyChannel: (Only PD 621 ver. 1.11 or higher) The value inserted in this field defines (points to) the channel number that is to control this channel when it is configured as an output.
The table below shows which output functions that can be controlled by other functions.
RegNo. 11: MinMaxCurrentThis variable is a record having the following structure:
MinCurrent: This variable defines the minimum permitted current in the load when the output is ON. If OutCurrent is less than MinCurrent when the output is ON and the MinMaxCurTimer < 0, an error can be generated. Error-code generation is enabled by setting ChConfig.Enablebit[5] TRUE (underload alarm).
Precise Function description:
MaxCurrent: If OutCurrent exceeds MaxCurrent and MinMaxCurTimer < 0, the output is switched off and an error is generated. For applications in which it is normal to let the max. current switch the output off, the error-code generation can be disabled, by setting ChConfig.Enablebit[6] TRUE (no overload alarm). Any output current > 2 Amp switches the output off instantly.
Precise Function description:
RegNo. 13: MaintenanceThe 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:
RegNo. 14: ChTypeFor the digital I/O channels, ChType is a record having the following structure:
ChType has the following value:
ChannelType = 15
Exist =
Functions =
RegNo. 15: CHError
The 8 bits in Error.His and CHError.Act have the following meaning: When an error occurs, the corresponding bit is set in both Error.His and Error.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.
|