100
model 3000 Ethernet Module / DS Connection Module Operation Manual
Appendix E Sample Programs
E
Program (TCP reception)
/
*
TCP OPEN REQUEST(PASSIVE) */
OPEN_
COMPLETE
MOVE_UINT T_SK_CMD.Slot
ST
4
LD
MOVE_WORD T_SK_CMD.Cmd
ST
16#0016
LD
MOVE_UINT T_SK_CMD.Socket
ST
OPEN_STATUS1
LD
N
OPEN_
COMPLETE T_SK_COMP
T_SK_REQ
URCV_T
REQ
T_SOCKET
DONE
CMD
T_SK_ERR
T_SK_CMD
LD
P
T_SK
LD
0
LD
ERROR
STATUS
T_SK_SOCKET
ST
T_SK_ERR
T_SK_COMP
T_SK_REQ
UINT_TO_WORD
4
LD
WORD_TO_INT INT_TO_DINT
MUL_DINT
524288
LD
T_SK_SOCKET
LD
INT_TO_DINT
ADD_DINT
ST
XI
%MW13.130944[XI]
LD
T_SK_DT
ST
RX_TRG
EQ_WORD
16#0400
LD
AND_WORD
16#0400
LD
T_SK_DT
LD
MOVE_UINT T_O.Slot
ST
4
LD
MOVE_WORD T_O.Cmd
ST
16#0035
LD
MOVE_UINT T_O.Kind
ST
2
LD
MOVE_DWORD T_O.DIP
ST
16#AC10_4007
LD
MOVE_UINT
T_O.DPort
ST
30004
LD
MOVE_UINT T_O.TimeUp
ST
0
LD
MOVE_UINT T_O.SPort
ST
30003
LD
OPEN_
COMPLETE OPEN_ERROR
OPEN_REQ
OPEN_REQ
USEND_T
S
OPEN_COMPLETE
REQ
USEND_T_1
DONE
CMD
OPEN_ERROR
P
N
ERROR
STATUS
OPEN_STATUS1
ST
T_O
LD
TR_DUMMY
LD
16#0
LD
S
Содержание 3000 series
Страница 13: ...CONTENTS 6F8C0878 xi E Sample Programs 91 F Return Code List 103 G Option switch List 107 ...
Страница 14: ......
Страница 26: ......
Страница 72: ......
Страница 76: ......
Страница 82: ......
Страница 100: ......
Страница 102: ......
Страница 104: ......
Страница 116: ......
Страница 120: ......
Страница 122: ......
Страница 126: ......