![TREBING + HIMSTEDT SPI 3 Скачать руководство пользователя страница 24](http://html1.mh-extra.com/html/trebing-himstedt/spi-3/spi-3_manual_1154873024.webp)
Using data channel with »MODBUS_ Kanal« module and FB 127
24
Trebing & Himstedt | SPI 3 | MODBUS RTU
Reading data
Proceed as follows to read data with the FB
from a MODBUS slave:
– Initialize the parameters for the FB.
– Call the FB repeatedly while bit 0 (Operation
is executing) is 1.
– If the operation completed without errors
(ANZW bit 1==1), the received data is now
available in the user data area DATA.
– If the operation completed with errors
(ANZW bit 2==1), evaluate the error
messageand remedy the error.
Set ANZW bit 4 to 1 to reset the operation. Bit
4 is reset to 0 by the FB when the operation
has been reset.
TH-FD012e
Start
End
Set FB
parameters
Call
FB
Evaluate
error code
Read
Data
ANZW
Bit 0==0
ANZW
Bit 1==1
ANZW
Bit 2==1
yes
yes
yes
no
no
no
== comparison