750-404/000-005 [2 Up Counter/16 Bit/5 kHz] • 47
Example
WAGO-I/O-SYSTEM 750
I/O Modules
With the control and status byte the following tasks are possible:
Set Counter:
Put Bit 5 (4) into the control byte. The counter 1 (2) with the 16 bit value is
loaded into output bytes 0 (1) or 2 (3). As long as the bit is set, the counter can
stop and information is stored. The ensuing data of the counter will be
conveyed to the status byte. Bit 5 (4) in the status byte communicates the
successful load of the counter.
Set Outputs:
Bits 2 and 3 set the additional two outputs of the counter module.
2.1.5.7 Example
Set Counter 1:
First of all the counter reading is set to 100 by "Setting counter", i. e. to the
hexadecimal value: 0x64.
22.Enter the set value in the output data.
The data bytes D0 to D3 of the output data then read as follows:
Datenbytes
Output data
D3
D2
D1
D0
Value
0x00 0x00 0x00 0x64
23.Validate the counter reading in the control byte with bit 5 (setting counter
1) to have it adopted as an output value. The control byte has the following
bits:
Steuerbyte
Output bit
B7
B6
B5
B4
B3
B2
B1
B0
Value
0 X 1 X X X X X
24.Wait for the feedback from the counter module in the status byte, bit 5
(counter 1 set). The status byte has the following bits:
Statusbyte
Input bit
B7
B6
B5
B4
B3
B2
B1
B0
Value
X X 1 X X X X X
25.Delete bit 5 (setting counter 1) in the control byte in order to finish the
Handshake. The bits in the control byte read as follows:
Steuerbyte
Output bit
B7
B6
B5
B4
B3
B2
B1
B0
Value
0 X 0 X X X X X
26.The set counter reading then appears in the input data with the following
data bytes D0 to D3:
Data bytes
Input data
D3
D2
D1
D0
Value
0x00 0x00 0x00 0x64