
Programming
CP1413plus manual
7-62
Rev. 00/07
7.6.3.3 Specific layer 7 functions
7.6.3.3.1 Fetch active
Read from PLC
#include <S5ACCESS.H>
USHORT WENTRY_C S5LeseAusSPS(S5_PARAMS W_POINTER s5)
The
S5LeseAusSPS
function is used to read data from a controller. Your system will be
unavailable until the function returns. You must only use this function if it will not impact upon
other processes.
Parameters
s5
pointer to a structure of the type
S5_PARAMS
. The values:
Kennung
,
DB
,
DW
and
Len
in the structure
s5
must contain valid
entries. The structure
s5
must contain a valid connection number that
was started by means of the function
S5StarteVerbindung
. You
must allocate the required amount of memory after the structure
s5
:
s5=malloc(sizeof(S5_RECVLEN);
The function was completed properly if it returns 0, otherwise the
return value contains the H1 error.
If the returned value is 0 you can access the data as follows:
PLCData[0]=(UCHAR*)s5+sizeof(S5_0;
PLCData[1]=(UCHAR*)s5+sizeof(S5_1;
Tab. 7-9 contains an overview of the H1 errors and their description.
A 0 signifies that the data was transferred properly and without errors.
Fehler
contains PLC errors returned by the other station. Chapter
7.6.3.4 contains an overview of PLC error codes. A 0 in
Fehler
indicates that the data was transferred without errors.
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
S5StarteLesen
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...