Creating A Script File - Mitsubishi Electric MELSEC iQ-R C User Manual

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

Advertisement

Creating a script file

A script file "STARTUP.CMD" is a file to describe the loading destination of a user program which starts when starting a C
intelligent function module and the starting order of tasks.
Considerations for creating a script file
■Starting a user program
Describe a command so that a user program is executed by activating the task
*1 Priority: 100 to 255
■Specifying VX_FP_TASK option
When VX_FP_TASK option is specified in the third argument of taskSpawn, specify "0x1000000".
The VX_FP_TASK option is specified for "funcA" function as follows:
taskSpawn("taskA",100,0x1000000,20000,funcA,0,0,0,0,0,0,0)
Script file storage location
A script file can be stored in the root folder of the standard ROM and an SD memory card.
Store a script file in the root directory.
■When script files stored into both the standard ROM and SD memory card
When a script file is stored in both memory, the script file in the SD memory card has priority, and the script file in the standard
ROM is not executed.
In the system which has been operated by a script file stored in the standard ROM, its processing can be
switched for maintenance easily by installing an SD memory card in which a script file for maintenance work is
stored.
Description of scripts
■Description of commands
• Only one command can be described in one line.
• Up to 12 arguments can be specified for one command.
■Description of comment statements
• Describe "//" at the beginning of a line.
• There is no limit on the number of characters in a statement.
■Executing C++ functions
Describe the function declaration portion on C++ source code as follows.
• extern "C" {Function declaration portion}
Description of commands in a script file allows the following operations.
• Copying a user program
• Formatting the standard ROM
Commands described in a script file are the same as contents described in a startup script file for VxWorks.
For more details, refer to the manual for VxWorks.
*1
.
4 PROCEDURE BEFORE OPERATION
4.2 Creating User Program
4
29

Advertisement

Table of Contents
loading

Table of Contents