Mitsubishi Electric MELSEC iQ-R Series User Manual page 57

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

Advertisement

■When writing 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 Controller module cannot be connected normally
• When writing a same user program in multiple C Controller modules
1.
Create files.
File name
Description
STARTUP.CMD
Script file to copy files to the program memory
*1
STARTUP.ROM
Script file to load a user program
*2
file.out
User program
*1 Use any file name other than "STARTUP.CMD".
*2 Use arbitrary file name.
• STARTUP.CMD
copy("/2/file.out","/0/file.out")
copy("/2/STARTUP.ROM","/0/STARTUP.CMD")
(1) Copy the user program, "file.out" in the SD memory card to the program memory.
(2) Rename the operational script file, "STARTUP.ROM" in the SD memory card to "STARTUP.CMD", and copy it to the program memory.
• STARTUP.ROM
ld(1,0,"/0/file.out")
/*(1)*/
sp(func,0,0,0,0,0,0,0,0,0)
/*(2)*/
(1) Load the "file.out" file from root directory in the program memory.
(2) Generate the "func" function under the default task name (t1). (The "func" function is already included in the file.out file.)
2.
Write the created files to the SD memory card.
3.
Insert the SD memory card to a C Controller module.
4.
Turn the power OFF and ON, or reset the C Controller module.
5.
Check that the READY LED starts flashing. ("STARTUP.CMD" is executed.)
6.
Check that the READY LED turns ON. ("STARTUP.CMD" processing is completed.)
7.
Turn the power of the C Controller module OFF, and remove the SD memory card.
8.
Turn the power of the C Controller module ON.
9.
Check that the READY LED starts flashing. (The file name is changed and "STARTUP.CMD" command which is copied
to the program memory is executed.)
10.
Check that the READY LED turns ON. ("file.out" is executed.)
/*(1)*/
/*(2)*/
6 PROCEDURE BEFORE OPERATION
6.13 Registering User Program
6
55

Advertisement

Table of Contents
loading

This manual is also suitable for:

R12ccpu-v

Table of Contents