![background image](http://html1.mh-extra.com/html/omron/cx-simulator-1-9/cx-simulator-1-9_operation-manual_744207172.webp)
Examples of Serial Communications Debugging
Section 5-5
133
The whole data in the file is read for a single receive operation. For send
operation, send data is appended at the end of the file.
Use a commercial text editor or a binary editor to edit a Serial Data File.
Creating and Using Serial Data Files
Example: Input (Receiving)
Use the following procedure to create and use a serial data file.
1,2,3…
1. Create a text file with a user-set name to be used for the receive data.
2. Input the receive data text in the text file created in step 1.
3. Copy the text input as receive data, and paste in the input (receive) file
(COM port name In.txt) under the Log Folder (LOG) in the PLC Data
Folder.
Text can also be input directly into an input (receive) file, omitting steps 1
and 2.
4. Save the input (receive) file. (The file’s update time will change, and be
considered as a received file.)
5. All the data in the file is stored in the reception buffer of the virtual PLC.
6. Input is completed.
This procedure can be used, for example, to receive data in the reception
buffer using the virtual PLC’s RXD instruction.
Note
Read the whole data in the input (receive) file when the file update time
changes, which is regarded as a receive operation.
Note
For Host Link communications, a single issue of instruction causes a com-
mand send (write to the output file) and a response receive (read from the
input file). In this case, it is necessary to create a response data in advance
assuming a command to be sent.
Example of Debugging Program using Barcode reader
The followings show an example of debugging No-protocol communications
using a Serial Data File.
1,2,3…
1. Display the [Serial Comm. Setting] window by [Status] | [Settings] | [Serial
Comm. Setting].
2. Select a serial port for the Serial Communications Unit to be used, fol-
lowed by pressing [Edit] button to display [Serial Communications Regis-
tration] window.
3. Set the communications settings to "File" to select a COM port name.
Note
Select a COM port name that does not overlap with one allocated in actual
communications or another file. Also, a COM port name to be allocated to the
Serial Data File can be one that does not actually exist.
4. Press the [OK] button to exit [Serial Communications Registration] win-
dow and to return to [Serial Communications Settings] window.
5. After confirming the communications settings and the COM port name are
identical to the contents set in procedure 3, press the [OK] button.
6. Create receive data for debugging. Use a commercial text editor or a
binary editor to create data conforming to the format of data to be received
from the barcode reader. Prepare multiple data according to debugging
patterns.
Содержание CX-Simulator 1.9
Страница 1: ...Cat No W366 E1 10 CX Simulator Ver 1 9 SYSMAC WS02 SIMC1 E OPERATION MANUAL...
Страница 2: ......
Страница 3: ...SYSMAC WS02 SIMC1 E CX Simulator Ver 1 9 Operation Manual Revised December 2009...
Страница 24: ...xxv...
Страница 30: ...xxxi...
Страница 35: ...xxxvi...
Страница 39: ......
Страница 63: ...Comparison of the CX Simulator and SYSMAC CS CJ series PLCs Section 1 6 24...
Страница 75: ...Installing and Uninstalling the Software Section 2 1 36...
Страница 157: ...Task Debugging Section 4 4 118...
Страница 195: ...Connection with Application Programs Section 7 2 156...
Страница 225: ...Checking the Result Section 8 5 186...
Страница 277: ...Other Functions Section 9 4 238...
Страница 289: ...Other Tips for Troubleshooting Section 10 3 250...
Страница 304: ......
Страница 305: ......