![background image](http://html2.mh-extra.com/html/m-system/54uc/54uc_operating-manual_3116626009.webp)
54UC
5-2-55, Minamitsumori, Nishinari-ku, Osaka 557-0063 JAPAN
Phone: +81(6)6659-8201 Fax: +81(6)6659-8510 E-mail: [email protected]
EM-6489-B Rev.9 P. 9 / 47
■
Reading/Writing procedure
The sequence (1) through (6) shown in below is the procedure to read/write a set of data. When you need to read/write con-
tinuously, repeat the sequence.
RY1, RWwn
*
RY0
RX0
RX1, RWrn
*
Time
Set Command
Read Reply
(Request Execution of Command)
(Completion of Command)
(1)
(2)
(3)
(4)
(5)
(6)
*
n
= 0, 1, 2, 3
■
Detail of Reading/Writing sequence
[ Sequence (1) ]
• Reading command
Set register number in RWw0.
Set RY1 OFF.
• Writing command
Set register number in RWw0.
Set the data to write in RWw2 and RWw3.
Set RY1 ON.
• Master to Slave (54UC)
Command
Reading
Writing
RY1
OFF
ON
RWw0
Register number
Register number
RWw2
----
Data to write (LSW)
RWw3
----
Data to write (MSW)
[ Sequence (2) ]
Set RY0 ON.
Following receiving a command, the 54UC copies RY1,
RWw0, RWw2, RWw3 to RX1, RWr0, RWr2, RWr3.
• Master to Slave (54UC)
Require
Reading
Writing
RY0
ON
ON
• Slave (54UC) to Master
Acknowledge
Reading
Writing
RX1
OFF
ON
RWr0
Register number
Register number
RWr2
----
Data to write (LSW)
RWr3
----
Data to write (MSW)
[ Sequence (3) ]
Following completion of a command, the 54UC sets reply
data in RWr2 and RWr3, and sets RX0 ON.
• Slave (54UC) to Master
Reply
Reading
Writing
RX0
ON
ON
RWr1
Error code
Error code
RWr2
Data to read (LSW)
----
RWr3
Data to read (MSW)
----
• Error Codes
Error code
Command
Contents
100H
Reading
No error
111H
Command error
112H
Device error (Time out)
113H
Device error (Communication)
200H
Writing
No error
211H
Command error
212H
Device error (Time out)
213H
Device error (Communication)
Note: Check the 54UC’s fault, if device error repeats.
[ Sequence (4) ]
Confirm RX0 is ON, and then read in reply data.
[ Sequence (5) ]
Set RY0 OFF.
• Master to Slave (54UC)
Completion
Reading
Writing
RY0
OFF
OFF
[ Sequence (6) ]
Following setting RY0 OFF, the 54UC sets RX0 and RX1
OFF and clears RWr0 through RWr3 (sets OFF).
Acknowledge of Completion
Reading
Writing
RX1
OFF
OFF
RWr0
0
0
RWr1
0
0
RWr2
0
0
RWr3
0
0