Instructions of HMI Connecting Printer
Instructions of HMI Connecting Printer
Instructions of HMI Connecting Printer
1/7
Instructions of Coolmay HMI connection printer
2/7
Instructions of Coolmay HMI connection printer
Note: COM1 is used for single-screen RS232 communication port, COM2 is set with
RS485; RS232 or RS485 is optional for HMI of HMI/PLC all in one, communication port is
COM2 and printer communication.
Ⅳ. Write the content program that needs to be printed in HMI programming software. The
following is the description of the Rongda printer routine.
The component setting instructions added on the routine: 1. Added registers D0, D1, D2
3/7
Instructions of Coolmay HMI connection printer
for displaying data; 2. Added variable text LW1074 for setting the name of the tester to be
printed, variable text length reserved 10 (1 register = 2 characters / 1 Chinese); 3, Added
variable text LW1010, LW1030, LW1050, LW1070 for viewing the content to be printed,
the variable text length is reserved 30 respectively, the specific content to be printed Set in
the Clock macro; 4. Add a start button to execute the program in the print macro. The
execution button address is also set in the Clock macro.
After setting up the screen and the macro program, the effect of executing the print button
on the HMI is as follows:
4/7
Instructions of Coolmay HMI connection printer
The data frame sent by the above macro command and the serial port
debugging assistant is as follows. You can see that each line sends a new line
5/7
Instructions of Coolmay HMI connection printer
STR → integer to ASCII string conversion, such as STR (A1, A2, A3)
The integer in the A2 address is converted to an ASCII string and placed at the
address specified by A1. The decimal point is specified by A3. The data format
is only Word (1 Word = 2 characters / 1 Chinese).
TXD → Send data, such as TXD (A1, A2) < Communication protocol must be:
Free Protocol >
It is to send data from the A1 address to the corresponding UART port of
LINK1, and send A2 bytes in total. The data format is only Word (1 Word = 2
bytes).
RXD → Receive data, such as RXD (A1, A2) < Communication protocol must
be: Free Protocol >
That is, the corresponding UART port is selected from LINK1 to receive data to
the start address specified by A1. If A2 specifies K, it is specified to read K
bytes. If A2 specifies LW, all bytes of the buffer are read, and the read word is
6/7
Instructions of Coolmay HMI connection printer
read. The number of sections is placed in the address specified by A2. The
data format is only Word (1 Word = 2 bytes).
张力值:Tension value
毫牛:Milligram
液体:Liquid
相密度:Phase density
实验人:Tester
小明:Xiao Ming
7/7