CP1413plus manual
Programming
Rev. 00/07
4-29
4.2.3 Specific H1 Layer 4 functions
4.2.3.1 Send data
#include <H1Def.h>
unsigned short WENTRY_C H1SendData(H1_SENDPARAMS W_POINTER send)
This function sends data via an existing connection. When the function is executed it will only
return when send data has been successful or when a timeout occurs.
Parameters
send
Pointer to a structure containing send parameters. Parameters
Vnr
and
DataLen
must contain the respective values. Ensure that the buffer at
the end of the structure is large enough.
If the telegram should form part of a blocked transmission bit 15 in the
element Vnr must be set. On the receiving side this causes that
H1_BLOCKED_DATA
is entered into the
Fehler
element. Bit 15 may
not be set in the last telegram of a blocked transmission.
Possible return values from
send.Fehler
:
0
H1_WAIT_CONNECT
H1_BAD_LINE
H1_WAIT_SEND
H1_NO_DRIVER
H1_NO_ADAPTER
Return value
< >
0
The operating system has detected an error.
0
The send.Fehler
element contains one of the values mentioned
above
Note
This function is normally used in multitasking systems, as it only returns to the caller
once the send operation has been successful or when a timeout occurs. It is often
executed from within a thread. It may be started by means of
H1StartSend
and its
status can be determined (polled) by means of
H1CheckSend
.
You may not mix the
H1SendData
and
H1StartSend
/
H1CheckSend
tasks
for a single connection. The driver must first be initiated by means of
H1DriverOpen
and a connection must also be established by executing
H1StartConnect
or
H1StartConnectCard
.
See also
H1DriverOpen
H1DriverClose
H1StartConnect
H1StartConnectCard
H1StartSend
H1CheckSend
Содержание 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...