威纶通吧 关注:1,009贴子:2,147
  • 1回复贴,共1

求大神帮个忙

只看楼主收藏回复

本人想做一个按钮宏
当按钮被按下时置位PLC M0同时切换指定触摸屏画面
有没有什么好的方法
求指导
谢谢


1楼2018-01-25 00:13回复
    macro_command main()
    short page
    bool a=1,start
    GetData(start, "Local HMI", LB, 20, 1)
    if start==1 then
    page=11 //跳转至窗口11
    SetData(page, "Local HMI", LW, 500, 1) //PLC控制地址LW500
    SetData(a, "Mitsubishi FX2N", M, 0, 1) //M0置ON
    end if
    end macro_command
    可以试试,我也正在学宏


    3楼2018-02-09 15:15
    回复