2.5
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;
}
2 USING C CONTROLLER MODULE
22
2.5 Programming
Y10
Alternately
Alternately
Alternately
turns ON.
turns ON.
turns ON.
Y11
[%d(%04hxH)]\n", sRet, sRet);
[%d(%04hxH)]\n", sRet, sRet);