EasyManuals Logo

Siemens CPU 948 User Manual

Siemens CPU 948
548 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #151 background imageLoading...
Page #151 background image
Semaphore application example continued:
FB 1
:A F 10.0
:JC =M001 If no message is active,
:
:AN I 0.0
:BEC
:
:L KH 2222 generate message and
:T FW 12
:AN F 10.0
:S F 10.0 set "MESSAGE" flag.
:
M001 :JU FB10 Call "REPORT" FB
NAME :REPORT
:
:BE
FB 10
NAME :REPORT
:AN F 10.1 If no semaphore is disabled,
:JC FB 100 call "disable semaphore" FB.
NAME :SEMADIS
:
:A F 10.1 If the semaphore is disabled
:AN F 10.2 and the timer has not started,
:S F 10.2
:L KT010.2 start the timer.
:SE T 10
:
:A F 10.2 If the timer has started
:AN F 10.3 and no message is being transmitted,
:JC FB 110 call "output message" FB.
NAME :MSGOUT
:
:A F 10.2 If the timer has started
:AN F 10.4 and the semaphore is not enabled
:AN T 10 and the timer has elapsed,
:JC FB 101 call "enable semaphore" FB.
NAME :SEMAENAB
:
:AN F 10.4 If the semaphore is enabled,
:BEC
:
:L KH0000
:T FY10 reset all flags.
:BE
Continued on next page
Semaphore Operations
CPU 948 Programming Guide
C79000-G8576-C848-04
3 - 79

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens CPU 948 and is the answer not in the manual?

Siemens CPU 948 Specifications

General IconGeneral
BrandSiemens
ModelCPU 948
CategoryController
LanguageEnglish

Related product manuals