PFWRT
This instruction is used to write the PSnnX parameters, positioning data and block data to the flash memory. The flash memory of PSnnX can be rewritten up to 100,000 times. But, PSnnX limits this to 25 times after every power ON. This limitation is for the purpose of protecting the flash memory damage from sequence program mistake.
n1 : Base and slot number
This parameter specifies which module the instruction to be issued.
High Byte : Base Number (00h ~ 10h, 00h : local base)
Low Byte : Slot Number (00h ~ 0Bh)
n2 : Data type to be stored
Use one of following codes according to the data type to store
0 : All data (parameters, position data)
1 : Parameters
2 : Position Data
n3 : Device memory where the result flags to be stored
The device memory must be a word. M, L, K, D area can be used with this instruction. After issuing the instruction, the result of execution is stored in this memory as following :
High Byte : Error code will be stored
Low Byte : Flags representing execution status are stored.
Bit 0 : Processing the instruction.
Bit 1 : The execution of the instruction is completed.
Bit 2 : Error on execution of the instruction (this flag is set with bit 1)
Bit 3~7 : Reserved