Mitsubishi Electric Eclipse User Manual Page 31

  • Download
  • Add to my manuals
  • Print
  • Page
    / 60
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 30
29
<5> Programming
Create a program in which lamps connected to an output module and the 7-segment LED on the front
of the C Controller module flash.
1. Program example and control description
Create a program that performs the following control.
When the C Controller module is set to RUN, output lamps Y00 and Y01 alternately turn on.
Synchronizing with the on status of the output lamps, the tens place and ones place of the 7-segment
LED alternately turn on.
Y00
Y01
Output access
7-segment LED control
/* Perform an output control and 7-segment LED control in turns by 20 times.
for(i = 0; i < 20; i++){
/* Output control
sRet = QBF_Y_Out_WordEx(lPath, NORMAL_ACCESS, UNIT_XY, WORD, &usDataBuf, DUMMY);
if(sRet != 0){
printf("ERROR : QBF_Y_Out_WordEx_1 [%d(%04hxH)]\n", sRet, sRet);
QBF_Close(lPath);
return;
/* 7-segment LED control
sRet = QBF_Control7SegLED(lPath, MODE_MANUAL, &pcdata[0]);
if(sRet != 0){
Alternately turns on.
Alternately turns on.
Alternately turns on.
Page view 30
1 2 ... 26 27 28 29 30 31 32 33 34 35 36 ... 59 60

Comments to this Manuals

No comments