½Ã°£ ´õÇϱâ/»©±â ÇÔ¼ö
@TimePlusMin(year,mon,day,hour,min) ÁÖ¾îÁø ½Ã°£(argument¿¡ µé¾î°¡´Â ½Ã°£)¿¡ ´ëÇÏ¿© 1ºÐÀ» ´õÇØÁØ´Ù.
@TimePlusHour(year,mon,day,hour) ÁÖ¾îÁø ½Ã°£(argument¿¡ µé¾î°¡´Â ½Ã°£)¿¡ ´ëÇÏ¿© 1½Ã°£À» ´õÇØÁØ´Ù.
@TimePlusDay(year,mon,day) ÁÖ¾îÁø ½Ã°£(argument¿¡ µé¾î°¡´Â ½Ã°£)¿¡ ´ëÇÏ¿© 1ÀÏÀ» ´õÇØÁØ´Ù.
@TimePlusMon(year,mon) ÁÖ¾îÁø ½Ã°£(argument¿¡ µé¾î°¡´Â ½Ã°£)¿¡ ´ëÇÏ¿© 1¿ùÀ» ´õÇØÁØ´Ù.
@TimeMinusMin(year,mon,day,hour,min) ÁÖ¾îÁø ½Ã°£(argument¿¡ µé¾î°¡´Â ½Ã°£)¿¡ ´ëÇÏ¿© 1ºÐÀ» »©ÁØ´Ù.
@TimeMinusHour(year,mon,day,hour) ÁÖ¾îÁø ½Ã°£(argument¿¡ µé¾î°¡´Â ½Ã°£)¿¡ ´ëÇÏ¿© 1½Ã°£À» »©ÁØ´Ù.
@TimeMinusDay(year,mon,day) ÁÖ¾îÁø ½Ã°£(argument¿¡ µé¾î°¡´Â ½Ã°£)¿¡ ´ëÇÏ¿© 1ÀÏÀ» »©ÁØ´Ù.
@TimeMinusMon(year,mon) ÁÖ¾îÁø ½Ã°£(argument¿¡ µé¾î°¡´Â ½Ã°£)¿¡ ´ëÇÏ¿© 1¿ùÀ» »©ÁØ´Ù.
ÀÌ ÇÔ¼ö¸¦ »ç¿ëÇÏ¿© °¨½ÃÇÁ·Î±×·¥ »ó¿¡¼ »ç¿ëÀÚ°¡ ¿øÇÏ´Â ½Ã°£À» ÁöÁ¤ÇÒ ¼ö ÀÖ°Ô²û ÇØÁØ´Ù.
½ºÅ©¸³Æ® ¿¹Á¦)
1) °¨½ÃÇÁ·Î±×·¥¿¡¼ »ç¿ëÀÚ°¡ ÁöÁ¤ÇÑ ½Ã°£ÀÇ ¸®Æ÷Æ® º¸±â
ÀÌ ±â´ÉÀ» À§Çؼ´Â @ReportSetTime(year,mon,day)ÇÔ¼ö¿Í @ReportView()¸¦ »ç¿ëÇÏ¿©¾ß ÇÑ´Ù.
À§ÀÇ ±×¸²ÀÇ ½Ã°£ ¼³Á¤ Çϱâ ȸé°ú °°ÀÌ
1)-1 ¿ì¼±Àº ¾Æ³¯·Î±× ÀÔ·Âű׿¡ YEAR, MON, DAY( ÅÂ±× ¸íÀº »ç¿ëÀÚ ÀÓÀÇ)¸¦ ¾Æ³¯·Î±× ÀԷ ű׿¡ ¸Þ¸ð¸® ű׷Πµî·ÏÇÑ´Ù.
1)-2 °¨½Ã ȸé»ó¿¡ À§ÀÇ Å±׸¦ ³ªÅ¸³»°í, ÇÁ·Î±×·¥ ¹öÆ°À» »ç¿ëÇÏ¿© ½ºÅ©¸³Æ®¸¦ ÀÛ¼ºÇÑ´Ù.
(½ºÅ©¸³Æ® ¹öÆ°Àº °£´ÜÈ÷, ¡®ÀÏ¡¯À» +/- ÇÏ´Â ¿¹Á¦¸¦ »ç¿ë ÇÏ°Ú½À´Ï´Ù.)
ÇÁ·Î±×·¥ ¹öÆ°(¡®D-¡® ¹öÆ°) ¡®ÀÏ¡¯À» »©´Â ÇÔ¼ö¸¦ Ãß°¡ÇÑ´Ù.
@TimeMinusDay($YEAR,$MON,$DAY);
À§¿Í °°ÀÌ ÇÑ ÁÙÀÇ ÇÔ¼ö¸¸ Ãß°¡ÇÏ¸é µÈ´Ù.
ÇÁ·Î±×·¥ ¹öÆ°ÁßÀÇ Çϳª¿¡ ¡®ÀÏ¡¯À» ´õÇØÁÖ´Â ÇÔ¼ö¸¦ Ãß°¡ÇÑ´Ù.
@TimePlusDay($YEAR,$MON,$DAY);
À§¿Í °°ÀÌ ÇÑ ÁÙÀÇ ÇÔ¼ö¸¸ Ãß°¡ÇÏ¸é µÈ´Ù.
1)-3 ¸®Æ÷Æ®¸¦ º¸¿©ÁÖ±â À§ÇÑ ÇÁ·Î±×·¥ ¹öÆ°À» Çϳª Ãß°¡ÇÑ´Ù.
¡®¸®Æ÷Æ® º¸±â¡¯ ¹öÆ°¿¡ ´ÙÀ½°ú °°ÀÌ ½ºÅ©¸³Æ®¸¦ Ãß°¡ÇÑ´Ù.
@ReportSetTime($YEAR, $MON, $DAY);
@ReportView("Report1.rptx"); // Report1.rptx ´Â »ç¿ëÀÚ°¡ ÀÛ¼ºÇÑ ¸®Æ÷Æ® ÆÄÀÏ À̸§ÀÌ´Ù.
À§¿Í °°ÀÌ »ç¿ëÇÏ¸é »ç¿ëÀÚ°¡ ÁöÁ¤ÇÑ ³¯Â¥ÀÇ ¸®Æ÷Æ®¸¦ º¼ ¼ö ÀÖ´Ù.( °¨½ÃÇÁ·Î±×·¥»ó¿¡¼ )
2) °¨½ÃÇÁ·Î±×·¥¿¡¼ »ç¿ëÀÚ°¡ ÁöÁ¤ÇÑ ½Ã°£ÀÇ Áö³ µ¥ÀÌÅÍ º¸±â
ÀÌ ±â´ÉÀ» ¼öÇàÇϱâ À§Çؼ´Â ´ÙÀ½°ú °°Àº ÇÔ¼ö¸¦ »ç¿ëÇÏ¿©¾ß ÇÑ´Ù.
@DataGetAiMin("Tag-name",int Data-Type,year,mon,day,hour,min);
@DataGetAiHour("Tag-name",int Data-Type,year,mon,day,hour);
@DataGetAiDay("Tag-name",int Data-Type,year,mon,day);
@DataGetAiMon("Tag-name",int Data-Type,year,mon);
@DataGetAiYear("Tag-name",int Data-Type,year);
@DataGetDiMin("Tag-name",int Data-Type,year,mon,day,hour,min);
@DataGetDiHour("Tag-name",int Data-Type,year,mon,day,hour);
@DataGetDiDay("Tag-name",int Data-Type,year,mon,day);
@DataGetDiMon("Tag-name",int Data-Type,year,mon);
@DataGetDiYear("Tag-name",int Data-Type,year);
À§ÀÇ ÇÔ¼ö´Â ºÐ/½Ã°£/ÇÏ·ç/¿ù/³â ´ÜÀ§ÀÇ ÀúÀåµÈ µ¥ÀÌÅÍ °ªÀ» ºÒ·¯¿À´Â ÇÔ¼öÀÌ´Ù.
Data-Type
¾Æ³¯·Î±× ÀÔ·ÂÅÂ±× ÀÎ °æ¿ì 0 : Æò±Õ°ª, 1 : ÃÖ¼Ò°ª, 2 : ÃÖ´ë°ª, 3 : Àû»ê°ª, 4 : ÇöÀç ÃÖ´ë- Áö³ ÃÖ´ë°ª
µðÁöÅÐ ÀÔ·ÂÅÂ±× ÀÎ °æ¿ì 0 :ON½Ã°£ , 1 : OFF½Ã°£, 2 : ON/OFF Ƚ¼ö
2)-1 1)¿¡¼ÀÇ ¿¹Á¦¿Í °°ÀÌ ¾Æ³¯·Î±× ÀÔ·ÂÅÂ±× YEAR,MON,DAY,HOUR,MINÀÇ ¸Þ¸ð¸®Å±׸¦ ÀÛ¼ºÇÑ´Ù.
´ÙÀ½¿¡ ºÒ·¯¿Ã µ¥ÀÌÅ͸¦ ÀúÀåÇÒ ¾Æ³¯·Î±× ¸Þ¸ð¸® ű׸¦ ÀÛ¼ºÇÑ´Ù.
( ¿¹¸¦ µé¾î AI_0001, AI_0002ÀÇ ÀÚ·á¿¡ ´ëÇÑ ½Ã°£ÀڷḦ º¸±âÀ§Çؼ´Â À̸¦ ÀúÀåÇÒ ¸Þ¸ð¸® ű׸¦ ¸¸µé¾î ÁØ´Ù. DATAAI_01, DATAAI02 )
2)-2 À§ÀÇ ±×¸²Ã³·³ °¨½ÃÈ¸é »ó¿¡´Â ½Ã°£À» ¼³Á¤ÇÒ ¼ö Àִ ȸé°ú ¼³Á¤µÈ ½Ã°£ÀÇ ÀڷḦ º¼ ¼ö Àִ ȸéÀ» ±¸¼ºÇÑ´Ù.
½Ã°£ ¼³Á¤È¸éÀº À§ÀÇ 1)ÀÇ ´ÙÀ½ ±×¸²Ã³·³ ³â/¿ù/ÀÏ/½Ã ¸¦ ¹Ù²Ü ¼ö ÀÖ´Â ½ºÅ©¸³Æ®¸¦ ÀÛ¼ºÇÑ´Ù.
¿ù/ÀÏ/½Ã ¸¦ »ç¿ëÀÚ°¡ ¹Ù²Ù±â À§Çؼ´Â ¿ì¼± ÇÁ·Î±×·¥ ¹öÆ°À» 6°³ ¸¸µç´Ù. ( ¿ùº¯°æ+/- ¹öÆ°, ÀϺ¯°æ +/-¹öÆ°, ½Ã°£º¯°æ +/-¹öÆ°)
°¢°¢ÀÇ ¹öÆ°¿¡ ´ÙÀ½ ±×¸²°ú °°ÀÌ ½ºÅ©¸³Æ®¸¦ ÀÛ¼ºÇÑ´Ù.
@TimePlusHour($YEAR,$MON,$DAY,$HOUR); //½Ã°£ + ¹öÆ° ½ºÅ©¸³Æ®
for(i=1 ; i <=2 ; i = i+1 ){
@sprintf(buf,"AI_%04d",i ) ; //buf ¶ó´Â º¯¼öÀÇ ¹öÆÛ¿¡ ¡°AI_0001¡± °ú ¡°AI_0002¡± ÀÇ ½ºÆ®¸µÀ» ÀúÀåÇÑ´Ù. AI_0001/AI_0002´Â ¾Æ³¯·Î±× ÀÔ·Â
ű×ÀÌ´Ù.
@sprintf(buf1,"DATAAI_%02d",i ) ; // buf1 ¶ó´Â º¯¼öÀÇ ¹öÆÛ¿¡ ¡°DATAAI_01¡± °ú ¡°DATAAI_02¡± ÀÇ ½ºÆ®¸µÀ» ÀúÀåÇÑ´Ù.
value=@DataGetAiHour(buf,4,$YEAR,$MON,$DAY,$HOUR); // buf¿¡ ÀúÀåµÈ ű×ÀÇ ÇØ´ç ³â/¿ù/ÀÏ/½Ã ÀÇ Áö³½Ã°£ ÃÖ´ë°ª-ÇöÀç½Ã°£ ÃÖ´ë°ª À» vlaue¶ó´Â º¯¼ö¿¡ ÀúÀåÇÑ´Ù.
@SetTagValue(buf1,value); //value ÀÇ °ªÀ» buf1(DATAAI_01/02)¿¡ ÀúÀåÇÑ´Ù.
}
À§¿¡¼ ¼³Á¤ÇÑ ÇÁ·Î±×·¥°ú ¸¶Âù°¡Áö·Î °¢°¢ÀÇ 6°³¿¡ ´ëÇÑ ÇÁ·Î±×·¥ ¹öÆ°¿¡ ½ºÅ©¸³Æ®¸¦ Ãß°¡ÇÏ¸é µÈ´Ù.