262
2) If the user password is set (P00.01), the host device can access to the function code parameters only after
“decryption” (write the correct user password to P00.01), but the access to the control parameters and status
parameters is not restricted by the user password.
3) The host device cannot set, change or cancel the user password and only the operation panel is able to
conduct these operations. The writing operation of P00.01 will be valid only in two situations: decrypt with the
password, and write 0 without the password. In other situations, the invalid operation information will be
returned.
4) The operation of the host device and that of the operation panel on the user password are independent,
even if the operation panel has decrypted already, the host device still need to decrypt to access to the
function code parameters, and vice versa.
5) When the host device gets the authority to access to parameters, it will read the user password and return
to “0000” rather than the actual user password.
6) The host device gets the authority to access to the function code after “decryption”. If there is no
communication within 5 minutes, the access authority is invalid. To access to this function code, please
re-enter the user password.
7) When the host device has gotten the access authority (no user password or decrypted already), if the user
password is set or changed through the operation panel, the host device still has current access authority with
no need to re-encrypt. If the access authority becomes invalid, it needs to re-encrypt (write new password) to
get the access authority.
9. CRC verification
For the purpose of improving speed, CRC-16 is often realized through the table. The following is the C
language source code for realizing CRC-16. Please note: the final results have exchanged high and low bytes,
that is, the result is the CRC checksum to be sent.
unsigned short CRC16
(unsigned char *msg, unsigned char
length
)
/* The function returns the CRC as a
unsigned short type */
{
unsigned char uchCRCHi = 0xFF ; /* high byte of CRC initialized */
unsigned char uchCRCLo = 0xFF ; /* low byte of CRC initialized */
unsigned uIndex ; /* index into CRC lookup table */
while
(length--) /* pass through message buffer */
{
uIndex = uchCRCLo ^ *msg++ ; /* calculate the CRC */
uchCRCLo = uchCRCHi ^
(crcvalue[uIndex] >>8);
uchCRCHi =crcvalue[uIndex]&0xff;
}
return
(uchCRCHi | uchCRCLo<<8) ;