Creating User Program; Programming Procedure - 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

4.2

Creating User Program

Create a user program by using VxWorks standard API functions and functions offered by a C intelligent function module in
accordance with the specification of VxWorks.
For programming method of VxWorks standard API functions, refer to the manual for VxWorks of the following version.
• VxWorks Version 6.9
For details on the dedicated function library of the C intelligent function module, refer to the following manual.
MELSEC iQ-R C Intelligent Function Module Programming Manual
MELSEC iQ-R C Controller Module/C Intelligent Function Module Programming Manual (Data Analysis)
For details on sample programs, please consult your local Mitsubishi representative.

Programming procedure

The following shows the procedure for creating a user program.
For details on project creation and programming method, refer to the following manual.
CW Workbench/CW-Sim Operating Manual
1.
Install CW Workbench on a personal computer.
2.
Start CW Workbench, and check that VxWorks image file of the personal computer is the same as that of the C intelligent
function module. ( Page 28 Checking VxWorks image file)
3.
Create a project of the user program.
4.
Configure various settings to use the dedicated function library.
5.
Create a user program.
6.
Debug the user program.
7.
Create a script file to start the user program. ( Page 29 Creating a script file)
8.
Register the created user program and the script file to the C intelligent function module. ( Page 31 Registering a
user program)
Considerations for creating a user program
The following shows the considerations when creating a user program.
■Endian format (memory layout)
The endian format (memory layout) of a C intelligent function module is little endian. Compile a user program in the little
endian format.
■VxWorks real-time process (RTP)
C intelligent function module does not support applications running in VxWorks real-time process. Create a user program as
an application based on the VxWorks kernel.
■Build property
When compiling a user program, enter "-mlong-calls" in the box next to the [Tool Flags] button, and enter "-fsigned-char" in the
boxes next to the [Debug mode] and [Non Debug mode] buttons.
[Project Explorer] of CW Workbench  right-click the respective project  [Properties]  [Build Properties]  [Tools]
4 PROCEDURE BEFORE OPERATION
4.2 Creating User Program
4
25

Advertisement

Table of Contents
loading

Table of Contents