S7.NET.DLL基于西门子GET/PUT封装了读取以及写数据功能,下面是不成熟的程序,基本可以将数据从PLC读出,也可将数据写入PLC,仅供参考,以下是原代码:
Option Explicit On
'Imports System.Collections.ge
'Imports System.Linq
Imports System.Text
'Imports System.Threading.tas
Imports S7.Net
Public Class Form1
Dim Rack As Short
Dim slot As Short
Dim IPAddress As String = “192.168.1.50”
Dim CPUTypes As String
'Dim PLC_Pallet = New Plc(CpuType.S7300, "192.168.1.1", Rack, slot)
Dim PLC_Pallet