7controlthematrixswitchers, 44 pgmⅢ programmable ethernet control system – CREATOR CR-PGMIII User Manual

Page 51

Advertising
background image

CREATOR CHINA 2011-03

WWW.CREATOR1997.COM

44

PGMⅢ Programmable Ethernet Control System

}

RELEASE()
{
}

}

7.9.7 Control the matrix switchers

DEFINE_DEVICE

tp = T:10:TP;
mcom = M:1000:COM;

DEFINE_VARIABLE

string checkMode =““;
string outstr = ““;

string instr =““;

DEFINE_FUNCTION

//matrix output function
void shuchu()
{

SEND_COM(mcom,1,instr+checkMode+outs

tr+”.”);

}

DEFINE_START

SET_COM(mcom,1,9600,8,0,10,0,232);

DEFINE_EVENT

//choose the mode
BUTTON_EVENT(tp,4)
{

PUSH()
{

checkMode = “B”;//AVmode

}

}

BUTTON_EVENT(tp,6)
{

PUSH()

{

checkMode = “A”; //Amode

}

}

BUTTON_EVENT(tp,5)

{

PUSH()
{

checkMode = “V”; //Vmode

}

}

//choose the output

BUTTON_EVENT(tp,1)
{

PUSH()
{

outstr =“1”;

}

}

BUTTON_EVENT(tp,2)
{

PUSH()
{

outstr =“2”;

}

}

BUTTON_EVENT(tp,3)
{

PUSH()
{

outstr =“3”;

}

}

// select the input
BUTTON_EVENT(tp,11)

Advertising