PROGRAM EXAMPLES
●Connecting 232ADP and a printer,and printing out the data sent from the PC.
Printer | FX0N series sequencer | Common pin out for printer communication |
| Send |
|
• Receive data | • Send data |
|
● The communication format of the serial printer is as follows.
Data length | 8 bit |
Parity | Even |
Stop bit | 2 bit |
Baud rate | 2400bps |
Sequence program
Operation
Power on
X000,ON
RS instruction drive
X001,ON
Data send
Turn on the power of the PC and printer, check the printer is on line and switch the PC to RUN.
Turn on X000, and drive RS
instruction.
Every time X001 is turned on, the contents of D200 to D210 are sent to the printer, and "test line" is printed.
●In this example, CR (H000D) and LF (H000A) are written at the end of the message.The printer moves down one line for each message.
CR: Carriage Return LF: Line Feed
Note:It may be necessary to set the
DIP switches of your printer.
Check your printer manual for how to
configure the serial communications.