Siemens SIMATIC NET PROFIBUS Wartungshandbuch Seite 56

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 238
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 55
Overview of the DP Base Interface
DP Base Programming Interface for CP 5613/CP 5614
56
C79000-G8976-C108-01
3.7.5 Typical Sequences in DPC1 Operation with Semaphores
Definition
The polling mode for DPC1 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 Semaphores
Before it is used, the semaphore must be created as follows:
Step Action Meaning
1 Initialize a semaphore for
asynchronous jobs
(function
DP_init_sema_object)
The DP Base DLL provides a
semaphore for all asynchronous jobs
(type DP_OBJECT_TYPE_ASYNC).
Using Semaphores for DPC1
Step Action Meaning
1 Send the write job
(DP_ds_write)
On completion of the function, the job
is active.
2 Wait for the semaphore
(for example,
WaitForMultipleObjects)
The user program or the thread waits
until the event occurs.
"WaitForMultipleObjects" is a Windows
32-bit API function.
3
Fetch result
(DP_get_result)
The result can be recognized by the
order_id in the request field.
The other DPC1 services function analogously.
Seitenansicht 55
1 2 ... 51 52 53 54 55 56 57 58 59 60 61 ... 237 238

Kommentare zu diesen Handbüchern

Keine Kommentare