Mitsubishi MELSEC-Q Series User Manual page 521

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

Advertisement

10
FUNCTIONS AND PROGRAMMING
<Stored files>
File in standard ROM
/ROM
/DirB
C Controller module
<Task settings>
Startup
Task name
order
1
Default: tN (N=1, 2, ...)
2
taskB
<Script file description example>
ld (1, 0, "/CF/DirA/fileA.out")
ld (1, 0, "/ROM/DirB/fileB.out")
sp (funcA, 0, 0, 0, 0, 0, 0, 0, 0, 0)
taskSpawn ("taskB", 120, 0, 5000, funcB,10, 0, 0, 0, 0, 0, 0)
1) The "fileA.out" file is loaded from the CompactFlash card "DirA" directory.
2) The "fileB.out" file is loaded from the standard ROM "DirB" directory.
3) The "funcA" function is generated under the default task name (t1).
4) The "funcB" function is generated under the task name "taskB".
Figure 10.17 Script file description example (loaded from CompactFlash Card)
(b) When loading user programs from script file on CompactFlash card (for the
Q06CCPU-V only)
The following gives an example of loading user programs ("fileA.out", "fileB.out")
in the standard ROM and CompactFlash card from the script file in the
CompactFlash card.
*2
"fileB.out"
File in CompactFlash card
/CF
/ DirA
Priority
Stack size (byte)
Default: 100
Default: 20000
120
5000
POINT
Since the maximum number of arguments that can be specified for one command
is 12, up to seven arguments can be given to the function entry specified in
taskSpawn (funcB in the above example).
The task will not start if eight or more arguments are specified for the function
entry specified in taskSpawn (funcB in the above example).
10.2 Programming Using Bus Interface Functions
"STARTUP.CMD"
*1 "funcA" function already included in fileA.out
*1
"fileA.out"
*2 "funcB" function already included in fileB.out
Function
Argument specification
name
funcA
None
funcB
Specified (First argument: 10)
1)
2)
3)
4)
10.2.8 Creating script file "STARTUP.CMD"
9
10
11
12
File storage location
/CF/DirA/fileA.out
13
/ROM/DirB/fileB.out
14
15
16
10
- 34

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec q06ccpu-vMelsec q06ccpu-v-bMelsec sw3pvc-ccpu-e

Table of Contents