mirror of
https://github.com/S7NetPlus/s7netplus.git
synced 2025-12-17 17:06:50 +08:00
Updated Home (markdown)
8
Home.md
8
Home.md
@@ -203,7 +203,7 @@ Define a DataBlock in the plc like:
|
||||
|
||||
Then add a struct into your .Net application that is similiar to the DB in the plc:
|
||||
|
||||
`public struct testStruct
|
||||
public struct testStruct
|
||||
{
|
||||
public bool varBool0;
|
||||
public bool varBool1;
|
||||
@@ -212,19 +212,15 @@ Then add a struct into your .Net application that is similiar to the DB in the p
|
||||
public bool varBool4;
|
||||
public bool varBool5;
|
||||
public bool varBool6;
|
||||
|
||||
public byte varByte0;
|
||||
public byte varByte1;
|
||||
|
||||
public ushort varWord0;
|
||||
|
||||
public double varReal0;
|
||||
public bool varBool7;
|
||||
public double varReal1;
|
||||
|
||||
public byte varByte2;
|
||||
public UInt32 varDWord;
|
||||
}`
|
||||
}
|
||||
|
||||
then you add the code to read or write the complete struct
|
||||
// reads a struct from DataBlock 1
|
||||
|
||||
Reference in New Issue
Block a user