Programming
CP1413plus manual
7-74
Rev. 00/07
Start write operation
#include <S5ACCESS.H>
USHORT WENTRY_C S5StartSchreiben(S5_PARAMS W_POINTER s5)
The
S5StartSchreiben
function initialises a write operation.
You may not start more than one start write operations for a single connection.
Parameters
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 for received data after the
s5
structure:
s5=malloc(sizeof(S5_SENDLEN);
Write data can be supplied as follows:
memcpy((UCHAR*)s5+sizeof(S5_PARAMS),
&PCData,SENDLEN);
The function will either return a 0 or an H1 error.
Tab. 7-9 contains an overview of the H1 errors and their description.
If the function returns a 0 you can check for completion of the
operation by polling with
S5AbfrageSchreiben
.
Any S5 errors returned by the other station are located in
Fehler
.
Chapter 7.6.3.4 contains an overview of the PLC error codes. A 0 in
Fehler
indicates that the data transfer was completed properly.
Returns
0
H1_BAD_LINE
H1_NO_DRIVER
H1_NO_ADAPTER
See also
S5StarteVerbindung
S5SchreibeInSPS
S5AbfrageSchreiben
S5StoppeVerbindung
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...