增加导出DLL工程。
This commit is contained in:
@@ -4533,3 +4533,9 @@ _start_machine
|
||||
Init:Open device succeed .
|
||||
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
|
||||
Unable to open device Init:Open device succeed .
|
||||
|
||||
_start_machine
|
||||
Exit: Exit_SO7Usb
|
||||
|
||||
+212
@@ -0,0 +1,212 @@
|
||||
// MachineInterfaceDll.cpp : 定义 DLL 应用程序的导出函数。
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <BaseTsd.h>
|
||||
#include <WinBase.h>
|
||||
#include <WinDef.h>
|
||||
#include <atltypes.h>
|
||||
#include <tchar.h>
|
||||
#include <atlstr.h>
|
||||
#include "..\..\..\SevenOcean\DLL.h"
|
||||
#include "..\..\..\SevenOcean\EF8000_Interface.h"
|
||||
#include "..\..\..\SevenOcean\SO7_Proto.h"
|
||||
#include "MachineInterfaceDll.h"
|
||||
|
||||
CEF8000_Interface* m_pEF8000_Interface=NULL;
|
||||
CSO7_Proto* m_pSO7_Proto=NULL;
|
||||
bool g_bOfflineOnly(false);
|
||||
|
||||
//==================================================================
|
||||
SSI_STATUS_MOTION LoadMotionParameter()
|
||||
{
|
||||
BOOL rStatus(FALSE);
|
||||
if (!m_pEF8000_Interface)
|
||||
{
|
||||
m_pEF8000_Interface=new CEF8000_Interface();
|
||||
}
|
||||
rStatus=m_pEF8000_Interface->OpenMotorDat();
|
||||
if (rStatus)
|
||||
{
|
||||
for(int j=0;j<5;j++)
|
||||
{
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_base[j]=m_pEF8000_Interface->Set_Speed[j][0];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_max[j]=m_pEF8000_Interface->Set_Speed[j][1];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_start[j]=m_pEF8000_Interface->Set_Speed[j][2];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_fresh[j]=m_pEF8000_Interface->Set_Speed[j][3];
|
||||
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._speed_slow_dis[j]=m_pEF8000_Interface->slow_dis[j];
|
||||
}
|
||||
for(int j=0;j<5;j++)
|
||||
{
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_base[j]=m_pEF8000_Interface->Set_Speed[j+5][0];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_max[j]=m_pEF8000_Interface->Set_Speed[j+5][1];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_start[j]=m_pEF8000_Interface->Set_Speed[j+5][2];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_fresh[j]=m_pEF8000_Interface->Set_Speed[j+5][3];
|
||||
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._speed_slow_dis[j]=m_pEF8000_Interface->slow_dis[j+5];
|
||||
}
|
||||
for(int j=0;j<5;j++)
|
||||
{
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_base[j]=m_pEF8000_Interface->Set_Speed[j+10][0];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_max[j]=m_pEF8000_Interface->Set_Speed[j+10][1];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_start[j]=m_pEF8000_Interface->Set_Speed[j+10][2];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_fresh[j]=m_pEF8000_Interface->Set_Speed[j+10][3];
|
||||
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._speed_slow_dis[j]=m_pEF8000_Interface->slow_dis[j+10];
|
||||
}
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._motor_precision=m_pEF8000_Interface->g_precision[0];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._motor_precision=m_pEF8000_Interface->g_precision[1];
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._motor_precision= m_pEF8000_Interface->g_precision[2];
|
||||
|
||||
m_pSO7_Proto->g_machine.s_machine_config.x_axis._motor_wheelbase=m_pEF8000_Interface->Image_Info.m_Motor_Dx;
|
||||
m_pSO7_Proto->g_machine.s_machine_config.y_axis._motor_wheelbase=m_pEF8000_Interface->Image_Info.m_Motor_Dy;
|
||||
m_pSO7_Proto->g_machine.s_machine_config.z_axis._motor_wheelbase=m_pEF8000_Interface->Image_Info.m_Motor_Dz;
|
||||
m_pSO7_Proto->g_machine._motor_pulse_num= m_pEF8000_Interface->Image_Info.m_Motor_Plus_Num;
|
||||
}
|
||||
if (rStatus)
|
||||
{
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
return SSI_STATUS_MOTOR_DAT_FILE_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
//==================================================================
|
||||
extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Machine_Startup(bool bOfflineOnly,bool bDCCHome)
|
||||
{
|
||||
SSI_STATUS_MOTION rStatus=SSI_STATUS_MOTION_NORMAL;
|
||||
g_bOfflineOnly=bOfflineOnly;
|
||||
if (!g_bOfflineOnly)
|
||||
{
|
||||
if (!m_pSO7_Proto)
|
||||
{
|
||||
m_pSO7_Proto=new CSO7_Proto();
|
||||
}
|
||||
rStatus=m_pSO7_Proto->Init_SO7Usb();
|
||||
if (rStatus==SSI_STATUS_MOTION_NORMAL)
|
||||
{
|
||||
m_pSO7_Proto->_start_machine();
|
||||
rStatus=m_pSO7_Proto->Load_So7_Config();
|
||||
if (rStatus==SSI_STATUS_MOTION_NORMAL)
|
||||
{
|
||||
rStatus=LoadMotionParameter();
|
||||
if (rStatus==SSI_STATUS_MOTION_NORMAL)
|
||||
{
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_GET_RESET_FLAG();
|
||||
if(m_pSO7_Proto->g_machine.IsSupportReadInterrputMsg)
|
||||
{
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_READ_FIRMWARE_VERSION_INFO();
|
||||
}
|
||||
if (bDCCHome)
|
||||
{
|
||||
m_pSO7_Proto->so7_motion_Dcc_Home_R();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return rStatus;
|
||||
}
|
||||
//==================================================================
|
||||
extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Machine_Sutdown()
|
||||
{
|
||||
if (m_pEF8000_Interface)
|
||||
{
|
||||
delete m_pEF8000_Interface;
|
||||
m_pEF8000_Interface=nullptr;
|
||||
}
|
||||
if (m_pSO7_Proto)
|
||||
{
|
||||
if(m_pSO7_Proto->g_machine.IsSupportReadInterrputMsg)
|
||||
{
|
||||
m_pSO7_Proto->_send_cmd_SO7_CMD_SET_GET_INTERRUPT_MSG_METHOD(E_GET_INTERRUPT_MSG_INTERRUPT);
|
||||
}
|
||||
m_pSO7_Proto->_shutdown_machine();
|
||||
m_pSO7_Proto->Exit_SO7Usb();
|
||||
delete m_pSO7_Proto;
|
||||
m_pSO7_Proto=nullptr;
|
||||
}
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
//==================================================================
|
||||
extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_GetPositionR(double& dPos)
|
||||
{
|
||||
if (!g_bOfflineOnly)
|
||||
{
|
||||
if (!m_pSO7_Proto)
|
||||
{
|
||||
m_pSO7_Proto=new CSO7_Proto();
|
||||
}
|
||||
return m_pSO7_Proto->so7_motion_get_position_R(dPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
}
|
||||
//==================================================================
|
||||
extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_SetPositionR(double dAbsolutePos,bool bWait)
|
||||
{
|
||||
if (!g_bOfflineOnly)
|
||||
{
|
||||
if (!m_pSO7_Proto)
|
||||
{
|
||||
m_pSO7_Proto=new CSO7_Proto();
|
||||
}
|
||||
return m_pSO7_Proto->so7_motion_set_position_R(dAbsolutePos,bWait);
|
||||
}
|
||||
else
|
||||
{
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
}
|
||||
//==================================================================
|
||||
extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_IsHomed(bool &bHomed)
|
||||
{
|
||||
if (!g_bOfflineOnly)
|
||||
{
|
||||
if (!m_pSO7_Proto)
|
||||
{
|
||||
m_pSO7_Proto=new CSO7_Proto();
|
||||
}
|
||||
return m_pSO7_Proto->so7_Motion_R_IsHomed(bHomed);
|
||||
}
|
||||
else
|
||||
{
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
}
|
||||
//==================================================================
|
||||
extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_IsFinished(bool &bFinished)
|
||||
{
|
||||
if (!g_bOfflineOnly)
|
||||
{
|
||||
if (!m_pSO7_Proto)
|
||||
{
|
||||
m_pSO7_Proto=new CSO7_Proto();
|
||||
}
|
||||
return m_pSO7_Proto->so7_Motion_R_IsMotionFInished(bFinished);
|
||||
}
|
||||
else
|
||||
{
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
}
|
||||
//==================================================================
|
||||
extern "C" EXP_IMP SSI_STATUS_MOTION WINAPI Motion_MoveR(char cSpeedGear)
|
||||
{
|
||||
if (!g_bOfflineOnly)
|
||||
{
|
||||
if (!m_pSO7_Proto)
|
||||
{
|
||||
m_pSO7_Proto=new CSO7_Proto();
|
||||
}
|
||||
return m_pSO7_Proto->so7_motion_move_R(cSpeedGear);
|
||||
}
|
||||
else
|
||||
{
|
||||
return SSI_STATUS_MOTION_NORMAL;
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef MACHINEINTERFACEDLL_EXPORTS
|
||||
#define EXP_IMP __declspec(dllexport)
|
||||
#else
|
||||
#define EXP_IMP __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
enum SSI_STATUS_MOTION
|
||||
{
|
||||
SSI_STATUS_MOTION_NORMAL = 0,
|
||||
SSI_STATUS_MOTION_DATALINK_ERROR,
|
||||
SSI_STATUS_MOTION_LIMIT_REACHED,
|
||||
SSI_STATUS_MOTION_INVALID_PARAMETERS,
|
||||
SSI_STATUS_MOTION_TIMEOUT,
|
||||
SSI_STATUS_SO7_CONFIG_FILE_NOT_FOUND,
|
||||
SSI_STATUS_MOTOR_DAT_FILE_NOT_FOUND,
|
||||
SSI_STATUS_UNKNOWN_ERROR
|
||||
};
|
||||
|
||||
extern "C"
|
||||
{
|
||||
///////////////////////////////////////////////
|
||||
EXP_IMP SSI_STATUS_MOTION WINAPI Machine_Startup(bool bOfflineOnly,bool bDCCHome);
|
||||
EXP_IMP SSI_STATUS_MOTION WINAPI Machine_Sutdown();
|
||||
//Units:Rad
|
||||
EXP_IMP SSI_STATUS_MOTION WINAPI Motion_GetPositionR(double& dPos);
|
||||
EXP_IMP SSI_STATUS_MOTION WINAPI Motion_SetPositionR(double dAbsolutePos,bool bWait);
|
||||
EXP_IMP SSI_STATUS_MOTION WINAPI Motion_IsHomed(bool &bHomed);
|
||||
EXP_IMP SSI_STATUS_MOTION WINAPI Motion_IsFinished(bool &bFinished);
|
||||
//SpeedGear:1,2,3,4(Faster)
|
||||
EXP_IMP SSI_STATUS_MOTION WINAPI Motion_MoveR(char cSpeedGear);
|
||||
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A945B062-6081-49F0-992D-D14769C4C7D4}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>MachineInterfaceDll</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<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>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MACHINEINTERFACEDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>..\..\..\..\..\..\..\ThirdParty\UsbSupport\LibUsb_Win\Lib\Msvc\libusb.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MACHINEINTERFACEDLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>..\..\..\..\..\..\..\ThirdParty\UsbSupport\LibUsb_Win\Lib\Msvc\libusb.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\MicroVu\logger.h" />
|
||||
<ClInclude Include="..\..\..\SevenOcean\EF8000_Interface.h" />
|
||||
<ClInclude Include="..\..\..\SevenOcean\SO7_Proto.h" />
|
||||
<ClInclude Include="MachineInterfaceDll.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\MicroVu\LOGGER.CPP" />
|
||||
<ClCompile Include="..\..\..\SevenOcean\EF8000_Interface.cpp" />
|
||||
<ClCompile Include="..\..\..\SevenOcean\SO7_Proto.cpp" />
|
||||
<ClCompile Include="MachineInterfaceDll.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MachineInterfaceDll.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\SevenOcean\EF8000_Interface.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\SevenOcean\SO7_Proto.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\MicroVu\logger.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MachineInterfaceDll.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\SevenOcean\EF8000_Interface.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\SevenOcean\SO7_Proto.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\MicroVu\LOGGER.CPP">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerCommand>E:\Tony\MachineInterfaceUtility\PcDmis\Base\Interfac\Msi\Hsi\Tools\UsbUtility\Debug\Win32TestDll.exe</LocalDebuggerCommand>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : 只包括标准包含文件的源文件
|
||||
// MachineInterfaceDll.pch 将作为预编译头
|
||||
// stdafx.obj 将包含预编译类型信息
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: 在 STDAFX.H 中
|
||||
// 引用任何所需的附加头文件,而不是在此文件中引用
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _SECURE_ATL
|
||||
#define _SECURE_ATL 1
|
||||
#endif
|
||||
|
||||
#ifndef VC_EXTRALEAN
|
||||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||
#endif
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
|
||||
|
||||
// turns off MFC's hiding of some common and often safely ignored warning messages
|
||||
#define _AFX_ALL_WARNINGS
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
|
||||
|
||||
#include <afxdisp.h> // MFC Automation classes
|
||||
|
||||
|
||||
|
||||
#ifndef _AFX_NO_OLE_SUPPORT
|
||||
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
|
||||
#endif
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
#include <afxcontrolbars.h> // MFC support for ribbons and control bars
|
||||
|
||||
#ifdef _UNICODE
|
||||
#if defined _M_IX86
|
||||
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
||||
#elif defined _M_IA64
|
||||
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
||||
#elif defined _M_X64
|
||||
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
||||
#else
|
||||
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
CString GetAppPath(void);
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
|
||||
|
||||
// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
|
||||
// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
|
||||
|
||||
#include <SDKDDKVer.h>
|
||||
@@ -143,3 +143,8 @@ Init:Open device succeed .
|
||||
Destruct Cso7_Proto.
|
||||
|
||||
Construct Cso7_Proto.
|
||||
|
||||
Destruct Cso7_Proto.
|
||||
|
||||
Construct Cso7_Proto.
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <math.h>
|
||||
#include "afxpropertysheet.h"
|
||||
#include "resource.h"
|
||||
#include "..\..\..\SevenOcean\DLL.h"
|
||||
#include "..\..\..\SevenOcean\EF8000_Interface.h"
|
||||
#include "..\..\..\SevenOcean\SO7_Proto.h"
|
||||
#include "DrawGraph.h"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "afxpropertysheet.h"
|
||||
#include "resource.h"
|
||||
#include "..\..\..\SevenOcean\DLL.h"
|
||||
#include "..\..\..\SevenOcean\EF8000_Interface.h"
|
||||
#include "..\..\..\SevenOcean\SO7_Proto.h"
|
||||
#include "..\..\..\SevenOcean\CMMIO_SERIAL.H"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "resource.h"
|
||||
#include "AboutDlg.h"
|
||||
#include "..\..\..\SevenOcean\CMMIO_SERIAL.H"
|
||||
#include "..\..\..\SevenOcean\DLL.h"
|
||||
#include "..\..\..\SevenOcean\EF8000_Interface.h"
|
||||
#include "..\..\..\SevenOcean\SO7_Proto.h"
|
||||
#include "..\..\..\SevenOcean\SO7_Proto_Aux.h"
|
||||
|
||||
@@ -3,6 +3,10 @@ Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Usb_Util", "UsbUtil\Usb_Util.vcxproj", "{50B21A79-C887-4F7E-8911-7E3A685BFA25}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MachineInterfaceDll", "MachineInterfaceDll\MachineInterfaceDll.vcxproj", "{A945B062-6081-49F0-992D-D14769C4C7D4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Win32TestDll", "Win32TestDll\Win32TestDll.vcxproj", "{BF02B850-BB32-4635-9E53-8583C474884D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -31,6 +35,30 @@ Global
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.Template|Win32.Build.0 = Template|Win32
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.Template|x64.ActiveCfg = Template|x64
|
||||
{50B21A79-C887-4F7E-8911-7E3A685BFA25}.Template|x64.Build.0 = Template|x64
|
||||
{A945B062-6081-49F0-992D-D14769C4C7D4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A945B062-6081-49F0-992D-D14769C4C7D4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A945B062-6081-49F0-992D-D14769C4C7D4}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{A945B062-6081-49F0-992D-D14769C4C7D4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A945B062-6081-49F0-992D-D14769C4C7D4}.Release|Win32.Build.0 = Release|Win32
|
||||
{A945B062-6081-49F0-992D-D14769C4C7D4}.Release|x64.ActiveCfg = Release|Win32
|
||||
{A945B062-6081-49F0-992D-D14769C4C7D4}.ReleaseSO7|Win32.ActiveCfg = Release|Win32
|
||||
{A945B062-6081-49F0-992D-D14769C4C7D4}.ReleaseSO7|Win32.Build.0 = Release|Win32
|
||||
{A945B062-6081-49F0-992D-D14769C4C7D4}.ReleaseSO7|x64.ActiveCfg = Release|Win32
|
||||
{A945B062-6081-49F0-992D-D14769C4C7D4}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{A945B062-6081-49F0-992D-D14769C4C7D4}.Template|Win32.Build.0 = Release|Win32
|
||||
{A945B062-6081-49F0-992D-D14769C4C7D4}.Template|x64.ActiveCfg = Release|Win32
|
||||
{BF02B850-BB32-4635-9E53-8583C474884D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{BF02B850-BB32-4635-9E53-8583C474884D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{BF02B850-BB32-4635-9E53-8583C474884D}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{BF02B850-BB32-4635-9E53-8583C474884D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{BF02B850-BB32-4635-9E53-8583C474884D}.Release|Win32.Build.0 = Release|Win32
|
||||
{BF02B850-BB32-4635-9E53-8583C474884D}.Release|x64.ActiveCfg = Release|Win32
|
||||
{BF02B850-BB32-4635-9E53-8583C474884D}.ReleaseSO7|Win32.ActiveCfg = Release|Win32
|
||||
{BF02B850-BB32-4635-9E53-8583C474884D}.ReleaseSO7|Win32.Build.0 = Release|Win32
|
||||
{BF02B850-BB32-4635-9E53-8583C474884D}.ReleaseSO7|x64.ActiveCfg = Release|Win32
|
||||
{BF02B850-BB32-4635-9E53-8583C474884D}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{BF02B850-BB32-4635-9E53-8583C474884D}.Template|Win32.Build.0 = Release|Win32
|
||||
{BF02B850-BB32-4635-9E53-8583C474884D}.Template|x64.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
// TestDll.cpp : 定义控制台应用程序的入口点。
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "..\MachineInterfaceDll\MachineInterfaceDll.h"
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
SSI_STATUS_MOTION status=Machine_Startup(false,false);
|
||||
double dPos(0.0);
|
||||
bool bb;
|
||||
status=Motion_GetPositionR(dPos);
|
||||
status=Motion_SetPositionR(dPos,true);
|
||||
status=Motion_IsHomed(bb);
|
||||
status=Motion_IsFinished(bb);
|
||||
status=Motion_MoveR(1);
|
||||
status=Machine_Sutdown();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{BF02B850-BB32-4635-9E53-8583C474884D}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>Win32TestDll</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<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>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>../Debug/MachineInterfaceDll.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>../Release/MachineInterfaceDll.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Win32TestDll.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Win32TestDll.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : 只包括标准包含文件的源文件
|
||||
// Win32TestDll.pch 将作为预编译头
|
||||
// stdafx.obj 将包含预编译类型信息
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: 在 STDAFX.H 中
|
||||
// 引用任何所需的附加头文件,而不是在此文件中引用
|
||||
@@ -0,0 +1,15 @@
|
||||
// stdafx.h : 标准系统包含文件的包含文件,
|
||||
// 或是经常使用但不常更改的
|
||||
// 特定于项目的包含文件
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
// TODO: 在此处引用程序需要的其他头文件
|
||||
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。
|
||||
|
||||
// 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将
|
||||
// WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。
|
||||
|
||||
#include <SDKDDKVer.h>
|
||||
Reference in New Issue
Block a user