V 10
1
LANG:1 8 (NoName)
PANEL,487 397 738 401 N "_3DFace" 0
EEE E E 1 -1 -1 0  190 90
"" 0 1
EE 2
"CBRef""1"
"EClose"E
""
DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
LAYER, 0 
1
LANG:1 6 Layer1
13 0
"DPtype"
""
1 160 80 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
1 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
158 78 312 132
T 
1
LANG:1 11 DP OPC type
"main()
{
int i,ii,crate,try;
string datapoint,testdatapoint;
dyn_string db;

DebugN(\"tried\");

db = makeDynString(\"MOch_Tm0\",\"MOch_Tm1\",\"HVchCurr\",\"HVchITrp\");

dpGet(\"Crate.Numb:_original.._value\",crate);
for(i=0;i<=47;i++)
 {
 sprintf(datapoint,\"SCTmops1:Crate%02d.Channel%02d.\",crate,i);
 for(ii=1;ii<=3;ii++)
  {
  dpSetWait(datapoint+db[ii]+\".Recv:_address.._datatype\",0);
  }
 for(ii=4;ii<=4;ii++)
  {
  dpSetWait(datapoint+db[ii]+\".Send:_address.._datatype\",0); 
  //DebugN(\"testdatapoint0\",datapoint+db[ii]+\".Send:_address.._datatype\");
  }
 }
}" 0
 E E "main()
{

}" 0

13 1
"Button2"
""
1 160 20 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
1 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
158 18 312 72
T 
1
LANG:1 10 DP Archive
"main()
{
int i,ii,crate;
string datapoint,testdatapoint;
dyn_string db;

DebugN(\"tried\");

db = makeDynString(\"LVchStat\",\"LVch_Vcc\",\"LVps_Vcc\",\"LVretVcc\",\"LVch_Vdd\",
						 \"LVps_Vdd\",\"LVretVdd\",\"LVchVCSV\",
                         \"LVchVCSI\",\"LVchPINV\",\"LVchPINI\",
                         \"MOch_Tm0\",\"MOch_Tm1\",
                         \"LVch_Icc\",\"LVch_Idd\",\"HVchVolt\",
                         \"HVchCurr\",\"HVchStat\");


dpGet(\"Crate.Numb:_original.._value\",crate);
for(i=0;i<=47;i++)
 {
 for(ii=1;ii<=18;ii++)
  {
  sprintf(datapoint,\"SCTmops1:Crate%02d.Channel%02d.\",crate,i);
  sprintf(testdatapoint,datapoint+db[ii]+\".Recv:_archive.._type\");
  dpSetWait(datapoint+db[ii]+\".Recv:_archive.._type\", 45,
  datapoint+db[ii]+\".Recv:_archive.._archive\", TRUE,
  datapoint+db[ii]+\".Recv:_archive.1._type\", 15);
  }
 }
for(i=0;i<=11;i++)
 {
 sprintf(datapoint,\"SCTmops1:Crate%02d.LV_card%02d.LVcaStat.Recv\",crate,i);
 dpSetWait(datapoint+\":_archive.._type\", 45,
 datapoint+\":_archive.._archive\", TRUE,
 datapoint+\":_archive.1._type\", 15);
  DebugN(\"LV card\",i,datapoint);
 }
 for(i=0;i<=5;i++)
 {
 sprintf(datapoint,\"SCTmops1:Crate%02d.HV_card%02d.HVcaStat.Recv\",crate,i);
 dpSetWait(datapoint+\":_archive.._type\", 45,
 datapoint+\":_archive.._archive\", TRUE,
 datapoint+\":_archive.1._type\", 15);
  DebugN(\"Hv card\",i,datapoint);
 }
}" 0
 E E "main()
{

}" 0

13 2
"Button3"
""
1 160 150 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
2 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
158 148 312 202
T 
1
LANG:1 13 DP conversion
"main()
{
int i,ii,crate,try;
string datapoint,testdatapoint;
dyn_string db,dparray;
dyn_float convarrayb,convarraya;

DebugN(\"tried\");

db = makeDynString(\"MOch_Tm0\",\"MOch_Tm1\",\"HVchITrp\");

for(crate=0;crate<=1;crate++)
{
 for(i=0;i<=47;i++)
  {
  sprintf(datapoint,\"SCTmops1:Crate%02d.Channel%02d.\",crate,i);
  dpSetWait(datapoint+\"HVchITrp.Send:_cmd_conv.1._poly_a\",0); 
  dpSetWait(datapoint+\"HVchITrp.Send:_cmd_conv.1._poly_b\",100); 
  DebugN(\"testdatapoint0\",datapoint+\"HVchITrp.Send:_cmd_conv.1._poly_b\");
  }
 }

// msg conversion for the readback datapoint for the database


 dparray=makeDynString(\"LVch_Vcc\",\"LVch_Vdd\",\"LVchVCSV\",
                       \"LVchPINV\",\"LVchCTrp\",\"LVchDTrp\",
                       \"LVchTLim\",\"LVchTTrp\",\"HVchITrp\",
                       \"LVcaTrip\");
                        
  convarrayb=makeDynFloat(0.02,0.02,0.04,0.05,2,2,1,1,0.01);
  convarraya=makeDynFloat(0,0,0,0,0,0,-128,-128,0);
  
  for(i=1;i<=9;i++)
  {
  sprintf(datapoint,\"SCTmops1:ReadDB.channel.%s.Send\",dparray[i]);
  DebugN(datapoint);
  dpSetWait(datapoint+\":_msg_conv.._type\", 33,
            datapoint+\":_msg_conv.1._type\", 2);
 

  dpSetWait(datapoint+\":_msg_conv.1._poly_a\",convarraya[i]); 
  dpSetWait(datapoint+\":_msg_conv.1._poly_b\",convarrayb[i]); 
  }

  sprintf(datapoint,\"SCTmops1:ReadDB.card.%s.Send\",dparray[10]);
    DebugN(datapoint);
  dpSetWait(datapoint+\":_msg_conv.._type\", 33,
            datapoint+\":_msg_conv.1._type\", 2);
  dpSetWait(datapoint+\":_msg_conv.1._poly_a\",0); 
  dpSetWait(datapoint+\":_msg_conv.1._poly_b\",1/2.5); 

}" 0
 E E "main()
{

}" 0

13 3
"Button1"
""
1 164 220 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
3 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
162 218 316 272
T 
1
LANG:1 13 OPC Addresses
"main()
{

string dpeName, OPCItemName;
string direction, opcServerName, OPCGroup, intDpeType;
int driverNum, i,j;
	
  setValue(\"\",\"foreCol\",\"Red\");

  opcServerName = \"CANopen\";
  driverNum = 1;

 //Addresse for channel Temperatures
  for(j=0;j<=1;j++)
  {
  for(i=0; i<=47; i++) {
  
	DebugN(\" Setting Temperature Addresses for Channel  = \", i, \"and crate\",j);

	intDpeType = 0; // Float32 



	OPCGroup = \"Moni\"; //moni group
	direction = \"in\";
	
	sprintf( OPCItemName, \"Bus00_Crate%02d_MOch_Tm0_RecvChan%d\",j, i );
	sprintf( dpeName, \"SCTmops1:Crate%02d.Channel%02d.MOch_Tm0.Recv\",j, i );
	OPCAddress(dpeName, opcServerName, OPCGroup, OPCItemName, direction, driverNum,intDpeType,j);
	sprintf( OPCItemName, \"Bus00_Crate%02d_MOch_Tm1_RecvChan%d\",j, i );
	sprintf( dpeName, \"SCTmops1:Crate%02d.Channel%02d.MOch_Tm1.Recv\",j, i );
	OPCAddress(dpeName, opcServerName, OPCGroup, OPCItemName, direction, driverNum,intDpeType,j);
	}
  }

//  addresses for HV cards status

  for(j=0;j<=1;j++)
	{
    for(i=0;i<=5;i++)
      {
   	  DebugN(\" Setting Status and Mask Addresses for HV card  = \", i ,\"and crate \", j);
	intDpeType = 0; 

	// GROUP COMM 
	direction = \"out\";
	OPCGroup = \"Comm\";

	sprintf( OPCItemName, \"Bus00.Crate%02d.Crate%02d_HVcaMask_SendCard%d\", j,j, i );
	DebugN(\"OPC\",OPCItemName);
	sprintf( dpeName, \"SCTmops1:Crate%02d.HV_card%02d.HVcaMask.Send\", j,i );
	OPCAddress(dpeName, opcServerName, OPCGroup, OPCItemName, direction, driverNum,intDpeType,j);
	// GROUP MONI 
	direction = \"in\";
	OPCGroup = \"Moni\";

	sprintf( OPCItemName, \"Bus00.Crate%02d.Crate%02d_HVcaMask_RecvCard%d\", j, j, i );
	DebugN(\"OPC\",OPCItemName);
	sprintf( dpeName, \"SCTmops1:Crate%02d.HV_card%02d.HVcaMask.Recv\", j,i );
	OPCAddress(dpeName, opcServerName, OPCGroup, OPCItemName, direction, driverNum,intDpeType,j);

        }
    } 

	
//  addresses for LV cards status

 

  for(j=0;j<=1;j++)
	{
    for(i=0;i<=11;i++)
      {
   	  DebugN(\" Setting Status and Mask Addresses for LV card  = \", i ,\"and crate \", j);
	intDpeType = 0; // 32-Bit Integer signed/

	// GROUP COMM 
	direction = \"out\";
	OPCGroup = \"Comm\";

	sprintf( OPCItemName, \"Bus00.Crate%02d.Crate%02d_LVcaMask_SendCard%d\", j, j, i );
	DebugN(\"OPC\",OPCItemName);
	sprintf( dpeName, \"SCTmops1:Crate%02d.LV_card%02d.LVcaMask.Send\", j,i );
	OPCAddress(dpeName, opcServerName, OPCGroup, OPCItemName, direction, driverNum,intDpeType,j);
	// GROUP MONI 
	direction = \"in\";
	OPCGroup = \"Moni\";

	sprintf( OPCItemName, \"Bus00.Crate%02d.Crate%02d_LVcaMask_RecvCard%d\", j, j, i );
	DebugN(\"OPC\",OPCItemName);
	sprintf( dpeName, \"SCTmops1:Crate%02d.LV_card%02d.LVcaMask.Recv\", j,i );
	OPCAddress(dpeName, opcServerName, OPCGroup, OPCItemName, direction, driverNum,intDpeType,j);

        }
    } 
  setValue(\"\",\"foreCol\",\"\");
}



OPCAddress(string dpeName, string opcServerName, string OPCGroup, string OPCItemName,
		 string direction, int driverNum, string intDpeType,int crate )
{
string reference;
int intDirection;
/*Values for intDpeType:
  UNDEFINED 480 Undefined
  INT16 	481 16 bit integer signed
  INT32 	482 32 bit integer signed
  UCHAR 	483 Character unsigned
  FLOAT32 	484 32 bit float
  FLOAT64 	485 64 bit float
  BOOL 		486 Bool
  STRING 	487 String
  UINT16 	488 16-Bit Integer unsigned
  UINT32  	489 32-Bit Integer signed*/
  
/* */
     if(direction == \"OUT\" || direction == \"out\" || direction == \"Out\")
   { intDirection = DPATTR_ADDR_MODE_OUTPUT_SINGLE; //output for single queries
   } else if(direction == \"IN\" || direction == \"in\" || direction == \"In\")
   { intDirection = DPATTR_ADDR_MODE_INPUT_SPONT;   //input for spontaneous data
   }

	//sprintf(reference,opcServerName + \"$\" + OPCGroup + \"$\" + \"Bus00.Crate%02d.\" +  OPCItemName,crate); 
	sprintf(reference,opcServerName + \"$\" + OPCGroup + \"$\" +  OPCItemName,crate); 
    DebugN(reference);
  
   dpSetWait(dpeName + \":_distrib.._type\", DPCONFIG_DISTRIBUTION_INFO, //driver allocation
             dpeName + \":_distrib.._driver\", driverNum);               //allocated driver

   dpSetWait(dpeName + \":_address.._type\", DPCONFIG_PERIPH_ADDR_MAIN,  // general peripheral address
             dpeName + \":_address.._reference\", reference,
             dpeName + \":_address.._datatype\" , intDpeType,
             dpeName + \":_address.._mode\"     , intDirection,
             dpeName + \":_address.._drv_ident\", \"OPCCLIENT\");
} 
" 0
 E E "main()
{

}" 0

13 4
"Button4"
""
1 166 290 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
3 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
164 288 318 342
T 
1
LANG:1 17 all OPC Addresses
"main()
{

string dpeName, OPCItemName;
string direction, opcServerName, OPCGroup, intDpeType;
string dpeName1, OPCItemName1;
string direction1, opcServerName1, OPCGroup1, intDpeType1;
int driverNum, i;
	
  setValue(\"\",\"foreCol\",\"Red\");

  opcServerName = \"CANopen\";
  driverNum = 1;
	
  for(i=0; i<48; i++) {
  
	DebugN(\" Setting Temperature Addresses for Channel  = \", i);

	intDpeType = 0; /******* Float32 *******/


	/********** GROUP MONI  ********************************************************************/
	OPCGroup = \"Moni\";
	direction = \"in\";
	
	//crate00
	sprintf( OPCItemName, \"Bus00_Crate00_MOch_Tm0_RecvChan%d\", i );
	sprintf( dpeName, \"SCTmops1:Crate00.Channel%02d.MOch_Tm0.Recv\", i );
	OPCAddress(dpeName, opcServerName, OPCGroup, OPCItemName, direction, driverNum,intDpeType);
	sprintf( OPCItemName, \"Bus00_Crate00_MOch_Tm1_RecvChan%d\", i );
	sprintf( dpeName, \"SCTmops1:Crate00.Channel%02d.MOch_Tm1.Recv\", i );
	OPCAddress(dpeName, opcServerName, OPCGroup, OPCItemName, direction, driverNum,intDpeType);
	
	//crate01
	sprintf( OPCItemName1, \"Bus00_Crate01_MOch_Tm0_RecvChan%d\", i );
	sprintf( dpeName1, \"SCTmops1:Crate01.Channel%02d.MOch_Tm0.Recv\", i );
	OPCAddress(dpeName1, opcServerName, OPCGroup, OPCItemName1, direction, driverNum,intDpeType);
	sprintf( OPCItemName1, \"Bus00_Crate01_MOch_Tm1_RecvChan%d\", i );
	sprintf( dpeName1, \"SCTmops1:Crate01.Channel%02d.MOch_Tm1.Recv\", i );
	OPCAddress(dpeName1, opcServerName, OPCGroup, OPCItemName1, direction, driverNum,intDpeType);
	}

  setValue(\"\",\"foreCol\",\"\");
}


OPCAddress(string dpeName, string opcServerName, string OPCGroup, string OPCItemName,
		 string direction, int driverNum, string intDpeType )
{
string reference;
int intDirection;
/*Values for intDpeType:
  UNDEFINED 480 Undefined
  INT16 	481 16 bit integer signed
  INT32 	482 32 bit integer signed
  UCHAR 	483 Character unsigned
  FLOAT32 	484 32 bit float
  FLOAT64 	485 64 bit float
  BOOL 		486 Bool
  STRING 	487 String
  UINT16 	488 16-Bit Integer unsigned
  UINT32  	489 32-Bit Integer signed*/
  
/* */
     if(direction == \"OUT\" || direction == \"out\" || direction == \"Out\")
   { intDirection = DPATTR_ADDR_MODE_OUTPUT_SINGLE; //output for single queries
   } else if(direction == \"IN\" || direction == \"in\" || direction == \"In\")
   { intDirection = DPATTR_ADDR_MODE_INPUT_SPONT;   //input for spontaneous data
   }

	reference = opcServerName + \"$\" + OPCGroup + \"$\"  +  OPCItemName; 

   dpSetWait(dpeName + \":_distrib.._type\", DPCONFIG_DISTRIBUTION_INFO, //driver allocation
             dpeName + \":_distrib.._driver\", driverNum);               //allocated driver

   dpSetWait(dpeName + \":_address.._type\", DPCONFIG_PERIPH_ADDR_MAIN,  // general peripheral address
             dpeName + \":_address.._reference\", reference,
             dpeName + \":_address.._datatype\" , intDpeType,
             dpeName + \":_address.._mode\"     , intDirection,
             dpeName + \":_address.._drv_ident\", \"OPCCLIENT\");
} 


" 0
 E E "main()
{

}" 0

13 5
"Button5"
""
1 360 20 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
3 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
358 18 512 72
T 
1
LANG:1 18 card OPC Addresses
"main()
{

string dpeName, OPCItemName;
string direction, opcServerName, OPCGroup, intDpeType;
int driverNum, i,j;
	
  setValue(\"\",\"foreCol\",\"Red\");

  opcServerName = \"CANopen\";
  driverNum = 1;

 //Addresse for channel Temperatures
  for(j=1;j<=2;j++)
  {
  for(i=0; i<=11; i++) {
  
	DebugN(\" Setting Temperature Addresses for Channel  = \", i, \"and crate\",j);

	intDpeType = 0; // Float32 



	OPCGroup = \"Moni\"; //moni group
	direction = \"in\";
	
	sprintf( OPCItemName, \"Bus00.Crate%02d.Crate%02d_LVcaTemp_SendCard%d\", j,j, i);
	sprintf( dpeName, \"SCTmops1:Crate%02d.LV_card%d.LVcaTemp.Recv\",j, i );
	DebugN(dpeName,OPCItemName);
	OPCAddress(dpeName, opcServerName, OPCGroup, OPCItemName, direction, driverNum,intDpeType,j);
	sprintf( OPCItemName, \"Bus00.Crate%02d.Crate%02d_LVcaPowr_RecvCard%d\",j,j, i );
	sprintf( dpeName, \"SCTmops1:Crate%02d.LV_card%d.LVcaPowr.Recv\",j, i );
	OPCAddress(dpeName, opcServerName, OPCGroup, OPCItemName, direction, driverNum,intDpeType,j);
	}
  }



  setValue(\"\",\"foreCol\",\"\");
}



OPCAddress(string dpeName, string opcServerName, string OPCGroup, string OPCItemName,
		 string direction, int driverNum, string intDpeType,int crate )
{
string reference;
int intDirection;
/*Values for intDpeType:
  UNDEFINED 480 Undefined
  INT16 	481 16 bit integer signed
  INT32 	482 32 bit integer signed
  UCHAR 	483 Character unsigned
  FLOAT32 	484 32 bit float
  FLOAT64 	485 64 bit float
  BOOL 		486 Bool
  STRING 	487 String
  UINT16 	488 16-Bit Integer unsigned
  UINT32  	489 32-Bit Integer signed*/
  
/* */
     if(direction == \"OUT\" || direction == \"out\" || direction == \"Out\")
   { intDirection = DPATTR_ADDR_MODE_OUTPUT_SINGLE; //output for single queries
   } else if(direction == \"IN\" || direction == \"in\" || direction == \"In\")
   { intDirection = DPATTR_ADDR_MODE_INPUT_SPONT;   //input for spontaneous data
   }

	//sprintf(reference,opcServerName + \"$\" + OPCGroup + \"$\" + \"Bus00.Crate%02d.\" +  OPCItemName,crate); 
	sprintf(reference,opcServerName + \"$\" + OPCGroup + \"$\" +  OPCItemName,crate); 
    DebugN(reference);
  
   dpSetWait(dpeName + \":_distrib.._type\", DPCONFIG_DISTRIBUTION_INFO, //driver allocation
             dpeName + \":_distrib.._driver\", driverNum);               //allocated driver

   dpSetWait(dpeName + \":_address.._type\", DPCONFIG_PERIPH_ADDR_MAIN,  // general peripheral address
             dpeName + \":_address.._reference\", reference,
             dpeName + \":_address.._datatype\" , intDpeType,
             dpeName + \":_address.._mode\"     , intDirection,
             dpeName + \":_address.._drv_ident\", \"OPCCLIENT\");
} 
" 0
 E E "main()
{

}" 0

13 6
"Button6"
""
1 360 80 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E
3 0 0 0 0 0
EE E
0
1
LANG:1 0 
0
1
LANG:1 119 -microsoft windows-Courier New-normal-r-normal-*-*-110-100-100-*-*-iso8859-1|-12,0,0,0,400,0,0,0,0,3,2,1,49,Courier New
0 ""
358 78 512 132
T 
1
LANG:1 13 OPC Addresses
"main()
{

string dpeName, OPCItemName;
string direction, opcServerName, OPCGroup, intDpeType;
int driverNum, i,j;
	
  setValue(\"\",\"foreCol\",\"Red\");

  opcServerName = \"CANopen\";
  driverNum = 1;


//  addresses for HV cards status


	
//  addresses for LV cards status

 

  for(j=0;j<=2;j++)
	{
    for(i=0;i<=11;i++)
      {
   	  DebugN(\" Setting Status and Mask Addresses for LV card  = \", i ,\"and crate \", j);
	intDpeType = 0; // 32-Bit Integer signed/

	// GROUP MONI 
	direction = \"in\";
	OPCGroup = \"Moni\";

	sprintf( OPCItemName, \"Bus00.Crate%02d.Crate%02d_LVcaTemp_RecvCard%d\", j, j, i );
	DebugN(\"OPC\",OPCItemName);
	sprintf( dpeName, \"SCTmops1:Crate%02d.LV_card%02d.LVcaTemp.Recv\", j,i );
	OPCAddress(dpeName, opcServerName, OPCGroup, OPCItemName, direction, driverNum,intDpeType,j);
	

	sprintf( OPCItemName, \"Bus00.Crate%02d.Crate%02d_LVcaPowr_RecvCard%d\", j, j, i );
	DebugN(\"OPC\",OPCItemName);
	sprintf( dpeName, \"SCTmops1:Crate%02d.LV_card%02d.LVcaPowr.Recv\", j,i );
	OPCAddress(dpeName, opcServerName, OPCGroup, OPCItemName, direction, driverNum,intDpeType,j);

        }
    } 
  setValue(\"\",\"foreCol\",\"\");
}



OPCAddress(string dpeName, string opcServerName, string OPCGroup, string OPCItemName,
		 string direction, int driverNum, string intDpeType,int crate )
{
string reference;
int intDirection;
/*Values for intDpeType:
  UNDEFINED 480 Undefined
  INT16 	481 16 bit integer signed
  INT32 	482 32 bit integer signed
  UCHAR 	483 Character unsigned
  FLOAT32 	484 32 bit float
  FLOAT64 	485 64 bit float
  BOOL 		486 Bool
  STRING 	487 String
  UINT16 	488 16-Bit Integer unsigned
  UINT32  	489 32-Bit Integer signed*/
  
/* */
     if(direction == \"OUT\" || direction == \"out\" || direction == \"Out\")
   { intDirection = DPATTR_ADDR_MODE_OUTPUT_SINGLE; //output for single queries
   } else if(direction == \"IN\" || direction == \"in\" || direction == \"In\")
   { intDirection = DPATTR_ADDR_MODE_INPUT_SPONT;   //input for spontaneous data
   }

	//sprintf(reference,opcServerName + \"$\" + OPCGroup + \"$\" + \"Bus00.Crate%02d.\" +  OPCItemName,crate); 
	sprintf(reference,opcServerName + \"$\" + OPCGroup + \"$\" +  OPCItemName,crate); 
    DebugN(reference);
  
   dpSetWait(dpeName + \":_distrib.._type\", DPCONFIG_DISTRIBUTION_INFO, //driver allocation
             dpeName + \":_distrib.._driver\", driverNum);               //allocated driver

   dpSetWait(dpeName + \":_address.._type\", DPCONFIG_PERIPH_ADDR_MAIN,  // general peripheral address
             dpeName + \":_address.._reference\", reference,
             dpeName + \":_address.._datatype\" , intDpeType,
             dpeName + \":_address.._mode\"     , intDirection,
             dpeName + \":_address.._drv_ident\", \"OPCCLIENT\");
} 
" 0
 E E "main()
{

}" 0

0
LAYER, 1 
1
LANG:1 6 Layer2
0
LAYER, 2 
1
LANG:1 6 Layer3
0
LAYER, 3 
1
LANG:1 6 Layer4
0
LAYER, 4 
1
LANG:1 6 Layer5
0
LAYER, 5 
1
LANG:1 6 Layer6
0
LAYER, 6 
1
LANG:1 6 Layer7
0
LAYER, 7 
1
LANG:1 6 Layer8
0
0