CP1413plus manual
Programming
Rev. 00/07
4-69
4.3.4.3 Fetch Passive
#include <S5ACCESS.H>
unsigned short WENTRY_C S5FetchPassiv(unsigned short
connectionnumber,
short(WENTRY_C *RetCall)(
short DB,
short DW,
short Type, short Len,short W_POINTER S5Err,
void W_POINTER W_POINTER Data)
void W_POINTER W_POINTER retptr)
The function S5FetchPassiv sends the data that a remote station requested by means of fetch.
Parameters
connectionnumber
i
s the connection that was started by means of the
function
5StartConnection
and that has not yet been
terminates by a
S5StopConnection
.
RetCall
Pointer to the return call function. The requested data is
supplied to this function as soon as the request from the
remote station is received. This function will not be
executed if the request from the remote station contains
error. In this case the function S5FetchPassiv is
terminated with an error 1. If the return call function
returns 0 the answer is transferred to the fetch operation.
Here the error code will be returned if *S5Err contains a
value other than 0, otherwise the data will be returned.
*Daten must contain the pointer to the data that must be
transferred. The caller must provide the data according to
the values contained in DB, DW and Type. The length
of data may be calculated from Type and Len.
retptr
Pointer to the memory area that was transferred to the
function
RetCall
. This may be used to release memory
without the use of global variables.
Return value
0
H1_BAD_LINE
H1_WAIT_CONNECT
H1_NO_DRIVER
H1_NO_ADAPTER
Note:
This function is only available in the version that is intended for multitasking
systems. It may also be used on systems running DOS but it will wait until a request
is received from the remote station or until a connection error occurs.
Summary of Contents for CP 1413plus
Page 2: ...jkjlj...
Page 8: ...Contents CP1413plus manual iv Rev 00 07...
Page 10: ......
Page 16: ...Special features CP1413plus manual 1 6 Rev 00 07...
Page 18: ......
Page 38: ...Standards and specifications CP1413plus manual 2 20 Rev 00 07...
Page 40: ......
Page 104: ...Entry into protocol file H1PROT_NIF CP1413plus manual 3 64 Rev 00 07...
Page 106: ......
Page 178: ...PLC Layer 7 program interface CP1413plus manual 4 72 Rev 00 07...
Page 180: ......
Page 194: ......
Page 206: ...ksdjfk...
Page 306: ......
Page 317: ...Appendix A Technical data A 1 B Abbreviations B 1 C List of figures C 1 D Index D 1...
Page 318: ...dfgdfgfdg...
Page 324: ...List of figures CP1413plus manual C 2 Rev 00 07...