Advanced programming


Use the driver for the Iso-on-TCP protocol (RFC 1006 ) to communicate with Simatic controllers 

The structure in the application tree is always as follows:

  1. S7TCPService . This is the root node under which you can create several PLC connections.
  2. S7TCPSession . This is the PLC connection. A session is required for each PLC.
  3. S7TCPSubscr . A subscription is a grouping of related PLC variables. In a subscription you define the update rate in ms (poll cycle) and the PLC addresses that are to be read or written.

 

Drag and drop the relevant classes into the application tree.




FieldDescription
DatatypeSelection of the data type of the used .NET variable
RefreshrateFrequency of PLC updates (in time units or event-based)
OPC-Address<Range><.Datatype><.Start address>
Standard structure of the address syntax.

<Range><.Datatype><.Start address><.Bit number>
For Boolean values, the bit number is also required.

<Range><.Datatype><.Start address><.String length>
For strings the string length is also required.

 Range Syntax
 data block DB
 flag* M
 flag byte* MB
 flag word* MW
 flag double word* MD
 input bit* E, I
 input byte* EB, IB
 input word* EW, IW
 input double word* ED, ID
 output bit* A, O
 output byte* AB, OB
 output word* AW, OW
 output double word* AD, OD
 timer* T
 counter* Z, C
* Not yet fully tested

 Datatype Syntax
 BIT X
 BYTE B
 WORD W
 INT I
 REAL R
 STRING S


Start address
The start address determines the address from which the read/write operation starts.

Bit number
The bit number is always required for Boolean data types.