
Programming
CP1413plus manual
7-66
Rev. 00/07
Start read operation and continue (asynchronous)
#include <S5ACCESS.H>
USHORT WENTRY_C
S5StarteLesenOverlapped(
S5_PARAMS W_POINTER s5,
void (WENTRY_C *UserFctCall)(S5_PARAMS W_POINTER s5),
long Timeout_ms)
The
S5StarteLesenOverlapped
function initialises a read operation. The requested data is
transferred by means of the
S5AbfrageLesenOverlapped
function. Internally, this function
employs the overlapped mechanism to access the function
UserFctCall
cyclically while you are
waiting for an event.
Parameter s
s5
pointer to a structure of the type
S5_PARAMS
. The values
Kennung, DB, DW
and
Len
of the
s5
structure must contain
valid entries.
s5
must contain a valid connection number which
was returned by the function
S5StarteVerbindung
. You must
allocate the required amount of memory after the
s5
structure:
s5=malloc(sizeof(S5_RECVLEN);
If the returned value is 0 you can poll for data by means of
S5AbfrageLesen
, otherwise the returned value contains an H1
error.
Tab. 7-9 contains an overview of the H1 errors and their
description.
.
UserFctCall
pointer to a function located in the application program. This is
accessed at a rate of 10ms by the DLL while the function is being
processed. This mechanism returns control to your program while
the overlapped function is being executed (see chapter 7.6.1.1.2).
The User-Function must be defined as follows:
void WENTRY_C UserCallback(S5PARAMS W_POINTER
s5);
Timeout_ms
the time limit for completion of the function by the DLL (see
chapter 7.6.1.1.2). The connection will be terminated if a timeout
occurs.
Returns
0
H1_BAD_LINE
H1_NO_DRIVER
H1_NO_ADAPTER
See also
S5LeseAusSPS
S5AbfrageLesen
Содержание CP 1413plus
Страница 1: ...Subject to change to cater for technical progress Manual CP 1413plus Order No VIPA SSN HB83E Rev 00 07...
Страница 2: ...jkjlj...
Страница 8: ...Contents CP1413plus manual iv Rev 00 07...
Страница 10: ......
Страница 16: ...Special features CP1413plus manual 1 6 Rev 00 07...
Страница 18: ......
Страница 38: ...Standards and specifications CP1413plus manual 2 20 Rev 00 07...
Страница 40: ......
Страница 104: ...Entry into protocol file H1PROT_NIF CP1413plus manual 3 64 Rev 00 07...
Страница 106: ......
Страница 178: ...PLC Layer 7 program interface CP1413plus manual 4 72 Rev 00 07...
Страница 180: ......
Страница 194: ......
Страница 206: ...ksdjfk...
Страница 276: ...Programming CP1413plus manual 7 70 Rev 00 07 Flowchart Read from PLC Fig 7 7 Flowchart Read from PLC...
Страница 305: ...8 Supplement Please find here the current product description which was not ready for print earlier...
Страница 306: ......
Страница 317: ...Appendix A Technical data A 1 B Abbreviations B 1 C List of figures C 1 D Index D 1...
Страница 318: ...dfgdfgfdg...
Страница 324: ...List of figures CP1413plus manual C 2 Rev 00 07...