Typical Sequences With Semaphores On The Slave Module - Siemens SIMATIC NET CP 5613 Manual

Dp base programming interface
Table of Contents

Advertisement

3.9.3

Typical Sequences with Semaphores on the Slave Module

Definition
The polling mode described in Section 3.7.3 can also be replaced by operation with
semaphores. The initialization of this mode, the elements of continuous operation
and canceling the mode are described below.
Initializing the Semaphore
Before it is used, the semaphore must be created as follows:
Step
1
Using Semaphores for the Slave Module
Step
1
2
3a
3b
4
Note
After positive confirmation of configuration data, the input data in the process
image table of the slave module must be written at least once (initialization), before
the slave module can change to data exchange.
DP Base Programming Interface for CP 5613/CP 5614
C79000-G8976-C108-02
Action
Initialize a semaphore for
asynchronous jobs
(function
DP_init_sema_object)
Action
Wait for the semaphore
(for
example,WaitForMultipleO
bjects)
DPS_get_ind
If DPS_CHK_PRM:
DPS_set_resp
If DPS_CHK_CFG:
DPS_set_resp
Go to Step 1.
Overview of the DP Base Interface
Meaning
The DP Base Lib provides a
semaphore for all asynchronous jobs
(type DP_OBJECT_TYPE_ASYNC).
Meaning
The user program or the thread waits
until an event occurs.
"WaitForMultipleObjects" is a Windows
32-bit API function.
Fetch arrived indications
If a new parameter assignment has
arrived:
Check user parameter data and
acknowledge positively or negatively
If a new configuration has arrived:
Check configuration data and
acknowledge positively or negatively
63

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic net cp 5614

Table of Contents