VC++ 与PLC串口通讯


是用自由口通讯,有PLC程序和上位机程序,可以对PLc进行操作
资源截图
代码片段和文件信息
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++

// NOTE: Do not modify the contents of this file.  If this class is regenerated by
//  Microsoft Visual C++ your modifications will be overwritten.


#include “stdafx.h“
#include “mscomm.h“

/////////////////////////////////////////////////////////////////////////////
// CMSComm

IMPLEMENT_DYNCREATE(CMSComm CWnd)

/////////////////////////////////////////////////////////////////////////////
// CMSComm properties

/////////////////////////////////////////////////////////////////////////////
// CMSComm operations

void CMSComm::SetCDHolding(BOOL bNewValue)
{
static BYTE parms[] =
VTS_BOOL;
InvokeHelper(0x1 DISPATCH_PROPERTYPUT VT_EMPTY NULL parms
 bNewValue);
}

BOOL CMSComm::GetCDHolding()
{
BOOL result;
InvokeHelper(0x1 DISPATCH_PROPERTYGET VT_BOOL (void*)&result NULL);
return result;
}

void CMSComm::SetCommID(long nNewValue)
{
static BYTE parms[] =
VTS_I4;
InvokeHelper(0x3 DISPATCH_PROPERTYPUT VT_EMPTY NULL parms
 nNewValue);
}

long CMSComm::GetCommID()
{
long result;
InvokeHelper(0x3 DISPATCH_PROPERTYGET VT_I4 (void*)&result NULL);
return result;
}

void CMSComm::SetCommPort(short nNewValue)
{
static BYTE parms[] =
VTS_I2;
InvokeHelper(0x4 DISPATCH_PROPERTYPUT VT_EMPTY NULL parms
 nNewValue);
}

short CMSComm::GetCommPort()
{
short result;
InvokeHelper(0x4 DISPATCH_PROPERTYGET VT_I2 (void*)&result NULL);
return result;
}

void CMSComm::SetCTSHolding(BOOL bNewValue)
{
static BYTE parms[] =
VTS_BOOL;
InvokeHelper(0x5 DISPATCH_PROPERTYPUT VT_EMPTY NULL parms
 bNewValue);
}

BOOL CMSComm::GetCTSHolding()
{
BOOL result;
InvokeHelper(0x5 DISPATCH_PROPERTYGET VT_BOOL (void*)&result NULL);
return result;
}

void CMSComm::SetDSRHolding(BOOL bNewValue)
{
static BYTE parms[] =
VTS_BOOL;
InvokeHelper(0x7 DISPATCH_PROPERTYPUT VT_EMPTY NULL parms
 bNewValue);
}

BOOL CMSComm::GetDSRHolding()
{
BOOL result;
InvokeHelper(0x7 DISPATCH_PROPERTYGET VT_BOOL (void*)&result NULL);
return result;
}

void CMSComm::SetDTREnable(BOOL bNewValue)
{
static BYTE parms[] =
VTS_BOOL;
InvokeHelper(0x9 DISPATCH_PROPERTYPUT VT_EMPTY NULL parms
 bNewValue);
}

BOOL CMSComm::GetDTREnable()
{
BOOL result;
InvokeHelper(0x9 DISPATCH_PROPERTYGET VT_BOOL (void*)&result NULL);
return result;
}

void CMSComm::SetHandshaking(long nNewValue)
{
static BYTE parms[] =
VTS_I4;
InvokeHelper(0xa DISPATCH_PROPERTYPUT VT_EMPTY NULL parms
 nNewValue);
}

long CMSComm::GetHandshaking()
{
long result;
InvokeHelper(0xa DISPATCH_PROPERTYGET VT_I4 (void*)&result NULL);
return result;
}

void CMSComm::SetInBufferSize(short nNewValue)
{
static BYTE parms[] =
VTS_I2;
InvokeHelper(0xb DISPATCH_PROPERTYPUT VT_EMPTY NULL parms
 nNewValue);
}

short CMSComm::Ge

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      48644  2010-05-09 10:52  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信Debugmscomm.obj

     文件     127157  2010-05-19 17:11  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信Debugplc.exe

     文件     268828  2010-05-19 17:11  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信Debugplc.ilk

     文件      17312  2010-05-09 10:52  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信Debugplc.obj

     文件    5502968  2010-05-09 10:52  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信Debugplc.pch

     文件     418816  2010-05-19 17:11  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信Debugplc.pdb

     文件       4540  2010-05-13 10:53  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信Debugplc.res

     文件      61335  2010-05-19 17:11  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信DebugplcDlg.obj

     文件     106477  2010-05-09 10:52  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信DebugStdAfx.obj

     文件     205824  2010-05-20 10:14  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信Debugvc60.idb

     文件     364544  2010-05-19 17:11  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信Debugvc60.pdb

     文件       8569  2008-03-01 22:30  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信mscomm.cpp

     文件       3221  2008-03-01 22:30  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信mscomm.h

     文件      40112  2010-05-10 17:44  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信plc.aps

     文件       3173  2010-05-20 10:11  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信plc.clw

     文件       2021  2008-03-01 22:29  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信plc.cpp

     文件       4524  2008-03-01 22:33  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信plc.dsp

     文件        573  2008-03-01 22:33  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信plc.dsw

     文件       1291  2008-03-01 22:29  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信plc.h

     文件     115712  2010-05-20 10:16  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信plc.ncb

     文件      54784  2010-05-20 10:16  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信plc.opt

     文件        240  2010-05-20 10:14  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信plc.plg

     文件       9770  2010-05-10 17:44  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信plc.rc

     文件      13841  2010-05-19 17:11  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信plcDlg.cpp

     文件       2009  2008-03-03 22:50  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信plcDlg.h

     文件       3525  2008-03-01 22:29  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信ReadMe.txt

     文件       1078  2008-03-01 22:29  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信
esplc.ico

     文件        395  2008-03-01 22:29  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信
esplc.rc2

     文件       2337  2010-05-10 17:43  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信
esource.h

     文件        205  2008-03-01 22:29  s72006.2.3.1  利用Visual C++实现PC与西门子S7-200 PLC串口通信StdAfx.cpp

............此处省略9个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)