简化SO7 utility的释放
This commit is contained in:
@@ -26,3 +26,7 @@ PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/LITE/Utility_Lite/Release
|
||||
*.txt
|
||||
*.db
|
||||
*.lib
|
||||
PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/Release/
|
||||
PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/Debug/
|
||||
PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/ReleaseSO7/
|
||||
PcDmis/Base/Interfac/Msi/Hsi/Tools/UsbUtility/UsbUtil/ReleaseSO7/
|
||||
|
||||
@@ -27,7 +27,7 @@ void CKeyence_Laser::KeyenceLaserInit(void)
|
||||
{
|
||||
if (!m_hLkif)
|
||||
{
|
||||
m_hLkif=LoadLibrary(_T("LkIF.dll"));
|
||||
m_hLkif=(HMODULE)LoadLibrary(GetAppPath()+_T("\\LkIF.dll"));
|
||||
if(m_hLkif)
|
||||
{
|
||||
m_pGetCalcData=(pLKIF_GetCalcData)GetProcAddress(m_hLkif,"LKIF_GetCalcData");
|
||||
@@ -39,6 +39,10 @@ void CKeyence_Laser::KeyenceLaserInit(void)
|
||||
m_pSetDataStorage=(pLKIF_SetDataStorage)GetProcAddress(m_hLkif,"LKIF_SetDataStorage");
|
||||
m_pSetProgramNo=(pLKIF_SETPROGRAMNO)GetProcAddress(m_hLkif,"LKIF_SetProgramNo");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(NULL, _T("Load LkIF.dll failed!"), _T("Message"), MB_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
//==============================================
|
||||
|
||||
@@ -33,7 +33,7 @@ protected:
|
||||
int m_iSetOutNo;
|
||||
int m_NeedStorageDataNumber;
|
||||
LKIF_STORAGECYCLE m_StorageCycle;
|
||||
HINSTANCE m_hLkif;
|
||||
HMODULE m_hLkif;
|
||||
public:
|
||||
|
||||
CKeyence_Laser();
|
||||
|
||||
@@ -30,7 +30,7 @@ void CKeyence_Laser_LK_H::KeyenceLaserInit(void)
|
||||
{
|
||||
if (!m_hLkif)
|
||||
{
|
||||
m_hLkif=LoadLibrary(_T("LKIF2.dll"));
|
||||
m_hLkif=(HMODULE)LoadLibrary(GetAppPath()+_T("\\LKIF2.dll"));
|
||||
if(m_hLkif)
|
||||
{
|
||||
m_pGetCalcDataMulti=(pLKIF2_GetCalcDataMulti)GetProcAddress(m_hLkif,"LKIF2_GetCalcDataMulti");
|
||||
@@ -56,6 +56,10 @@ void CKeyence_Laser_LK_H::KeyenceLaserInit(void)
|
||||
|
||||
m_result = m_pOpenDeviceUsb();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(NULL, _T("Load LKIF2.dll failed!"), _T("Message"), MB_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
//==============================================
|
||||
|
||||
@@ -45,7 +45,7 @@ protected:
|
||||
int m_NumberOfUsedOUT;
|
||||
int m_NeedStorageDataNumber;
|
||||
LKIF_STORAGECYCLE m_StorageCycle;
|
||||
HINSTANCE m_hLkif;
|
||||
HMODULE m_hLkif;
|
||||
RC m_result;
|
||||
public:
|
||||
|
||||
|
||||
@@ -222,7 +222,15 @@ void CSO7_Proto::_process_rcv_transfer_data(int iEP)
|
||||
case CT_READ_IO_DAT:
|
||||
_process_SO7_CMD_READ_INPUT_PORT_STATUS();
|
||||
break;
|
||||
|
||||
case CT_READ_SEC_REALX:
|
||||
_process_SO7_CMD_READ_ZSIGNAL_POS_X();
|
||||
break;
|
||||
case CT_READ_SEC_REALY:
|
||||
_process_SO7_CMD_READ_ZSIGNAL_POS_Y();
|
||||
break;
|
||||
case CT_READ_SEC_REALZ:
|
||||
_process_SO7_CMD_READ_ZSIGNAL_POS_Z();
|
||||
break;
|
||||
default:
|
||||
TRACE1("_process_rcv_transfer_data() : Unknown ep_buff[EP_02_CMD_IDX]._save_send_cmd : %X \r\n", ep_buff[EP_02_CMD_IDX]._save_send_cmd);
|
||||
TRACE1("_process_rcv_transfer_data() : Unknown ep_buff[EP_81_DATA_IDX]._buffer[0] : %X \r\n", ep_buff[EP_81_DATA_IDX]._buffer[0]);
|
||||
@@ -434,14 +442,18 @@ CSO7_Proto::CSO7_Proto()
|
||||
ep_buff[i]._hProtoPending = false;
|
||||
ep_buff[i]._event = NULL;
|
||||
};
|
||||
g_machine.x._Move_Speed_Gear =3;
|
||||
g_machine.y._Move_Speed_Gear =3;
|
||||
g_machine.z._Move_Speed_Gear =3;
|
||||
g_machine.x._Move_Speed_Gear =2;
|
||||
g_machine.y._Move_Speed_Gear =2;
|
||||
g_machine.z._Move_Speed_Gear =2;
|
||||
g_machine.zm._Move_Speed_Gear =2;
|
||||
g_machine.x._pos_fixed._long_ =0;
|
||||
g_machine.y._pos_fixed._long_ =0;
|
||||
g_machine.z._pos_fixed._long_ =0;
|
||||
g_machine.zm._pos_fixed._long_ =0;
|
||||
g_machine.x._ZSignal_pos._long_=0;
|
||||
g_machine.y._ZSignal_pos._long_=0;
|
||||
g_machine.z._ZSignal_pos._long_=0;
|
||||
|
||||
g_machine.x._d_cur_pos_ = 0;
|
||||
g_machine.y._d_cur_pos_ = 0;
|
||||
g_machine.z._d_cur_pos_ = 0;
|
||||
@@ -3980,7 +3992,63 @@ SSI_STATUS_MOTION CSO7_Proto::_send_cmd_SO7_CMD_READ_INPUT_PORT_STATUS(char Addr
|
||||
ReleaseMutex(g_hEP02_Serial_Mutex);
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
//==============================================================
|
||||
SSI_STATUS_MOTION CSO7_Proto::_send_cmd_SO7_CMD_READ_ZSIGNAL_POS_X()
|
||||
{
|
||||
WaitForSingleObject(g_hEP02_Serial_Mutex, INFINITE);
|
||||
memset(ep_buff[EP_02_CMD_IDX]._buffer, 0x00, MAX_BUFF_SIZE);
|
||||
|
||||
*(ep_buff[EP_02_CMD_IDX]._buffer) = CT_DATA;
|
||||
*(ep_buff[EP_02_CMD_IDX]._buffer+1) = CT_READ_SEC_REALX;
|
||||
*(ep_buff[EP_02_CMD_IDX]._buffer+2)=0;
|
||||
|
||||
ep_buff[EP_02_CMD_IDX]._size = 0x03;
|
||||
ep_buff[EP_82_DATA_IDX]._size = 0x03;
|
||||
|
||||
g_hEP02_Thread_State=THREAD_RUNNING_STATE1;
|
||||
g_hEP8x_Thread_State=THREAD_RUNNING_STATE2;
|
||||
_do_single_threaded_usb_comm(EP_02_CMD_IDX);
|
||||
ReleaseMutex(g_hEP02_Serial_Mutex);
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
//==============================================================
|
||||
SSI_STATUS_MOTION CSO7_Proto::_send_cmd_SO7_CMD_READ_ZSIGNAL_POS_Y()
|
||||
{
|
||||
WaitForSingleObject(g_hEP02_Serial_Mutex, INFINITE);
|
||||
memset(ep_buff[EP_02_CMD_IDX]._buffer, 0x00, MAX_BUFF_SIZE);
|
||||
|
||||
*(ep_buff[EP_02_CMD_IDX]._buffer) = CT_DATA;
|
||||
*(ep_buff[EP_02_CMD_IDX]._buffer+1) = CT_READ_SEC_REALY;
|
||||
*(ep_buff[EP_02_CMD_IDX]._buffer+2)=0;
|
||||
|
||||
ep_buff[EP_02_CMD_IDX]._size = 0x03;
|
||||
ep_buff[EP_82_DATA_IDX]._size = 0x03;
|
||||
|
||||
g_hEP02_Thread_State=THREAD_RUNNING_STATE1;
|
||||
g_hEP8x_Thread_State=THREAD_RUNNING_STATE2;
|
||||
_do_single_threaded_usb_comm(EP_02_CMD_IDX);
|
||||
ReleaseMutex(g_hEP02_Serial_Mutex);
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
//==============================================================
|
||||
SSI_STATUS_MOTION CSO7_Proto::_send_cmd_SO7_CMD_READ_ZSIGNAL_POS_Z()
|
||||
{
|
||||
WaitForSingleObject(g_hEP02_Serial_Mutex, INFINITE);
|
||||
memset(ep_buff[EP_02_CMD_IDX]._buffer, 0x00, MAX_BUFF_SIZE);
|
||||
|
||||
*(ep_buff[EP_02_CMD_IDX]._buffer) = CT_DATA;
|
||||
*(ep_buff[EP_02_CMD_IDX]._buffer+1) = CT_READ_SEC_REALZ;
|
||||
*(ep_buff[EP_02_CMD_IDX]._buffer+2)=0;
|
||||
|
||||
ep_buff[EP_02_CMD_IDX]._size = 0x03;
|
||||
ep_buff[EP_82_DATA_IDX]._size = 0x03;
|
||||
|
||||
g_hEP02_Thread_State=THREAD_RUNNING_STATE1;
|
||||
g_hEP8x_Thread_State=THREAD_RUNNING_STATE2;
|
||||
_do_single_threaded_usb_comm(EP_02_CMD_IDX);
|
||||
ReleaseMutex(g_hEP02_Serial_Mutex);
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
//==============================================================
|
||||
SSI_STATUS_MOTION CSO7_Proto::_process_SO7_CMD_MOVE_X()
|
||||
{
|
||||
@@ -4240,4 +4308,43 @@ SSI_STATUS_MOTION CSO7_Proto::_process_SO7_CMD_READ_INPUT_PORT_STATUS()
|
||||
g_machine.InPortStatus=0;
|
||||
g_machine.InPortStatus=*(ep_buff[EP_82_DATA_IDX]._buffer);
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
//==============================================================
|
||||
SSI_STATUS_MOTION CSO7_Proto::_process_SO7_CMD_READ_ZSIGNAL_POS_X()
|
||||
{
|
||||
g_machine.x._ZSignal_pos._char_[2] = *(ep_buff[EP_82_DATA_IDX]._buffer);
|
||||
g_machine.x._ZSignal_pos._char_[1] = *(ep_buff[EP_82_DATA_IDX]._buffer+1);
|
||||
g_machine.x._ZSignal_pos._char_[0] = *(ep_buff[EP_82_DATA_IDX]._buffer+2);
|
||||
g_machine.x._ZSignal_pos._char_[3] = 0;
|
||||
|
||||
if (g_machine.x._ZSignal_pos._long_ > 8388608)
|
||||
g_machine.x._ZSignal_pos._long_=g_machine.x._ZSignal_pos._long_-16777216;
|
||||
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
//==============================================================
|
||||
SSI_STATUS_MOTION CSO7_Proto::_process_SO7_CMD_READ_ZSIGNAL_POS_Y()
|
||||
{
|
||||
g_machine.y._ZSignal_pos._char_[2] = *(ep_buff[EP_82_DATA_IDX]._buffer);
|
||||
g_machine.y._ZSignal_pos._char_[1] = *(ep_buff[EP_82_DATA_IDX]._buffer+1);
|
||||
g_machine.y._ZSignal_pos._char_[0] = *(ep_buff[EP_82_DATA_IDX]._buffer+2);
|
||||
g_machine.y._ZSignal_pos._char_[3] = 0;
|
||||
|
||||
if (g_machine.y._ZSignal_pos._long_ > 8388608)
|
||||
g_machine.y._ZSignal_pos._long_=g_machine.y._ZSignal_pos._long_-16777216;
|
||||
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
//==============================================================
|
||||
SSI_STATUS_MOTION CSO7_Proto::_process_SO7_CMD_READ_ZSIGNAL_POS_Z()
|
||||
{
|
||||
g_machine.z._ZSignal_pos._char_[2] = *(ep_buff[EP_82_DATA_IDX]._buffer);
|
||||
g_machine.z._ZSignal_pos._char_[1] = *(ep_buff[EP_82_DATA_IDX]._buffer+1);
|
||||
g_machine.z._ZSignal_pos._char_[0] = *(ep_buff[EP_82_DATA_IDX]._buffer+2);
|
||||
g_machine.z._ZSignal_pos._char_[3] = 0;
|
||||
|
||||
if (g_machine.z._ZSignal_pos._long_ > 8388608)
|
||||
g_machine.z._ZSignal_pos._long_=g_machine.z._ZSignal_pos._long_-16777216;
|
||||
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
@@ -83,6 +83,11 @@ typedef struct s_so7_axis // axis parameters
|
||||
long _long_;
|
||||
char _char_[4];
|
||||
}_scale_pos;
|
||||
union
|
||||
{
|
||||
long _long_;
|
||||
char _char_[4];
|
||||
}_ZSignal_pos;
|
||||
double _d_cur_pos_;
|
||||
long _scale_probe;
|
||||
double _dSet_Zero_Pos;
|
||||
@@ -399,6 +404,9 @@ public:
|
||||
SSI_STATUS_MOTION _send_cmd_SO7_CMD_READ_ZOOM_MOTION_STATUS();
|
||||
SSI_STATUS_MOTION _send_cmd_SO7_CMD_OPEN_KEYENCE_LASER();
|
||||
SSI_STATUS_MOTION _send_cmd_SO7_CMD_READ_INPUT_PORT_STATUS(char AddrType);
|
||||
SSI_STATUS_MOTION _send_cmd_SO7_CMD_READ_ZSIGNAL_POS_X();
|
||||
SSI_STATUS_MOTION _send_cmd_SO7_CMD_READ_ZSIGNAL_POS_Y();
|
||||
SSI_STATUS_MOTION _send_cmd_SO7_CMD_READ_ZSIGNAL_POS_Z();
|
||||
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_MOVE_X();
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_MOVE_Y();
|
||||
@@ -429,6 +437,9 @@ public:
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_READ_INTERRUPT_MESSAGE();
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_READ_ZOOM_MOTION_STATUS();
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_READ_INPUT_PORT_STATUS();
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_READ_ZSIGNAL_POS_X();
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_READ_ZSIGNAL_POS_Y();
|
||||
static SSI_STATUS_MOTION _process_SO7_CMD_READ_ZSIGNAL_POS_Z();
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ CSo7_Interface::~CSo7_Interface()
|
||||
//========================================
|
||||
void CSo7_Interface::InitDll(void)
|
||||
{
|
||||
m_hImageDLL=LoadLibrary(_T("Image.dll"));
|
||||
m_hImageDLL=(HMODULE)LoadLibrary(GetAppPath()+_T("\\Image.dll"));
|
||||
if(m_hImageDLL)
|
||||
{
|
||||
Pro_cmd=(PRO_CMD)GetProcAddress(m_hImageDLL,"Pro_Cmd");
|
||||
@@ -44,12 +44,20 @@ void CSo7_Interface::InitDll(void)
|
||||
Pro_cmd(VINIT_DLL,(LPARAM)&Image_Info);
|
||||
Pro_cmd(MINIT_USB,(LPARAM)&Image_Info);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(NULL, _T("Load Image.dll failed!"), _T("Message"), MB_OK);
|
||||
}
|
||||
//=====================================
|
||||
m_hFitDLL=LoadLibrary(_T("FitDll.dll"));
|
||||
m_hFitDLL=(HMODULE)LoadLibrary(GetAppPath()+_T("\\FitDll.dll"));
|
||||
if(m_hFitDLL)
|
||||
{
|
||||
g_FitFace_PCD=(FITTING_SURFACE_PCD)GetProcAddress(m_hFitDLL,"FaceFit");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(NULL, _T("Load FitDll.dll failed!"), _T("Message"), MB_OK);
|
||||
}
|
||||
}
|
||||
//========================================
|
||||
void CSo7_Interface::StartStoreData(void)
|
||||
|
||||
@@ -19,8 +19,8 @@ typedef int (_cdecl*FITTING_SURFACE_PCD)(MY3DPoint* pArr,int n, double* Coe, dou
|
||||
class CSo7_Interface
|
||||
{
|
||||
protected:
|
||||
HINSTANCE m_hImageDLL;
|
||||
HINSTANCE m_hFitDLL;
|
||||
HMODULE m_hImageDLL;
|
||||
HMODULE m_hFitDLL;
|
||||
Dev_Info Image_Info;
|
||||
public:
|
||||
|
||||
|
||||
@@ -1435,3 +1435,30 @@ Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="ReleaseSO7|Win32">
|
||||
<Configuration>ReleaseSO7</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
@@ -29,6 +33,13 @@
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
@@ -38,6 +49,9 @@
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
@@ -45,6 +59,9 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
@@ -93,6 +110,32 @@
|
||||
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
<Midl>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
<ValidateAllParameters>true</ValidateAllParameters>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<Culture>0x0409</Culture>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
<None Include="res\Utility_Lite.ico" />
|
||||
@@ -109,6 +152,7 @@
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Utility_Lite.cpp" />
|
||||
<ClCompile Include="Utility_LiteDlg.cpp" />
|
||||
|
||||
@@ -94,3 +94,16 @@ Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Init:Open device succeed .
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Destruct Cso7_Proto.
|
||||
Construct Cso7_Proto.
|
||||
Destruct Cso7_Proto.
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
#include "afxdialogex.h"
|
||||
#include "So7_Option.h"
|
||||
|
||||
|
||||
#define _ONLY_USE_FOR_SO7
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
@@ -74,7 +71,7 @@ BOOL CMv_UtilApp::InitInstance()
|
||||
// such as the name of your company or organization
|
||||
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
|
||||
|
||||
#ifdef _ONLY_USE_FOR_SO7
|
||||
#ifdef _RELEASE_SO7_CONTROLER_ONLY
|
||||
CSo7_Option pSo7_Option;
|
||||
m_pMainWnd = &pSo7_Option;
|
||||
INT_PTR nResponse = pSo7_Option.DoModal();
|
||||
|
||||
@@ -68,8 +68,8 @@ BEGIN
|
||||
PUSHBUTTON "Move\n To",IDC_BUTTON_MOVE_TO,359,142,32,27,BS_MULTILINE
|
||||
PUSHBUTTON "Auto Zoom",IDC_BUTTON_AUTO_ZOOM,359,177,32,27,BS_MULTILINE
|
||||
PUSHBUTTON "Set Reset Flag",IDC_BUTTON_SET_RESET_FLAG,27,235,61,14
|
||||
PUSHBUTTON "To Get Laser",IDC_BUTTON_GET_LASER,95,235,61,14
|
||||
PUSHBUTTON "Home V",IDC_BUTTON_RESET_V,163,235,61,14
|
||||
PUSHBUTTON "To Get Laser",IDC_BUTTON_GET_LASER,98,235,61,14
|
||||
PUSHBUTTON "Home V",IDC_BUTTON_RESET_V,240,235,61,14
|
||||
EDITTEXT IDC_EDIT_X_SCALE_COEFFICIENT,46,284,54,12,ES_CENTER | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_Y_SCALE_COEFFICIENT,109,284,54,12,ES_CENTER | ES_AUTOHSCROLL
|
||||
EDITTEXT IDC_EDIT_Z_SCALE_COEFFICIENT,172,284,54,12,ES_CENTER | ES_AUTOHSCROLL
|
||||
@@ -111,7 +111,7 @@ BEGIN
|
||||
EDITTEXT IDC_EDIT_ZM_POSITION_58,103,365,54,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
|
||||
LTEXT "Scale Pulse",IDC_STATIC,40,309,36,8
|
||||
LTEXT "mm",IDC_STATIC,123,310,12,8
|
||||
EDITTEXT IDC_EDIT_STATUS,15,404,385,56,ES_MULTILINE | ES_AUTOHSCROLL,WS_EX_CLIENTEDGE
|
||||
EDITTEXT IDC_EDIT_STATUS,15,404,385,56,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
|
||||
LTEXT "ms",IDC_STATIC_SEC,212,384,16,9
|
||||
EDITTEXT IDC_EDIT_UPDATE_FREQ,183,383,25,13,ES_AUTOHSCROLL | ES_READONLY
|
||||
GROUPBOX "Scale Display",IDC_STATIC,15,264,224,136
|
||||
@@ -120,7 +120,7 @@ BEGIN
|
||||
EDITTEXT IDC_EDIT_Y_POSITION_59,174,336,54,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_EDIT_Z_POSITION_59,174,350,54,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
|
||||
EDITTEXT IDC_EDIT_ZM_POSITION_59,174,364,54,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
|
||||
LTEXT "Probe",IDC_STATIC,189,310,20,8
|
||||
LTEXT "Z Signal",IDC_STATIC,189,310,26,8
|
||||
LTEXT "Pos Update Frequency",IDC_STATIC,104,384,74,8
|
||||
LTEXT "Spare1",IDC_STATIC,232,112,24,8
|
||||
CTEXT "X",IDC_STATIC,70,273,8,8
|
||||
@@ -135,16 +135,17 @@ BEGIN
|
||||
LTEXT "4",IDC_STATIC,337,75,8,8
|
||||
LTEXT "5",IDC_STATIC,337,91,8,8
|
||||
LTEXT "6",IDC_STATIC,337,107,8,8
|
||||
PUSHBUTTON "Read IO Status",IDC_BUTTON_SO7_READ_IN_PORT_STATUS,314,235,61,14
|
||||
CONTROL "Continuous",IDC_CHECK_CONTINUOUS_READ_IO_STATUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,319,223,47,10
|
||||
PUSHBUTTON "Read IO Status",IDC_BUTTON_SO7_READ_IN_PORT_STATUS,311,235,61,14
|
||||
CONTROL "Continuous",IDC_CHECK_CONTINUOUS_READ_IO_STATUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,320,223,47,10
|
||||
CONTROL "",IDC_MFCBUTTON_STATUS_IN_PORT1,"MfcButton",WS_TABSTOP,353,24,21,14
|
||||
CONTROL "",IDC_MFCBUTTON_STATUS_IN_PORT2,"MfcButton",WS_TABSTOP,353,40,21,14
|
||||
CONTROL "",IDC_MFCBUTTON_STATUS_IN_PORT3,"MfcButton",WS_TABSTOP,353,56,21,14
|
||||
CONTROL "",IDC_MFCBUTTON_STATUS_IN_PORT4,"MfcButton",WS_TABSTOP,353,72,21,14
|
||||
CONTROL "",IDC_MFCBUTTON_STATUS_IN_PORT5,"MfcButton",WS_TABSTOP,353,88,21,14
|
||||
CONTROL "",IDC_MFCBUTTON_STATUS_IN_PORT6,"MfcButton",WS_TABSTOP,353,104,21,14
|
||||
EDITTEXT IDC_EDIT_SO7_READ_IO_STATUS_ADDRESS,259,235,40,14,ES_AUTOHSCROLL
|
||||
LTEXT "Addr",IDC_STATIC,239,236,16,8
|
||||
EDITTEXT IDC_EDIT_SO7_READ_IO_STATUS_ADDRESS,347,371,40,14,ES_AUTOHSCROLL | NOT WS_VISIBLE
|
||||
LTEXT "Addr",IDC_STATIC,327,372,16,8,NOT WS_VISIBLE
|
||||
PUSHBUTTON "Test Z Signal",IDC_BUTTON_SO7_TEST_Z_SIGNAL,169,235,61,14
|
||||
END
|
||||
|
||||
IDD_S07_UTIL_SEND_PARAMETER DIALOGEX 0, 0, 753, 481
|
||||
|
||||
@@ -33,6 +33,12 @@ IMPLEMENT_DYNAMIC(CSO7_UtilDlg, CDialog)
|
||||
CSO7_UtilDlg::CSO7_UtilDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CSO7_UtilDlg::IDD, pParent)
|
||||
{
|
||||
m_TestZSignalNow=FALSE;
|
||||
m_BeginReadIO=FALSE;
|
||||
m_ReadIOStatusAddr=4;
|
||||
m_ZsignalPosX=0;
|
||||
m_ZsignalPosY=0;
|
||||
m_ZsignalPosZ=0;
|
||||
|
||||
}
|
||||
|
||||
@@ -71,6 +77,9 @@ void CSO7_UtilDlg::DoDataExchange(CDataExchange* pDX)
|
||||
DDX_Control(pDX, IDC_BUTTON_SO7_MOVE_ZOOM_IN, m_Button_MoveV_Zoom_In);
|
||||
DDX_Control(pDX, IDC_BUTTON_SO7_MOVE_ZOOM_OUT, m_Button_MoveV_Zoom_Out);
|
||||
|
||||
DDX_Control(pDX, IDC_EDIT_STATUS, m_edMSG);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +127,7 @@ BEGIN_MESSAGE_MAP(CSO7_UtilDlg, CDialog)
|
||||
ON_BN_CLICKED(IDC_BUTTON_SO7_READ_IN_PORT_STATUS, &CSO7_UtilDlg::OnBnClickedButtonSo7ReadInPortStatus)
|
||||
ON_BN_CLICKED(IDC_RADIO_SPEED_GEAR5, &CSO7_UtilDlg::OnBnClickedRadioSpeedGear5)
|
||||
ON_EN_KILLFOCUS(IDC_EDIT_SO7_READ_IO_STATUS_ADDRESS, &CSO7_UtilDlg::OnEnKillfocusEditSo7ReadIoStatusAddress)
|
||||
ON_BN_CLICKED(IDC_BUTTON_SO7_TEST_Z_SIGNAL, &CSO7_UtilDlg::OnBnClickedButtonSo7TestZSignal)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
@@ -233,8 +243,6 @@ BOOL CSO7_UtilDlg::OnInitDialog()
|
||||
g_pLoggerDebug = new CLogger(_T("\\UtilityDebug.Log"));
|
||||
}
|
||||
|
||||
m_BeginReadIO=FALSE;
|
||||
m_ReadIOStatusAddr=4;
|
||||
GetDlgItem(IDC_EDIT_SO7_READ_IO_STATUS_ADDRESS)->SetWindowTextW(_T("4"));
|
||||
|
||||
UpdateData(FALSE);
|
||||
@@ -301,7 +309,7 @@ void CSO7_UtilDlg::OnBnClickedButtonStartSo7machine()
|
||||
m_pSO7_Proto->_start_machine();
|
||||
|
||||
|
||||
m_OutMessage = _T("Machine Started.");
|
||||
m_OutMessage = _T("Machine Started.\r\n");
|
||||
GetDlgItem(IDC_EDIT_STATUS)->SetWindowText(m_OutMessage);
|
||||
|
||||
((CButton*)GetDlgItem(IDC_BUTTON_PROBE_ONOFF))->SetWindowTextW(_T("µ±Ç°Ì½Í·£º¼¤¹â"));
|
||||
@@ -585,7 +593,7 @@ void CSO7_UtilDlg::OnBnClickedButtonSo7GetResetFlag()
|
||||
CString csOutMessage;
|
||||
csOutMessage.Format(_T("%d"),m_pSO7_Proto->g_machine.Sys_Reset_Flag);
|
||||
m_OutMessage = _T("Sys_Reset_Flag : ")+csOutMessage;
|
||||
GetDlgItem(IDC_EDIT_STATUS)->SetWindowText(m_OutMessage);
|
||||
OutputWithScroll(m_OutMessage,m_edMSG);
|
||||
}
|
||||
|
||||
|
||||
@@ -774,7 +782,8 @@ void CSO7_UtilDlg::OnBnClickedButtonGetFixtureFlag()
|
||||
CString csOutMessage;
|
||||
csOutMessage.Format(_T("%d"),m_pSO7_Proto->g_machine.cFixtureFlag);
|
||||
m_OutMessage = _T("Fixture_Flag : ")+csOutMessage;
|
||||
GetDlgItem(IDC_EDIT_STATUS)->SetWindowText(m_OutMessage);
|
||||
OutputWithScroll(m_OutMessage,m_edMSG);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -986,6 +995,67 @@ void CSO7_UtilDlg::OnBnClickedButtonSetupSo7config()
|
||||
}
|
||||
SetTimer(1,150,NULL);
|
||||
}
|
||||
|
||||
//================================================================================================
|
||||
void CSO7_UtilDlg::OnBnClickedButtonSo7TestZSignal()
|
||||
{
|
||||
if (m_TestZSignalNow)
|
||||
{
|
||||
m_TestZSignalNow=FALSE;
|
||||
((CButton*)GetDlgItem(IDC_BUTTON_SO7_TEST_Z_SIGNAL))->SetWindowTextW(_T("Test Z Signal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_READ_ZSIGNAL_POS_X();
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_READ_ZSIGNAL_POS_Y();
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_READ_ZSIGNAL_POS_Z();
|
||||
m_ZsignalPosX=m_pSO7_Proto->g_machine.x._ZSignal_pos._long_;
|
||||
m_ZsignalPosY=m_pSO7_Proto->g_machine.y._ZSignal_pos._long_;
|
||||
m_ZsignalPosZ=m_pSO7_Proto->g_machine.z._ZSignal_pos._long_;
|
||||
m_TestZSignalNow=TRUE;
|
||||
((CButton*)GetDlgItem(IDC_BUTTON_SO7_TEST_Z_SIGNAL))->SetWindowTextW(_T("STOP"));
|
||||
}
|
||||
}
|
||||
void CSO7_UtilDlg::TestZSignal()
|
||||
{
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_READ_ZSIGNAL_POS_X();
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_READ_ZSIGNAL_POS_Y();
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_READ_ZSIGNAL_POS_Z();
|
||||
|
||||
m_X_Pos.Format(_T("%8ld"),(m_pSO7_Proto->g_machine.x._ZSignal_pos._long_));
|
||||
GetDlgItem(IDC_EDIT_X_POSITION_59)->SetWindowText(m_X_Pos);
|
||||
m_Y_Pos.Format(_T("%8ld"),(m_pSO7_Proto->g_machine.y._ZSignal_pos._long_));
|
||||
GetDlgItem(IDC_EDIT_Y_POSITION_59)->SetWindowText(m_Y_Pos);
|
||||
m_Z_Pos.Format(_T("%8ld"),(m_pSO7_Proto->g_machine.z._ZSignal_pos._long_));
|
||||
GetDlgItem(IDC_EDIT_Z_POSITION_59)->SetWindowText(m_Z_Pos);
|
||||
|
||||
double dTmp1(0.0),dTmp2(0.0);
|
||||
if (labs(m_pSO7_Proto->g_machine.x._ZSignal_pos._long_-m_ZsignalPosX)>5)
|
||||
{
|
||||
dTmp1=m_pSO7_Proto->ScaleToMM(m_ZsignalPosX,m_pSO7_Proto->g_machine.s_machine_config.x_axis._scale_resolution);
|
||||
dTmp2=m_pSO7_Proto->ScaleToMM(m_pSO7_Proto->g_machine.x._ZSignal_pos._long_,m_pSO7_Proto->g_machine.s_machine_config.x_axis._scale_resolution);
|
||||
m_OutMessage.Format(_T("[ZSignal-X] From: %-3.4f To: %-3.4f Dis: %-3.4f"),dTmp1,dTmp2,dTmp2-dTmp1);
|
||||
OutputWithScroll(m_OutMessage,m_edMSG);
|
||||
}
|
||||
if (labs(m_pSO7_Proto->g_machine.y._ZSignal_pos._long_-m_ZsignalPosY)>5)
|
||||
{
|
||||
dTmp1=m_pSO7_Proto->ScaleToMM(m_ZsignalPosY,m_pSO7_Proto->g_machine.s_machine_config.y_axis._scale_resolution);
|
||||
dTmp2=m_pSO7_Proto->ScaleToMM(m_pSO7_Proto->g_machine.y._ZSignal_pos._long_,m_pSO7_Proto->g_machine.s_machine_config.y_axis._scale_resolution);
|
||||
m_OutMessage.Format(_T("[ZSignal-Y] From: %-3.4f To: %-3.4f Dis: %-3.4f"),dTmp1,dTmp2,dTmp2-dTmp1);
|
||||
OutputWithScroll(m_OutMessage,m_edMSG);
|
||||
}
|
||||
if (labs(m_pSO7_Proto->g_machine.z._ZSignal_pos._long_-m_ZsignalPosZ)>5)
|
||||
{
|
||||
dTmp1=m_pSO7_Proto->ScaleToMM(m_ZsignalPosZ,m_pSO7_Proto->g_machine.s_machine_config.z_axis._scale_resolution);
|
||||
dTmp2=m_pSO7_Proto->ScaleToMM(m_pSO7_Proto->g_machine.z._ZSignal_pos._long_,m_pSO7_Proto->g_machine.s_machine_config.z_axis._scale_resolution);
|
||||
m_OutMessage.Format(_T("[ZSignal-Z] From: %-3.4f To: %-3.4f Dis: %-3.4f"),dTmp1,dTmp2,dTmp2-dTmp1);
|
||||
OutputWithScroll(m_OutMessage,m_edMSG);
|
||||
}
|
||||
m_ZsignalPosX=m_pSO7_Proto->g_machine.x._ZSignal_pos._long_;
|
||||
m_ZsignalPosY=m_pSO7_Proto->g_machine.y._ZSignal_pos._long_;
|
||||
m_ZsignalPosZ=m_pSO7_Proto->g_machine.z._ZSignal_pos._long_;
|
||||
|
||||
}
|
||||
//================================================================================================
|
||||
void CSO7_UtilDlg::OnEnKillfocusEditSo7ReadIoStatusAddress()
|
||||
{
|
||||
@@ -1019,7 +1089,8 @@ void CSO7_UtilDlg::OnBnClickedButtonSo7ReadInPortStatus()
|
||||
((CButton*)GetDlgItem(IDC_BUTTON_SO7_READ_IN_PORT_STATUS))->SetWindowTextW(_T("Read IO Status"));
|
||||
UpdateIOStatus();
|
||||
m_OutMessage.Format(_T("[Addr %d]:Data=%d"),m_ReadIOStatusAddr,m_pSO7_Proto->g_machine.InPortStatus);
|
||||
GetDlgItem(IDC_EDIT_STATUS)->SetWindowText(m_OutMessage);
|
||||
OutputWithScroll(m_OutMessage,m_edMSG);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1110,6 +1181,10 @@ void CSO7_UtilDlg::OnTimer(UINT_PTR nIDEvent)
|
||||
{
|
||||
UpdateIOStatus();
|
||||
}
|
||||
if (m_TestZSignalNow)
|
||||
{
|
||||
TestZSignal();
|
||||
}
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_READ_AXIS_XYZ();
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_READ_V_DATA();
|
||||
|
||||
@@ -1177,8 +1252,24 @@ BOOL CSO7_UtilDlg::PreTranslateMessage(MSG* pMsg)
|
||||
return CDialog::PreTranslateMessage(pMsg);
|
||||
}
|
||||
|
||||
//=====================================================================================
|
||||
//Print message on edit control
|
||||
void CSO7_UtilDlg::OutputWithScroll(const CString &strNewText,CEdit &edtOutput)
|
||||
{
|
||||
CString strOutput;
|
||||
edtOutput.GetWindowText(strOutput);
|
||||
strOutput += strNewText;
|
||||
if ("\r\n" != strOutput.Right(2))
|
||||
{
|
||||
strOutput += "\r\n";
|
||||
}
|
||||
|
||||
int iCount = strOutput.GetLength();
|
||||
|
||||
|
||||
|
||||
|
||||
edtOutput.SetRedraw(FALSE);
|
||||
edtOutput.SetWindowText(strOutput);
|
||||
int iLine = edtOutput.GetLineCount();
|
||||
edtOutput.LineScroll(iLine, 0);
|
||||
edtOutput.SetSel(iCount, iCount);
|
||||
edtOutput.SetRedraw(TRUE);
|
||||
}
|
||||
@@ -15,7 +15,6 @@ public:
|
||||
enum { IDD = IDD_SO7_UTIL_DIALOG };
|
||||
|
||||
protected:
|
||||
CButton ccc;
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV Ö§³Ö
|
||||
virtual BOOL OnInitDialog();
|
||||
DECLARE_MESSAGE_MAP()
|
||||
@@ -43,7 +42,7 @@ public:
|
||||
CString m_cs_YScaleCoeff;
|
||||
CString m_cs_ZScaleCoeff;
|
||||
|
||||
|
||||
CEdit m_edMSG;
|
||||
CProcessButton m_Button_MoveX_Left;
|
||||
CProcessButton m_Button_MoveX_Right;
|
||||
CProcessButton m_Button_MoveY_Front;
|
||||
@@ -54,7 +53,14 @@ public:
|
||||
CProcessButton m_Button_MoveV_Zoom_Out;
|
||||
char m_ReadIOStatusAddr;
|
||||
BOOL m_BeginReadIO;
|
||||
BOOL m_TestZSignalNow;
|
||||
long m_ZsignalPosX;
|
||||
long m_ZsignalPosY;
|
||||
long m_ZsignalPosZ;
|
||||
|
||||
void UpdateIOStatus();
|
||||
void TestZSignal();
|
||||
void OutputWithScroll(const CString &strNewText,CEdit &edtOutput);
|
||||
afx_msg void OnBnClickedButtonInitSo7usb();
|
||||
afx_msg void OnBnClickedButtonTermSo7usb();
|
||||
afx_msg void OnBnClickedButtonStartSo7machine();
|
||||
@@ -105,4 +111,5 @@ public:
|
||||
afx_msg void OnBnClickedButtonSo7ReadInPortStatus();
|
||||
afx_msg void OnBnClickedRadioSpeedGear5();
|
||||
afx_msg void OnEnKillfocusEditSo7ReadIoStatusAddress();
|
||||
afx_msg void OnBnClickedButtonSo7TestZSignal();
|
||||
};
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "..\..\..\SevenOcean\SO7_Proto.h"
|
||||
#include "ProcessButton.h"
|
||||
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
#include "VideoCardDefine.h"
|
||||
#include "..\..\..\Videocard\SDK3000\sdk3000_7130.h"
|
||||
#include "Videocard_SDK3000.h"
|
||||
@@ -16,9 +17,9 @@
|
||||
#include "..\..\..\Videocard\SV2000E\DXMediaCap.h"
|
||||
#include "..\..\..\Videocard\SV2000E\dataAcq.h"
|
||||
#include "Videocard_SV2000E.h"
|
||||
|
||||
#include "..\..\..\Videocard\TC4000\Sa7134Capture.h"
|
||||
#include "Videocard_TC4000.h"
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
|
||||
#include "SO7_UtilDlg.h"
|
||||
#include "..\..\..\Keyence\Keyence_Laser.h"
|
||||
@@ -37,7 +38,6 @@
|
||||
|
||||
#include "So7_Option.h"
|
||||
#include "afxdialogex.h"
|
||||
#define _RELEASE_ONLY_ONE_FUNCTION
|
||||
|
||||
//CSerial* m_pSO7_Serial=NULL;
|
||||
CPSerial* m_pSO7_PCDSerial=NULL;
|
||||
@@ -110,7 +110,7 @@ BOOL CSo7_Option::OnInitDialog()
|
||||
((CButton *)GetDlgItem(IDC_RADIO__SO7_RS232))->SetCheck(FALSE);
|
||||
((CButton *)GetDlgItem(IDC_RADIO_SO7_VERIFICATION_ALGORITHM))->SetCheck(FALSE);
|
||||
|
||||
#ifdef _RELEASE_ONLY_ONE_FUNCTION
|
||||
#ifdef _RELEASE_SO7_CONTROLER_ONLY
|
||||
SetTimer(1,50,NULL);
|
||||
#endif
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
@@ -178,21 +178,27 @@ void CSo7_Option::OnBnClickedOk()
|
||||
}
|
||||
else if (((CButton *)GetDlgItem(IDC_RADIO_VIDEOCARD_SDK3000))->GetCheck())
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
CVideocard_SDK3000* pVideocard_SDK3000=new CVideocard_SDK3000();
|
||||
pVideocard_SDK3000->DoModal();
|
||||
delete pVideocard_SDK3000;
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
}
|
||||
else if (((CButton *)GetDlgItem(IDC_RADIO_VIDEOCARD_SV2000E))->GetCheck())
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
CVideocard_SV2000E* pVideocard_SV2000E=new CVideocard_SV2000E();
|
||||
pVideocard_SV2000E->DoModal();
|
||||
delete pVideocard_SV2000E;
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
}
|
||||
else if (((CButton *)GetDlgItem(IDC_RADIO_VIDEOCARD_TC4000))->GetCheck())
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
CVideocard_TC4000* pVideocard_TC4000=new CVideocard_TC4000();
|
||||
pVideocard_TC4000->DoModal();
|
||||
delete pVideocard_TC4000;
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
}
|
||||
else if(((CButton *)GetDlgItem(IDC_RADIO_TEST_IMAGE_DLL))->GetCheck())
|
||||
{
|
||||
@@ -243,7 +249,7 @@ void CSo7_Option::OnBnClickedOk()
|
||||
}
|
||||
|
||||
|
||||
#ifdef _RELEASE_ONLY_ONE_FUNCTION
|
||||
#ifdef _RELEASE_SO7_CONTROLER_ONLY
|
||||
OnBnClickedCancel();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -9,6 +9,14 @@
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="ReleaseSO7|Win32">
|
||||
<Configuration>ReleaseSO7</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="ReleaseSO7|x64">
|
||||
<Configuration>ReleaseSO7</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
@@ -39,12 +47,24 @@
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
@@ -61,9 +81,15 @@
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
@@ -80,11 +106,17 @@
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|x64'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|x64'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|Win32'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
@@ -94,7 +126,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_WARNINGS;_RELEASE_FULL_VERSION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@@ -150,7 +182,7 @@
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_CRT_SECURE_NO_WARNINGS;_RELEASE_FULL_VERSION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
@@ -173,6 +205,38 @@
|
||||
<AdditionalDependencies>..\..\..\..\..\..\..\ThirdParty\UsbSupport\LibUsb_Win\Lib\Msvc\libusb.lib;..\..\..\Videocard\SDK3000\sdk3000_7130.lib;..\..\..\Videocard\SV2000E\dataAcq.lib;..\..\..\Videocard\SV2000E\DXMediaCap.lib;..\..\..\Videocard\TC4000\Sa7134Capture.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|Win32'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
<ValidateAllParameters>true</ValidateAllParameters>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_CRT_SECURE_NO_WARNINGS;_RELEASE_SO7_CONTROLER_ONLY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalDependencies>..\..\..\..\..\..\..\ThirdParty\UsbSupport\LibUsb_Win\Lib\Msvc\libusb.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@@ -203,6 +267,36 @@
|
||||
<AdditionalDependencies>..\..\LibUsb_Win\Lib\Msvc\libusb.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|x64'">
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0409</Culture>
|
||||
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<AdditionalDependencies>..\..\LibUsb_Win\Lib\Msvc\libusb.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\Animatics\Animatics_Proto.cpp" />
|
||||
<ClCompile Include="..\..\..\Keyence\Keyence_Laser.cpp" />
|
||||
@@ -249,7 +343,9 @@
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseSO7|x64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Videocard_SDK3000.cpp" />
|
||||
<ClCompile Include="Videocard_SV2000E.cpp" />
|
||||
|
||||
@@ -82,16 +82,19 @@ BOOL CVideocard_SDK3000::OnInitDialog()
|
||||
//======================================
|
||||
void CVideocard_SDK3000::OnBnClickedOk()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
LoadVideocard();
|
||||
g_hEventExt = CreateEvent(NULL , FALSE , FALSE , NULL);
|
||||
m_hCapThread = CreateThread(NULL , 0 , ThreadCircleCapture , NULL , 0 , NULL);
|
||||
VCAEnableCapSourceStream(m_dwCard , TRUE, Interlaced_Field, SDK3000PrcCapSourceStream);
|
||||
SetTimer(1,50,NULL);
|
||||
GetDlgItem(IDOK)->EnableWindow(false);
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
}
|
||||
//==========================================
|
||||
void CVideocard_SDK3000::OnBnClickedCancel()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
KillTimer(1);
|
||||
if(m_hCapThread)
|
||||
{
|
||||
@@ -103,6 +106,7 @@ void CVideocard_SDK3000::OnBnClickedCancel()
|
||||
g_hEventExt = NULL;
|
||||
}
|
||||
UnloadVideocard();
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
CDialog::OnCancel();
|
||||
}
|
||||
//============================================
|
||||
@@ -152,7 +156,8 @@ void CVideocard_SDK3000::OnBnClickedButtonSavePicture()
|
||||
//=======================================
|
||||
BOOL CVideocard_SDK3000::LoadVideocard()
|
||||
{
|
||||
if ( VCAInitSdk() != S_OK )
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
if ( VCAInitSdk() != S_OK )
|
||||
{
|
||||
::AfxMessageBox(_T("SDK3000ż¨ÇýśŻłőĘźťŻĘ§°ÜŁĄ"));
|
||||
return FALSE;
|
||||
@@ -219,16 +224,18 @@ BOOL CVideocard_SDK3000::LoadVideocard()
|
||||
|
||||
VCASetVideoPropertyValue( m_dwCard, VideoProperty_Sharpness,
|
||||
SharpnessDefault - 5);
|
||||
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//=======================================
|
||||
BOOL CVideocard_SDK3000::UnloadVideocard()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
VCAEnableCapSourceStream(m_dwCard , FALSE, Interlaced_Field, SDK3000PrcCapSourceStream);
|
||||
VCADisConnectDevice(m_dwCard);
|
||||
VCAUnInitSdk();
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
|
||||
if ( m_pDev )
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct DEVICE_INFO
|
||||
{
|
||||
HWND hWnd;
|
||||
|
||||
@@ -98,18 +98,22 @@ BOOL CVideocard_SV2000E::OnInitDialog()
|
||||
//===================================================
|
||||
void CVideocard_SV2000E::OnBnClickedOk()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
bInitSdk=DXInitialize();
|
||||
LoadVideocard();
|
||||
SetTimer(1,50,NULL);
|
||||
GetDlgItem(IDOK)->EnableWindow(false);
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
}
|
||||
//===================================================
|
||||
void CVideocard_SV2000E::OnBnClickedCancel()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
KillTimer(1);
|
||||
UnloadVideocard(m_device);
|
||||
UnloadVideocard(m_device_Nav);
|
||||
DXUninitialize();
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
CDialog::OnCancel();
|
||||
}
|
||||
//===================================================
|
||||
@@ -157,6 +161,7 @@ void CVideocard_SV2000E::OnBnClickedButtonSv2000eSavefile()
|
||||
//===================================================
|
||||
void CVideocard_SV2000E::OnBnClickedRadioSv2000eChannel1()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
m_Channel=1;
|
||||
if (m_OpenDevNo==0)
|
||||
{
|
||||
@@ -176,11 +181,13 @@ void CVideocard_SV2000E::OnBnClickedRadioSv2000eChannel1()
|
||||
UnloadVideocard(m_device_Nav);
|
||||
LoadVideocard();
|
||||
}
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
}
|
||||
//===================================================
|
||||
void CVideocard_SV2000E::OnBnClickedRadioSv2000eChannel2()
|
||||
{
|
||||
m_Channel=2;
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
m_Channel=2;
|
||||
if (m_OpenDevNo==0)
|
||||
{
|
||||
CloseDevice(m_device);
|
||||
@@ -199,10 +206,12 @@ void CVideocard_SV2000E::OnBnClickedRadioSv2000eChannel2()
|
||||
UnloadVideocard(m_device_Nav);
|
||||
LoadVideocard();
|
||||
}
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
}
|
||||
//===================================================
|
||||
void CVideocard_SV2000E::OnCbnSelchangeComboSv2000eSelectDevNumber()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
m_OpenDevNo=((CComboBox *)GetDlgItem(IDC_COMBO_SV2000E_SELECT_DEV_NUMBER))->GetCurSel();
|
||||
if (m_OpenDevNo==2)//both
|
||||
{
|
||||
@@ -216,10 +225,13 @@ void CVideocard_SV2000E::OnCbnSelchangeComboSv2000eSelectDevNumber()
|
||||
CloseDevice(m_device_Nav);
|
||||
OpenDevice(m_OpenDevNo,m_device);
|
||||
}
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
}
|
||||
//=======================================
|
||||
BOOL CVideocard_SV2000E::LoadVideocard()
|
||||
{
|
||||
BOOL rStatus(FALSE);
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
DEVICE_TAG devTags[100];
|
||||
unsigned num = 100;
|
||||
DXEnumVideoCodecs(devTags, num);
|
||||
@@ -246,15 +258,21 @@ BOOL CVideocard_SV2000E::LoadVideocard()
|
||||
if((bInitSdk!=0)||(m_nDevNum<1)||(m_device==NULL))
|
||||
{
|
||||
::AfxMessageBox(_T("SV2000E¿¨³õʼ»¯Ê§°Ü£¡"));
|
||||
return FALSE;
|
||||
rStatus=FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
rStatus=TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
return rStatus;
|
||||
}
|
||||
//=======================================
|
||||
void CVideocard_SV2000E::OpenDevice(unsigned int _DevNo,device_handle &_OpenedDevice)
|
||||
{
|
||||
_OpenedDevice= DXOpenDevice(_DevNo, NULL);
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
_OpenedDevice= DXOpenDevice(_DevNo, NULL);
|
||||
|
||||
unsigned standard(VideoStandard_PAL_D);
|
||||
unsigned colorspace(cs_yuy2);//cs_rgb24
|
||||
@@ -286,6 +304,11 @@ void CVideocard_SV2000E::OpenDevice(unsigned int _DevNo,device_handle &_OpenedDe
|
||||
m_status=DXSetRawVideoCallback(_OpenedDevice, SVAPrcVidCapCallBackNav, this);
|
||||
m_status=DXStartRawVideoCallback(_OpenedDevice,SVAPrcVidCapCallBackNav,this);
|
||||
}
|
||||
#else
|
||||
UNREFERENCED_PARAMETER(_DevNo);
|
||||
UNREFERENCED_PARAMETER(_OpenedDevice);
|
||||
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
|
||||
};
|
||||
//=======================================
|
||||
@@ -296,6 +319,7 @@ void CVideocard_SV2000E::CloseDevice(device_handle _Device)
|
||||
//=======================================
|
||||
BOOL CVideocard_SV2000E::UnloadVideocard(device_handle _Device)
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
if (_Device)
|
||||
{
|
||||
m_status=DXStopRawVideoCallback(_Device);
|
||||
@@ -303,11 +327,15 @@ BOOL CVideocard_SV2000E::UnloadVideocard(device_handle _Device)
|
||||
m_status=DXDeviceStop(_Device);
|
||||
DXCloseDevice(_Device);
|
||||
}
|
||||
#else
|
||||
UNREFERENCED_PARAMETER(_Device);
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
return TRUE;
|
||||
}
|
||||
//================================================================
|
||||
void CVideocard_SV2000E::OnEnKillfocusEdittc4000SetDeinterlace()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
CString StrTmp;
|
||||
((CEdit*)GetDlgItem(IDC_EDITTC4000_SET_DEINTERLACE))->GetWindowText(StrTmp);
|
||||
USES_CONVERSION;
|
||||
@@ -328,6 +356,7 @@ void CVideocard_SV2000E::OnEnKillfocusEdittc4000SetDeinterlace()
|
||||
m_status=DXEnableDeinterlace(m_device,iDein);
|
||||
m_status=DXEnableDeinterlace(m_device_Nav,iDein);
|
||||
}
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
}
|
||||
//================================================================
|
||||
void CVideocard_SV2000E::ConvertVideoSubType(const Image_Buffer& _ImageBuffer, BYTE *_pSrcData,ConvertColorType _type,BOOL _bMirror)
|
||||
@@ -618,4 +647,3 @@ unsigned CALLBACK SVAPrcVidCapCallBackNav(unsigned char* buffer, unsigned colorS
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
// CVideocard_SV2000E dialog
|
||||
unsigned CALLBACK SVAPrcVidCapCallBack(unsigned char* buffer, unsigned colorSpace, unsigned width, unsigned height, unsigned bytesWidth, void* context);
|
||||
unsigned CALLBACK SVAPrcVidCapCallBackNav(unsigned char* buffer, unsigned colorSpace, unsigned width, unsigned height, unsigned bytesWidth, void* context);
|
||||
|
||||
@@ -138,35 +138,43 @@ void CVideocard_TC4000::OnBnClickedCheckMirrorVertically()
|
||||
//==========================================
|
||||
void CVideocard_TC4000::OnBnClickedRadioTc4000Channel1()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
VCAStopVideoCapture(SwitchChannel);
|
||||
SwitchChannel=0;
|
||||
VCAStartVideoCapture(SwitchChannel,CAP_ORIGIN_STREAM,MPEG4_AVIFILE_ONLY,"");
|
||||
#endif //_RELEASE_FULL_VERSION;
|
||||
}
|
||||
|
||||
//==========================================
|
||||
void CVideocard_TC4000::OnBnClickedRadioTc4000Channel2()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
VCAStopVideoCapture(SwitchChannel);
|
||||
SwitchChannel=1;
|
||||
VCAStartVideoCapture(SwitchChannel,CAP_ORIGIN_STREAM,MPEG4_AVIFILE_ONLY,"");
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
|
||||
}
|
||||
|
||||
//==========================================
|
||||
void CVideocard_TC4000::OnBnClickedRadioTc4000Channel3()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
VCAStopVideoCapture(SwitchChannel);
|
||||
SwitchChannel=2;
|
||||
VCAStartVideoCapture(SwitchChannel,CAP_ORIGIN_STREAM,MPEG4_AVIFILE_ONLY,"");
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
|
||||
}
|
||||
|
||||
//==========================================
|
||||
void CVideocard_TC4000::OnBnClickedRadioTc4000Channel4()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
VCAStopVideoCapture(SwitchChannel);
|
||||
SwitchChannel=3;
|
||||
VCAStartVideoCapture(SwitchChannel,CAP_ORIGIN_STREAM,MPEG4_AVIFILE_ONLY,"");
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
|
||||
}
|
||||
|
||||
@@ -193,7 +201,9 @@ void CVideocard_TC4000::OnBnClickedButtonSavePicture()
|
||||
//=======================================
|
||||
BOOL CVideocard_TC4000::LoadVideocard()
|
||||
{
|
||||
HWND mHwnd=GetDlgItem(IDC_STATIC_TC4000_PICTURE)->GetSafeHwnd();
|
||||
BOOL rStatus(FALSE);
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
HWND mHwnd=GetDlgItem(IDC_STATIC_TC4000_PICTURE)->GetSafeHwnd();
|
||||
m_Status=VCAInitSdk(mHwnd, PCI_MEMORY_VIDEOMEMORY,0);//PCI_MEMORY_VIDEOMEMORY);
|
||||
if(m_Status)
|
||||
{
|
||||
@@ -217,23 +227,27 @@ BOOL CVideocard_TC4000::LoadVideocard()
|
||||
}
|
||||
|
||||
VCAStartVideoCapture(0,CAP_ORIGIN_STREAM,MPEG4_AVIFILE_ONLY,"");
|
||||
return TRUE;
|
||||
rStatus=TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
rStatus=FALSE;
|
||||
}
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
return rStatus;
|
||||
}
|
||||
|
||||
//=======================================
|
||||
BOOL CVideocard_TC4000::UnloadVideocard()
|
||||
{
|
||||
#ifdef _RELEASE_FULL_VERSION
|
||||
for(int i=0;i<m_nDevNum;i++)
|
||||
{
|
||||
m_Status=VCAStopVideoCapture(i);
|
||||
m_Status=VCACloseDevice(i);
|
||||
}
|
||||
VCAUnInitSdk();
|
||||
#endif //_RELEASE_FULL_VERSION
|
||||
return TRUE;
|
||||
}
|
||||
//================================================================
|
||||
|
||||
@@ -644,6 +644,7 @@
|
||||
#define IDC_BUTTON_STOP_SCAN_KEYENCE_LK_GLASER 1524
|
||||
#define IDC_BUTTON_IMAGEDLL_GET_SCAN_LASER_DATA 1524
|
||||
#define IDC_BUTTON_SO7_MANUAL_MACHINE_STOP_MACHINE 1524
|
||||
#define IDC_BUTTON_SO7_TEST_Z_SIGNAL 1524
|
||||
#define IDC_CUSTOM1 1525
|
||||
#define IDC_CUSTOM_CANVAS 1525
|
||||
#define IDC_BUTTON_STOP_SCAN_KEYENCE_LK_HLASER 1525
|
||||
|
||||
@@ -11,6 +11,8 @@ Global
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
ReleaseSO7|Win32 = ReleaseSO7|Win32
|
||||
ReleaseSO7|x64 = ReleaseSO7|x64
|
||||
Template|Win32 = Template|Win32
|
||||
Template|x64 = Template|x64
|
||||
EndGlobalSection
|
||||
@@ -23,6 +25,10 @@ Global
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.Release|Win32.Build.0 = Release|Win32
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.Release|x64.ActiveCfg = Release|x64
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.Release|x64.Build.0 = Release|x64
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.ReleaseSO7|Win32.ActiveCfg = ReleaseSO7|Win32
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.ReleaseSO7|Win32.Build.0 = ReleaseSO7|Win32
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.ReleaseSO7|x64.ActiveCfg = ReleaseSO7|x64
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.ReleaseSO7|x64.Build.0 = ReleaseSO7|x64
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.Template|Win32.ActiveCfg = Template|Win32
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.Template|Win32.Build.0 = Template|Win32
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.Template|x64.ActiveCfg = Template|x64
|
||||
@@ -31,8 +37,9 @@ Global
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Release|Win32.Build.0 = Release|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Release|x64.ActiveCfg = Release|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.ReleaseSO7|Win32.ActiveCfg = ReleaseSO7|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.ReleaseSO7|x64.ActiveCfg = ReleaseSO7|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Template|Win32.Build.0 = Release|Win32
|
||||
{0E5F6F86-6883-47F0-9DC9-8232BBF13B58}.Template|x64.ActiveCfg = Release|Win32
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user