Mitsubishi Electric MELSEC iQ-R C User Manual page 34

Programmable controller intelligent function module
Hide thumbs Also See for MELSEC iQ-R C:
Table of Contents

Advertisement

■When writing files from an SD memory card by copying with a command in a script file
The following shows the procedure to copy files in an SD memory card by using a command in a script file.
Copy a file in the SD memory card in the following cases.
• When a personal computer and a C intelligent function module cannot be connected normally
• When writing a same user program in multiple C intelligent function modules
1.
Create the following files.
File Name
STARTUP.CMD
*1
STARTUP.ROM
*2
file.out
*1 Any file name other than "STARTUP.CMD"
*2 Any file name
• STARTUP.CMD
copy("/SD/file.out","/ROM/file.out")
copy("/SD/STARTUP.ROM","/ROM/STARTUP.CMD") /*(2)*/
(1) Copy the user program "file.out" in the SD memory card to the standard ROM.
(2) Change the name of the script file "STARTUP.ROM" for operation in the SD memory card to "STARTUP.CMD" and then copy to the standard ROM.
• STARTUP.ROM
ld(1,0,"/ROM/file.out")
sp(func,0,0,0,0,0,0,0,0,0)
(1) Load the "file.out" file from the root folder of the standard ROM.
(2) Create "func" function with the default task name (t1). ("func" function has been already included in file.out)
2.
Write the created files to the SD memory card.
3.
Insert the SD memory card to the C intelligent function module.
4.
Reset the CPU module, or turn the power OFF and ON.
5.
Check that the RUN LED starts flashing. ("STARTUP.CMD" is executed.)
6.
Check that the RUN LED turns ON. ("STARTUP.CMD" processing is completed.)
7.
Turn the power of the CPU module OFF, and remove the SD memory card from the C intelligent function module.
8.
Turn the power of the CPU module ON.
9.
Check that the RUN LED starts flashing (low-speed). (The file name is changed and the "STARTUP.CMD" copied to the
standard ROM is executed.)
10.
Check that the RUN LED turns ON. ("file.out" is executed.)
4 PROCEDURE BEFORE OPERATION
32
4.2 Creating User Program
Description
Script file to copy each file to the standard ROM
Script file to load a user program
User program file
/*(1)*/
/*(1)*/
/*(2)*/

Advertisement

Table of Contents
loading

Table of Contents