Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 599

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
• These instructions retrieves the specified number of points of data specified by (n) from the device specified by (s2) and
write it to the write offset in the device specified by (s1) in the device data storage file in data memory. (s1) indicates the
offset from the start of the device data storage file and can be specified by word offsets (incremented by 1 every 16 bits).
(s1)
(s2)
(n)
• The completion device specified by (d) automatically turns on upon execution of the END instruction following the detection
of processing completion of the SP.DEVST instruction and turns off upon execution of the END instruction in the next scan,
so it is used as the execution complete flag of the SP.DEVST instruction.
• If the SP.DEVST instruction completes with an error, the error completion device specified by (d)+1 turns on or off at the
same time as the completion device specified by (d). Therefore, the device is used as the error completion flag of the
SP.DEVST instruction.
• SM753 (File being accessed) turns on while the SP.DEVST instruction is executed. If SM753 has already been on, the
SP.DEVST instruction cannot be executed. (If executed, no processing is performed.)
• If an error is detected during execution of the SP.DEVST instruction, the completion device (d), error completion device
(d)+1, and SM753 do not turn on.
• When the S(P).DEVST instruction is used, a device data storage file must be set up in advance. (Page 593 Setting
method)
• Use the S(P).DEVLD instruction to read device data from the device data storage file to any specified device. ( Page
594 S(P).DEVLD)
Precautions
• The value written to data memory is the one at execution of the SP.DEVST instruction.
• Execution of the SP.DEVST instruction increases SD634 and SD635. The number of writes to the data memory of the CPU
module is limited. If the data memory write count index exceeds 100,000, an error occurs with error code 1080H.
• To prevent the data memory write count from being increased by careless instruction execution, SD771 can be set to limit
the write count per day. The maximum number of writes is 36 by default. Change the maximum number of writes by using
SD771 as needed. If the specified write count is exceeded, an error occurs with error code 3421H. The number of
executions of the instruction to write to data memory per day is initialized to 0 at the following timing.
• When power offon, or when resetreset canceled
• The date (year, month, day) in clock data is changed by time advancement.
• CPU module internal clock data (year, month, day) is changed by the clock data change function.
• Data is written to the device data storage file when the END instruction is executed. Data is written to the device data
storage file when the END instruction is executed immediately after the SP.DEVST instruction is executed. Thus,
depending on the number of write points, writing to the device data storage file may involve multiple scans. Check the
completion device to see whether the writing is completed.
Data memory
Device data storage file
Write offset of the device data
storage file
Write offset
+0
+1
+2
7 APPLICATION INSTRUCTIONS
7.6 Reading/Writing Data Instructions
16 bits
597
7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents