SuperCom S7 Protocol Library
Control S7 PLC with S7 protocol and ISO-on-TCP
SuperCom S7 Protocol Library
The SuperCom S7 Protocol Library includes functions to exchange data with a S7 PLC. The protocol used is referred as ISO-on-TCP (RFC 1006) and the connection to the PLC is established using the TCP/IP protocol.
The application is using the high-level functions of the SuperCom S7 Protocol Library for a flexible and speed optimized data exchange with Data Blocks, Marker/Flags, Inputs, Outputs, Counters, Timer, Memory areas, etc.
Despite the professional orientation of the SuperCom S7 Protocol Library it is really easy to use and accompanied by many samples.
Exchanging data (Reading or Writing) are whenever possible handled internally as one request. This approach enables the SuperCom S7 Protocol Library to optimize speed and network traffic by treating requests for different plc areas as one so called "mixed request" (one request send to the plc and one reply back).
Accomplish with ease
In most cases only a handful functions are needed to talk to the PLC. Your project is updated real fast. A lot of functions is backing you up to accomplish different tasks or configurations.
- Reliable data transfer
- Fast data transfer
- Control up to 255 connections / PLC concurrently
- Receive events and progress information while data exchanged
The SuperCom S7 Protocol Library uses the SuperCom TCP/IP communication layer which provides a rock solid foundation to develop data communication software fast. The special "packetizing" technique and the data transfer technology used really increase speed and data throughput and reduce network traffic.
Samples:
1. Read input bits
C/C++
// Fetch 3 input bits e.g. I1.0 to I1.2
BYTE cBuffer[3]; // 3 bits returned as 3 bytes
DWORD dwAmount = 3; // bits requested = 0, 1, 2
DWORD dwAddress = BitAddress(1, 0); // from Bit-Address
long nRet = RS_S7Fetch(Com,
ORG_INPUT | ORG_REQ_IN_BITS,
dwAddress,
&dwAmount,
cBuffer);
Delphi
// Fetch 3 input bits e.g. I1.0 to I1.2
Var cBuffer:Array[0..2] Of Byte; // 3 bits returned as 3 bytes
dwAmount:DWORD = 3; // bits requested = 0, 1, 2
dwAddress:DWORD = BitAddress(1, 0); // from Bit-Address
nRet:LongInt;
nRet := RS_S7Fetch(Com,
ORG_INPUT OR ORG_REQ_IN_BITS,
dwAddress,
dwAmount,
cBuffer);
C#
// Fetch 3 input bits e.g. I1.0 to I1.2
byte[] cBuffer = new byte[3]; // 3 bits returned as 3 bytes
int dwAmount = 3; // bits requested = 0, 1, 2
int dwAddress = BitAddress(1, 0); // from Bit-Address
int nRet = SuperCom.S7ISOonTCP.RS_S7Fetch(Com,
ORG_INPUT | ORG_REQ_IN_BITS,
dwAddress,
ref dwAmount,
cBuffer);
Visual Basic
' Fetch 3 input bits e.g. I1.0 to I1.2
Dim cBuffer As String ' 3 bits returned as 3 bytes
dwAmount = 3 ' bits requested = 0, 1, 2
dwAddress = BitAddress(1, 0) ' from Bit-Address
nRet = RS_S7Fetch(Com,
ORG_INPUT OR ORG_REQ_IN_BITS,
dwAddress,
dwAmount,
cBuffer)
|
2. Read from Data Blocks
C/C++
// Fetch 2 WORDs from DB 10, starting at address 0
WORD wBuffer[2];
DWORD dwAddress = 0; // start from
DWORD dwAmount = 2 * sizeof(WORD); // 2*2 = 4 bytes
long nRet = RS_S7Fetch(Com,
RS_S7BLOCK_AREA_NR(ORG_DB, 10),
dwAddress,
&dwAmount,
wBuffer);
Delphi
// Fetch 2 WORDs from DB 10, starting at address 0
Var wBuffer:Array[0..1] Of WORD;
dwAddress:DWORD = 0; // start from
dwAmount:DWORD = 2 * SizeOf(WORD); // 2*2 = 4 bytes;
nRet := RS_S7Fetch(Com,
RS_S7BLOCK_AREA_NR(ORG_DB, 10),
dwAddress,
dwAmount,
wBuffer);
C#
// Fetch 2 WORDs from DB 10, starting at address 0
short[] wBuffer = new short[2];
int dwAddress = 0; // start from
int dwAmount = 2 * SizeOf(WORD); // 2*2 = 4 bytes;
int nRet = SuperCom.S7ISOonTCP.RS_S7Fetch(Com,
RS_S7BLOCK_AREA_NR(ORG_DB, 10),
dwAddress,
ref dwAmount,
wBuffer);
Visual Basic
// Fetch 2 WORDs from DB 10, starting at address 0
Dim wBuffer As String
dwAddress = 0 ' start from
dwAmount = 4 ' 2 WORD = 2*2=4 Bytes
nRet = RS_S7Fetch(Com,
RS_S7BLOCK_AREA_NR(ORG_DB, 10),
dwAddress,
dwAmount,
wBuffer)
|
License Information
Executables developed using SuperCom can be distributed royalty free.
Supported compilers
C#, C++, Delphi, Visual C++, Visual Basic, Visual Basic NET, C++ Builder, Borland C/C++, Microsoft C/C++, Borland Pascal, VBA, LabVIEW, PowerBuilder and other Windows programming tools (MS .NET ?).
Samples
for C/C++, C#, Delphi, Visual Basic 6, Visual Basic .NET included. Many small samples also listed in the manual. More..
How to use?
In order to use the SuperCom S7 Protocol Library a TCP/IP capable SuperCom library is also required e.g. combine with SuperCom for TCP/IP or SuperCom Suite. See also the following chart.
What to order?
Some possible combinations can be found here
S5 Protocol Suite
Protocols for S5 compatible data communication More...
|