40 pgmⅢ programmable ethernet control system – CREATOR CR-PGMIII User Manual

Page 47

Advertising
background image

CREATOR CHINA 2011-03

WWW.CREATOR1997.COM

40

PGMⅢ Programmable Ethernet Control System

LEVEL_EVENT(tp7600,1)
{

SEND_M2M_LEVEL(“192.168.1.10”,2,LEVE

L.Value);

SEND_M2M_LEVEL(“192.168.1.2”,12,LEVE

L.Value); // send the touch panel’s bar data 13
with the joint number of 12 to the controller with
the IP of 192.168.1.2

}

BUTTON_EVENT(tp7600,1)
{

PUSH()
{

SEND_M2M_DATA(“192.168.1.2”,”11111”);

//send character 11111 to the controller with the IP
of 192.168.1.2

SEND_M2M_JNPUSH(“192.168.1.2”,12); //

send the touch panel’s joint number 12 to the
controller with the IP of 192.168.1.2

SEND_M2M_JNRELEASE(“192.168.1.2”,12

);// send release command of the touch panel’s
joint number 12 to the controller with the IP of
192.168.1.2

//

}

}

//

send the data of the 2

nd

way of the COM

interface to the controller with the IP of
192.168.1.10

DATA_EVENT(com,2)
{

ONDATA()
{

SEND_M2M_DATA(“192.168.1.10”,BYTES_

TO_STRING(DATA. Data));

}

}

M2MDATA_EVENT()
{

ONDATA()
{

TRACE(“all

ip:”+DATA.STR_M2MIPADDR +” data:” +DATA.
Data String);

}

}

M2MDATA_EVENT(“127.0.0.1”)
{

ONDATA()
{

TRACE(“dai

ip

ip:”+DATA.STR_M2MIPADDR +” data:” +DATA.
DataString);

int p = DATA.B1;
string ip =

DATA.STR_M2MIPADDR;

}

}

M2MDATA_EVENT(“127.0.0.11”)
{

ONDATA()
{

}

}

DEFINE_CALL_TEMPLATE

abc(tpx,3,5,com,4);

Advertising