Mitsubishi Electric MELIPC MI5A1P User Manual page 81

Table of Contents

Advertisement

Precautions
The following shows the considerations for creating a user program.
■Endian format (memory allocation)
MELPIC employs little-endian format (memory allocation). Compiling user programs with little-endian format is required.
■VxWorks real-time process (RTP)
MELIPC does not support applications that run in VxWorks real-time process. Create a user program as VxWorks karnel-
based application.
■Execution of a user program
To run a user program, start a task from a script file. Running a user program without starting a task may cause system
malfunction.
■Starting a task that calculates floating point values
To start the following tasks, specifying the VX_FP_TASK option to the third argument of taskSpawn is required.
• A task that calculates floating point values
• A task that calls function to return floating point values
• A task that calls function for which a floating point value can be set to an argument
If the tasks above are started without specifying the VX_FP_TASK option, the operating system will out of control.
When specifying the VX_FP_TASK option in a script file, refer to the following section.
Page 82 When specifying the VX_FP_TASK option
For details on the VX_FP_TASK option, refer to the manual for VxWorks.
■Task execution in the MELIPC STOP state
Even if the operating status of a MELIP is in the STOP state, the user program task will not stop. To divide the process of a
user program according to the MELIPC operation, use the C Controller module dedicated function (CCPU_GetCpuStatus).
■Priority of execution tasks
Set the priority of a task for running a user program as follows.
• When not to perform the access using an FTP or file sharing function while running a user program, set the priority of the
user program as 100 or more (within 100 to 255). Otherwise, the system may not operate properly.
• The access using an FTP or file sharing function while running a user program is available when the processing (task) of
the FTP or the file sharing function of a MELIPC operates with the priority 150. Therefore, set the priority of the user
program within 151 to 255. When setting the priority within 100 to 150, set a waiting time (taskDelay) in the user program so
that the FTP or file sharing function is enabled.
■To send/receive data to/from a target device in Ethernet communications
Before communicating with a target device though Ethernet, check the port number that is being used in the MELIPC using
the VxWorks standard command, 'netstat'
between the MELIPC and the target device. Doing so may result in abnormal communications.
*1 'netstat' command must be run in the Telnet tool.
■When a response is not returned from a function
If an error occurs in a MELIPC, a response may not be returned from a function. Create a user program considering the
aspect of this symptom.
An error occurrence status can be checked by using the C Controller module dedicated function (CCPU_GetErrInfo).
*1
. Do not use the port number which has already been used for communications
9 CREATION AND REGISTRATION OF USER PROGRAMS
9.3 User Programs for the VxWorks Part
9
79

Advertisement

Table of Contents
loading

Table of Contents