Appendix E Sample programs
6F8C1583
86
E
E.3 Data sending program for type1 light / S2
This chapter describes a sample program of data sending using CH1 (RS-232C).
This program can operate in following environment.
Controller Module
mode
Remarks
type1 light
normal mode
CF611 mode
Send data size is restricted to 160W.
S2
CF611 mode
Send data size is restricted to 160W.
■
Variable
I/O variable
Name Type Description
IOStatus
WORD
Direct input I/O variable corresponding CF622 DPRAM Status. (I/O WORD No.0)
IOCmd
WORD
Direct output I/O variable corresponding CF622 DPRAM Status. (I/O WORD No.2)
Local variable
Name Type
Description
SndCntr DINT
Sending
counter
SndReq BOOL
Sending
Request
Done BOOL
Sending
Complete
Error BOOL
Sending
Error
ErrData UINT
Error
Information
SndData
ARRAY[0..511] OF WORD
Sending data Buffer
Target WORD
Bus/Unit/Slot
■
Operation
(1) If sending request is set (SndReq = 1) and TX_RDY = 1,
then user function block
(UFUN_MWRITE) writes 1024 byte data in CF622 buffer memory. After writing in buffer memory
is complete, TX_ST is set.
(2) If TX_ST is set, CF622 starts sending data.
TX_CMP is set after sending data is completed. If
TX_CMP is set, TX_ST is reset and “Done” is set.
(3) If a sending error is detected (TX_ERR is set), an error factor is stored to "ErrData" using the
MREAD instruction, TX_ST is reset and "Error" is set.
Содержание CF622
Страница 20: ...Chapter 1 Introducing CF622 6F8C1583 1 6 ...
Страница 26: ...Chapter 2 Names and Functions of the Parts 6F8C1583 12 ...
Страница 38: ...Chapter 4 Installation and wiring 6F8C1583 24 ...
Страница 70: ...Chapter 6 Maintenance and Inspection 6F8C1583 56 6 ...
Страница 74: ...Chapter 7 Troubleshooting 6F8C1583 60 7 ...
Страница 78: ...Chapter 8 Usage Constraints 6F8C1583 64 8 ...
Страница 83: ...69 Appendix B Outside Dimensions B 1 CF622 module 70 B 2 CF622 implemented in the base unit 71 ...
Страница 86: ...Appendix B Outside Dimensions 6F8C1583 72 ...
Страница 87: ...73 73 Appendix C Related Products C 1 Accessories 74 C 2 Recommended communication cables 74 ...
Страница 89: ...75 75 Appendix D ASCII code chart ...
Страница 106: ...Appendix E Sample programs 6F8C1583 92 E ...
Страница 108: ...1583 1 1605 ...