Programming; Program Example And Control Description - Mitsubishi Electric MELSEC iQ-R Series User Manual

Controller module
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

8.3

Programming

Create a program in which lamps connected to an output module and the dot matrix LED on the front of the C Controller
module flash.

Program example and control description

When the C Controller module is set to RUN, the output lamps Y10 and Y11 alternately turn ON.
Synchronizing with the output lamps, the dot matrix LED on the front of the C Controller module switches alternately between
"00__" and "__00".
/* Output control */
sRet = CCPU_Y_Out_WordEx(NORMAL_ACCESS, UNIT_XY, WORD, &usDataBuf, DUMMY);
if(sRet != 0){
printf("ERROR : CCPU_Y_Out_WordEx_1
return;
}
/* Dot matrix LED control */
sRet = CCPU_SetDotMatrixLED(DISPMODE_ASCII, &pcdata[0]);
if(sRet != 0){
printf("ERROR : CCPU_SetDotMatrixLED_1
return;
}
8 OPERATION EXAMPLE
70
8.3 Programming
Y10
Alternately
Alternately
Alternately
turns ON.
turns ON.
turns ON.
Y11
[%d(%04hxH)]\n", sRet, sRet);
[%d(%04hxH)]\n", sRet, sRet);

Advertisement

Table of Contents
loading

This manual is also suitable for:

R12ccpu-v

Table of Contents