S5-95U, SINEC L2 Data Transmission by Accessing Layer 2 Services
8.4 FBs for Managing All Layer 2 Services
FB223 and FB224 enable you to transmit data using layer 2 services with minimal programming
overhead. You only need to program these FBs once for an S5-95U. The FBs can be used for all
layer 2 services.
Structure of the Control Program for Sending the Request and Fetching the
Confirmation in FB223
Prerequisites for executing FB223 according to the following schematic:
• You have programmed DB33 with header and send data.
• You have set the send initiation bit in OB1 and invoked FB223 (OB1 is shown in the various
sections on the services, namely, 8.5 to 8.9).
Job completed without error (STBS bit 2 = 1)?
Yes No
End
Reset send initiation bit
Send job executing (STBS bit 1 = 1)?
Yes No
Invoke L2-SEND
Evaluate parameter assignment error byte
RECEIVE viable (STBS bit 0 = 1)?
Yes No
Invoke L2-RECEIVE
Evaluate parameter assignment error byte
Output link_status
You must evaluate the link_status once FB223 has executed.
Structure of the Control Program for Fetching the Indication in FB224
Prerequisites for executing FB224 according to the following schematic:
• You have generated DB34.
• You have set the "EMPF" bit in OB1 and invoked FB224 (OB1 is shown in the various sections
on the services, namely, 8.5 to 8.9).
"EMPF" bit set or RECEIVE viable (STBR bit 0 = 1)?
Yes No
Invoke L2-RECEIVE
No parameter assignment error; STBR error in L2-RECEIVE?
Yes No
Evaluate parameter assignment error byte
"EMPF" bit is reset
End
You must evaluate the link_status once FB224 has executed.
EWA 4NEB 812 6112-02
8-11