WINCC

已锁定

手机用户20200722103210

  • 帖子

    14
  • 精华

    0
  • 被关注

    1

论坛等级:游士

注册时间:2020-07-22

普通 普通 如何晋级?

WINCC

796

2

2020-09-03 17:04:00

void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
{
// WINCC:TAGNAME_SECTION_START
// syntax: #define TagNameInAction "DMTagName"
#define v_day_begin        "day_begin"
#define v_month_begin         "month_begin"
#define v_year_begin         "year_begin"
#define v_hour_begin         "hour_begin"
#define v_minute_begin        "minute_begin"

#define v_day_end         "day_end"
#define v_month_end         "month_end"
#define v_year_end         "year_end"
#define v_hour_end         "hour_end"
#define v_minute_end         "minute_end"
// next TagID : 12
// WINCC:TAGNAME_SECTION_END

// WINCC:PICNAME_SECTION_START
// syntax: #define PicNameInAction "PictureName"
// next PicID : 1
// WINCC:PICNAME_SECTION_END


WORD day_b, month_b, year_b, hour_b, minute_b;
WORD day_e, month_e, year_e, hour_e, minute_e;
char SQL[120]        = "";
char SQL_start[60]     = "";
char SQL_end[60]     = "";

day_b=GetTagWord(v_day_begin);
month_b=GetTagWord(v_month_begin);    
year_b=GetTagWord(v_year_begin);
hour_b=GetTagWord(v_hour_begin);
minute_b=GetTagWord(v_minute_begin);
sprintf( SQL_start, "DATETIME >=  '%d-%02d-%02d %02d:%02d:00.000000000'", year_b, month_b, day_b, hour_b, minute_b );

day_e=GetTagWord(v_day_end);
month_e=GetTagWord(v_month_end);    
year_e=GetTagWord(v_year_end);
hour_e=GetTagWord(v_hour_end);
minute_e=GetTagWord(v_minute_end);
sprintf( SQL_end, "DATETIME <=  '%d-%02d-%02d %02d:%02d:00.000000000'", year_e, month_e, day_e, hour_e, minute_e );

sprintf( SQL, "%s AND %s", SQL_end, SQL_start );
SetPropChar(lpszPictureName,"Control1","MsgFilterSQL", SQL );    //Return-Type: BOOL






麻烦各位高工  这段脚本没看懂  麻烦各位高工 解释一些  谢谢大家

WINCC 已锁定
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC WinCC / Panel

共有33043条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

快扫描右侧二维码晒一晒吧!

再发帖或跟帖交流2条,就能晋升VIP啦!开启更多专属权限!

  • 分享

  • 只看
    楼主

top
X 图片
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。