QT与基恩士PLC采用上位链路通信实现
也可以称为tcp/ip通信。只不过需要和基恩士的通讯协议相匹配。
1.pro文件中添加:
QT += core gui serialport network
2. 头文件:
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTcpSocket>
#include <QTimer>
#include <QString>
#include<QPushButton>
#include<QLineEdit>
#include<QLabel>
#include <QVBoxLayout>
#include <QLabel>
#include <QPushButton>
#include <QLineEdit>
#include <QMessageBox>
#include <QHostAddress>
#include <iostream>
#if _MSC_VER >= 1600
#

1905

被折叠的 条评论
为什么被折叠?



