
FAQ (Frequently Asked Questions)
DP Base Programming Interface for CP 5613/CP 5614
212
C79000-G8976-C108-01
What are the most important aspects of accessing data areas?
The process image is separate from the user program and the slaves. Note the
information in Section 2.7.
Use the check list below for your data areas:
x
Select data buffer lengths to match the longest possible data.
x
Link job fields with valid data buffers in the startup phase of your program.
x
If you use multiple threads, each thread should have its own job fields and data
buffers.
x
Interlock the threads if they can access the dual-port RAM at the same time, to
avoid access conflicts.
What are the most important aspects of using hardware events and
semaphores?
x
Until your user program has run through a semaphore for hardware events, it
will not be incremented again. After running through a semaphore, you should
therefore check whether or not more than one event has occurred. (This is
unnecessary with software events.)
x
After a hardware event arrives, the triggering control condition is reset so that
your user program must then set it again.
x
Your user program must log off with DP_delete_sema_object and not with
Windows API functions.
How can I wait for more than one event in a thread at the same time?
Initialize a semaphore for each event type (DP_create_sema_object), trigger your
jobs and then wait at the semaphores by calling the Win32 API function
"WaitForMultipleObjects" or “sgWaitForMultipleObjects".
Where can I find a list of all the error messages?
In the header files "5613_ret.h" and "5614_ret.h". To decode the error messages,
use the DP_get_err_txt function.
Komentarze do niniejszej Instrukcji