Delta AH500 — 6.23.2 Explanation of Memory Card Instructions

AH500 Programming Manual API 2302 Symbol: C : Control parameter Word S : Data source Word S 2 : Separation mark Word S 1 : Data length Word S 3 : File name Word Explanation: 1. The description of the operands:  C : The control parameter  S : The data source If the string which is written into the file is “12345”, the characters are stored in the devices as follows. Owing to the fact that a byte is taken as the basic unit, the first character is stored in the low byte in D300, the second character is stored in the high byte in D300. The same applies to the other characters. “16#00” is stored in the high byte in D300+2, and indicates the end of the string.

D300 byte 1 byte 4 byte 3 byte 6 byte 5 D300+1 D300+2 byte 2  S 1 : The length of the data which is written into the memory card A byte is taken as the basic unit. The devices in which the data is stored can not exceed the device range, and the length of the data which is written into the memory card can not be more than 255 bytes.

6-536 Instruction code Operand Function MTWRIT P C, S, S , S , S 1 2 3 Writing the string into the memory card Device X Y M S T C HC D L SM SR E PR K 16# “$” DF C      S    S 1      S 2      S 3    Pulse instruction 16-bit instruction (11 steps) 32-bit instruction AH500 AH500 - Parameter Description value 0 (Appending) If the file exists, the data which is written into the memory card is added after the last byte in the file. If the file does not exist, it is created automatically. 1 (Overwriting) If the file exists, the new data which is written into the memory card replaces the old data in the file. The size of the file is the size of the new data.

If the file does not exist, it is created automatically. 16#32 16#31 16#34 16#33 16#00 16#35