Semaphore application example continued:
FB 100
NAME :SEMADIS
:SED 10 Disable semaphore no. 10
:JZ =M001
:AN F 10.1 If the semaphore is disabled successfully,
:S F 10.1 set "SEMAPHORE-DISABLED" flag.
M001 :BE
FB 110
NAME:MSGOUT
:L FW12 Transmit a message
:T OW 6 to the peripherals
:AN F 10.3
:S F 10.3 Set "TRANSFER MESSAGE"
:flag
:BE
FB 101
NAME :SEMAENAB
:SEE 10 Enable semaphore no. 10
:JZ =M001
:AN F 10.4
:S F 10.4 Set "SEMAPHORE ENABLED"
: flag
M001 :BE
Semaphore Operations
CPU 948 Programming Guide
3 - 80 C79000-G8576-C848-04