C Controller Module Dedicated Functions; Program Processing; Considerations - Mitsubishi Electric MELSEC iQ-R C Programming Manual

Melsec iq-r series programmable controller
Hide thumbs Also See for MELSEC iQ-R C:
Table of Contents

Advertisement

1.2

C Controller Module Dedicated Functions

C Controller dedicated functions of the dedicated function libraries are used to control C Controller module.
These functions can be used for reading status of C Controller module or accessing resources such as LED control and clock.

Program processing

The following shows the user program processing using the C Controller module dedicated function.
1.
Start a task.
2.
Read the status of C Controller module and access the resources such as LED control and clock by using the C
Controller module dedicated function.
3.
Complete the task.

Considerations

Considerations for user WDT (user watchdog timer)
■User WDT error occurrence
If a user WDT cannot be reset due to a user program runaway, a user WDT error will occur.
In this case, take the following corrective actions.
• Increase the user WDT period set with the CCPU_StartWDT function.
• Lower the number of tasks with high CPU utilization or make them deactivated.
• Review the user program.
Reset the C Controller module once the corrective actions have been taken.
In the user program, a user WDT can be used to monitor the hardware and status of user program, and
processing timeout for accessing and controlling each module.
■User WDT setting range
The user WDT period can be set within the range of 100 ms to 10,000 ms.
■Output when a user WDT error occurs
When a user WDT error occurs, the output turns OFF.
Considerations for the dedicated instructions
Considerations for argument are shown below:
• For the first argument, "pcInstName", categorizing the dedicated instructions (D/DP/J/JP/G/GP/M) is not required.
• Devices of the own station cannot be specified. Reserve the required area with a user program, and specify the start
address of the area to the relevant argument.
• Specify devices of other stations by using a character string. Set the value (the number of elements to which one is added
for the termination code) to the number of elements for the array.
(Example) To specify D4: char cDev[3] = {"D4"};
Set '3', the total number of '2' for D4 and '1' for termination code, to the number of elements for the character string.
• When the data type is device name (control data, input data, and output data), specify the argument using an array.
• The size is required to be set according to the number of elements for the array, which is specified to the argument. When
data type is 16-bit binary, BCD 4-digit, or real number, set the size to '1'. When data type is 32-bit binary or BCD 8-digit, set
the size to '2'.
• When data type is bit (completion device), specify the argument using an array. Specify '1' for completion or '0' for
incompletion to the first array. In the second array, '0' or '1' is stored for the normal completion or abnormal completion,
respectively.
• For arguments without the setting data, set the setting data to NULL, and set the size to '0'.
• Errors which occur in the dedicated instruction are not registered in the event history.
1 COMMON ITEMS
8
1.2 C Controller Module Dedicated Functions

Advertisement

Table of Contents
loading

Table of Contents