From OpenSCADAWiki
Jump to: navigation, search

At demo mode present you should into attribute "Procedure play demo" describe demo procedure on internal language OpenSCADA DAQ.JavaLikeCalc. For example bellow led demo procedure of "Dynamic model AGLKS":

stepCur++; stepTm = 20;
//>> Open main mnemo
if(stepCur == 0)
{
	this.pg_1.pg_mn.pg_1.attrSet("pgOpen",true);
	this.attrSet("tipStatus","Main mnemo open.");
}
//>> Open main graphics
else if(stepCur == 1)
{
	this.pg_1.pg_ggraph.pg_1.attrSet("pgOpen",true);
	this.attrSet("tipStatus","Main graphics open.");
}
//>> Setpoint set more for PC KRD1
else if(stepCur == 2)
{
	SYS.DAQ.BlockCalc.Anast1to2node_cntr.PC_КРД1.sp.set(6);
	this.attrSet("tipStatus","The regulator PC_KRD1 setpoint increase.");
}
//>> Open contours group
else if(stepCur == 3)
{
	this.pg_1.pg_gcadr.pg_1.attrSet("pgOpen",true);
	this.attrSet("tipStatus","Contours group open.");
}
//>> Open overview cadr
else if(stepCur == 4)
{
	this.pg_1.pg_gview.pg_1.attrSet("pgOpen",true);
	this.attrSet("tipStatus","Overview frame open.");
}
//>> Open document
else if(stepCur == 5)
{
	this.pg_1.pg_doc.pg_1.attrSet("pgOpen",true);
	this.attrSet("tipStatus","Document open.");
}
//>> Open result graphics
else if(stepCur == 6)
{
	this.pg_rg.pg_rg.pg_1.attrSet("pgOpen",true);
	this.attrSet("tipStatus","Result graphics open.");
}
//>> Open mnemo for KM101
else if(stepCur == 7)
{
	this.pg_2.pg_mn.pg_KM101.attrSet("pgOpen",true);
	this.attrSet("tipStatus","Mnemo KM101 open.");
}
//>> Open graphics for KM101
else if(stepCur == 8)
{
	this.pg_2.pg_ggraph.pg_1.attrSet("pgOpen",true);
	this.attrSet("tipStatus","Graphics КМ101 open.");
}
//>> Open PID-control panel
else if(stepCur == 9)
{
	this.ownerSess().pg_control.pg_ElCadr.attrSet("pgOpenSrc",this.pg_1.pg_mn.pg_1.wdg_PC1.attr("path"));
	this.attrSet("tipStatus","The parameter PC_KRD1 control panel open.");
	stepTm = 1;
}
//>> Open PID-control page
else if(stepCur == 10)
{
	this.ownerSess().pg_control.pg_cntrRegul.attrSet("pgOpenSrc",this.ownerSess().pg_control.pg_ElCadr.attr("path"));
	this.attrSet("tipStatus","The regulator PC_KRD1 control panel open.");
}
//>> Setpoint restore for PC KRD1
else if(stepCur == 11)
{
	SYS.DAQ.BlockCalc.Anast1to2node_cntr.PC_КРД1.sp.set(5.8);
	this.attrSet("tipStatus","The regulator PC_KRD1 setpoint restore.");
}
else { stepCur = -1; stepTm = 0; }