Delta AH500 Programming Manual page 703

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

API
Instruction code
2302
MTWRIT P
Device X
Y
M
C
S
S
1
S
2
S
3
Symbol:
Explanation:
1.
The description of the operands:
C: The control parameter
Parameter
value
0
(Appending)
1
(Overwriting)
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.
S300
byte 2
16#32
S
: The length of the data which is written into the memory card
1
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.
Operand
C, S, S
, S
, S
1
2
S
T
C
HC
D
Pulse instruction 16-bit instruction (11 steps) 32-bit instruction
AH500
C : Control parameter
S : Data source
: Data length
S
1
: Separation mark
S
2
: File name
S
3
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.
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.
S300+1
byte 1
byte 4
16#34
16#31
Ch a pt er 6 Ap p l i ed I ns t r uc t i ons
Writing the string into the memory
3
card
L
SM SR
E
PR
AH500
Word
Word
Word
Word
Word
Description
S300+2
byte 3
byte 6
byte 5
16#33
16#00 16#35
Function
K
16# "$"
DF
-
6 - 5 3 5

Advertisement

Table of Contents
loading

Table of Contents