EasyManua.ls Logo

Opt OPT-DPA1024E-4 - Page 26

Opt OPT-DPA1024E-4
40 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
OPT MACHINE VISION TECH.CO. LTD
ADD:8 JingSheng Road, JingXia ChangAn DongGuan China 523853
TEL: 0769-82716188 FAX: 0769-81606698
E-mail:optmv1@optmv.com Website:Http://www.optmv.net
26
//Destroy the connection
int ret = 0;
ret = OptController.DestoryEtheConnect();
if (0 != ret)
{
Console.WriteLine("Failed to destroy the connection");
}
else
{
Console.WriteLine("DONE");
}
Console.ReadKey();
}
}
}
Note: Please tick “Allow unsafe code” in (ProjectName — Properties Build).
1.4.2 An example in VC++
//Connect to controller
OPTController_InitSerialPort(W2A(strCOMName.GetBuffer(0)), &m_OPTControllerHandle);
// OPTController_CreateEtheConnectionBySN(W2A(strSNe.GetBuffer(0)), &m_OPTControllerHandle);
// OPTController_DestoryEtheConnection(m_OPTControllerHandle);
// Turn on the 1st channel
OPTController_TurnOnChannel ( m_OPTControllerHanlde , 1 ) ;
//Turn off the 1st channel
OPTController_TurnOffChannel( m_OPTControllerHanlde , 1 ) ;
// Set the intensity 255 to the 3rd channel
OPTController_SetIntensity( m_OPTControllerHanlde ,3 , 255 ) ;
// Destroy the connection with the controller
// OPTController_DestoryEtheConnection(m_OPTControllerHandle);
OPTController_ReleaseSerailPort(m_OPTControllerHandle);
1.4.3 An example in VB
'Create a connection to the controller

Table of Contents