
CP1413plus manual
H1 Driver V3.xx for Windows NT
Rev. 00/07
7-71
7.6.3.3.2 Write Active
Write to PLC
#include <S5ACCESS.H>
USHORT WENTRY_C S5SchreibeInSPS(S5_PARAMS W_POINTER s5)
The function
S5SchreibeInSPS
is used when data must be written into the PLC and when the
function should not be interrupted.
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 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.
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
Note
The function returns control only when the data is complete or when an error is
detected. This may require some time depending on the connection parameters as
well as the responses from the other station. This function can not be interrupted.
See also
S5StarteVerbindung
S5StarteVerbindungAdapter
S5StartSchreiben
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...