Release Notes:
- Added the function of playing SD card video in the video control (just set the from property of the video control)
- Add startup file concept: you can define any number of global variables in the startup file or write various initialization data codes
- Added the function of specifying characters in all fonts
- Add data CRC check function, this function involves the following five objects:
System variable: crcval
crc verification result (only available but not settable, please use crcrest instruction to reset initial value)
Instruction: crcrest
reset crc initial value (after resetting, you can use crcputs or crcputh or crcputu to verify the specified data, read the system variable crcval to get the verification result after the verification)
Instruction: crcputs
crc check a variable / constant
Instruction: crcputh
crc check a group of Hex
Command: crcputu
crc check a section of serial buffer data (valid when recmod = 1)
- The version definition rule is updated from the original two-digit version number to a three-digit version number, which respectively indicate: major version. Sub-version. Revision number. For example: 1.60.8 [Main version 1, sub-version 60, revision number 8]
Major version changes: Generally indicates that major changes have been made to the underlying layer
Sub-version changes: generally represents new features (such as new controls or instructions)
Revision number change: generally represents a bug fix, without any functional changes or underlying changes
Instructions on CRC data check
- The following code will implement the screen to send 2 sets of constant data to the external device, and put the Modbus CRC16 check result at the end:
crcrest 1,0xffff // reset CRC
crcputs "hex date is:", 0 // CRC check string: hex date is:
crcputh 03 25 // CRC check hex: 0x03, 0x25
prints "hex date is:", 0 // serial port send string: hex date is:
printh 03 25 // serial send hex: 0x03,0x25
prints crcval, 2 // serial port sends verification results
- The following code will implement the screen to send 2 sets of variable data to the external device, and bring the Modbus CRC16 check result at the end:
crcrest 1,0xffff // reset CRC
crcputs t0.txt, 0 // CRC check string variable t0.txt
crcputs n0.val, 0 // CRC check value variable n0.val
prints t0.txt, 0 // serial port sends string variable t0.txt
prints n0.val, 4 // Serial number n0.val
prints crcval, 2 // serial port sends verification results
3.The following code will implement CRC check on the data in the serial buffer in the active parsing mode, and display the success or failure result to t0.txt
if (usize> = 24)
{
crcrest 1,0xffff // reset CRC
crcputu 0,22 // check the first 22 bytes of the serial buffer
sys0 = 0 // sys0 is a 4-byte shaped data. The CRC result is only 2 bytes, so the extra bytes of data are cleared first.
ucopy sys0,22,2,0 // assigns the CRC result received in the receive buffer to sys0
if (sys0 == crcval)
{
t0.txt = "verification passed"
} else
{
t0.txt = "Check failed"
}
udelete 24 deletes the processed 24 bytes
}