1
PROGRAMMING
CW Workbench 4 is used for development of user programs to run on the VxWorks part.
For details of creation of user programs, refer to the following manual.
MELIPC MI5000 Series User's Manual (Startup)
For details on CW Workbench 4, refer to the following manual.
CW Workbench 4 Operating Manual
1.1
C Controller Module Dedicated Functions
C Controller dedicated functions are the dedicated function libraries that controls MELIPCs.
The following section shows the argument specifications of the C Controller module dedicated functions and considerations
when creating user programs.
Program processing
The following shows the procedure for processing a user program using a C Controller module dedicated function.
1.
Start a task.
2.
Read the module status, control the LED status, and access a resource such as a clock by using a C Controller
dedicated function.
3.
End the task.
Argument specifications
The following shows the argument specifications of C Controller module dedicated functions.
Device type
For the device types to be specified by the C Controller module dedicated functions, either a code or a device name can be
specified.
Device names are defined in the include files (CCPUFunc.h).
■Device type for own station access
The following table shows the device types that can be specified by the argument [Device type (sDevType)].
Device name (device)
Internal relay (M)
Special relay (SM)
Data register (D)
Special register (SD)
Link relay (B)
Link register (W)
File register (ZR)
Target functions
Page 53 CCPU_ReadDevice
Page 59 CCPU_ResetDevice
Page 63 CCPU_SetDevice
Page 79 CCPU_WriteDevice
Page 87 CCPU_ReadDevice_ISR
Page 90 CCPU_ResetDevice_ISR
Page 91 CCPU_SetDevice_ISR
Page 97 CCPU_WriteDevice_ISR
1 PROGRAMMING
8
1.1 C Controller Module Dedicated Functions
Code
Decimal
Hexadecimal
4
4H
5
5H
13
DH
14
EH
23
17H
24
18H
220
DCH
Device name specification
Dev_CCPU_M
Dev_CCPU_SM
Dev_CCPU_D
Dev_CCPU_SD
Dev_CCPU_B
Dev_CCPU_W
Dev_CCPU_ZR