MachineInterfaceDll.dll新增IO口读写设置。

This commit is contained in:
TAO Cheng
2014-05-12 21:51:02 +08:00
parent 9559827310
commit 58b492b6fb
14 changed files with 412 additions and 113 deletions
@@ -461,6 +461,45 @@ EXP_IMP SSI_STATUS_MOTION Illumination_SetLampState(double dTopLightPercent,doub
return SSI_STATUS_MOTION_NORMAL;
}
}
//==============================IO================================================
EXP_IMP SSI_STATUS_MOTION Machine_GetDIO(EIO_PORT Channel,BYTE& bDISts)
{
if (!g_bOfflineOnly)
{
if (m_pSO7_Proto)
{
return m_pSO7_Proto->so7_GetDIO(static_cast<int>(Channel),bDISts);
}
else
{
return SSI_STATUS_MACHINE_UNINITIALIZED;
}
}
else
{
return SSI_STATUS_MOTION_NORMAL;
}
}
EXP_IMP SSI_STATUS_MOTION Machine_SetDO(EIO_PORT Channel,BYTE bDOSts)
{
if (!g_bOfflineOnly)
{
if (m_pSO7_Proto)
{
return m_pSO7_Proto->so7_SetDO(static_cast<int>(Channel),bDOSts);
}
else
{
return SSI_STATUS_MACHINE_UNINITIALIZED;
}
}
else
{
return SSI_STATUS_MOTION_NORMAL;
}
}
//==============================CMD================================================
EXP_IMP SSI_STATUS_MOTION SEND_SYS_COMMAND(char Cmd,char SubCmd,char Type,char Data)
{
if (!g_bOfflineOnly)
@@ -29,6 +29,13 @@ enum EHOME_MACHINE_MODE
HOME_R=30,
HOME_TOATAL=255
};
enum EIO_PORT
{
INPORT_J2=0,//Effective bit:0-5
OUTPORT_J1,//Effective bit:0-2
OUTPORT_J3,//Effective bit:0-5
LIMIT_SWITCH_J4//Effective bit:0-5
};
enum SSI_STATUS_MOTION
{
SSI_STATUS_MOTION_NORMAL = 0,
@@ -71,6 +78,9 @@ extern "C"
//==============================Illumination=======================================
//Range value:0.0-100.0
EXP_IMP SSI_STATUS_MOTION Illumination_SetLampState(double dTopLightPercent,double dBottomLightPercent,double dCoaxialLightPercent,double dReservedLightPercent,double dRingLightPercent,char cOuterRingLightSwitch,char cInnerRingLightSwitch);
//==============================IO================================================
EXP_IMP SSI_STATUS_MOTION Machine_GetDIO(EIO_PORT Channel,BYTE& bDISts);
EXP_IMP SSI_STATUS_MOTION Machine_SetDO(EIO_PORT Channel,BYTE bDOSts);
//==============================CMD================================================
EXP_IMP SSI_STATUS_MOTION SEND_SYS_COMMAND(char Cmd,char SubCmd,char Type,char Data);
@@ -57,6 +57,10 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>..\..\..\..\..\..\..\ThirdParty\UsbSupport\LibUsb_Win\Lib\Msvc\libusb.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>xcopy "$(OutDir)\MachineInterfaceDll.dll" ..\Debug\MachineInterface\*.* /D /F /Y
xcopy "$(OutDir)\MachineInterfaceDll.lib" ..\Debug\MachineInterface\*.* /D /F /Y</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@@ -1,8 +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>
</LocalDebuggerCommand>
<LocalDebuggerCommand>..\Debug\MachineInterface\HoleEdgeInspect.exe</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>