mirror of
https://github.com/S7NetPlus/s7netplus.git
synced 2025-12-17 17:06:50 +08:00
Updated Home (markdown)
34
Home.md
34
Home.md
@@ -312,36 +312,4 @@ plc.Write("DB1.DBD40", val.ConvertToUInt());
|
|||||||
• Read bool from byte
|
• Read bool from byte
|
||||||
byte myByte = 5; // 0000 0101
|
byte myByte = 5; // 0000 0101
|
||||||
myByte.SelectBit(0) // true
|
myByte.SelectBit(0) // true
|
||||||
myByte.SelectBit(1) // false
|
myByte.SelectBit(1) // false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
This is taken directly from Snap7 documentation: http://snap7.sourceforge.net/
|
|
||||||
|
|
||||||
## S7 1200/1500 Notes
|
|
||||||
|
|
||||||
An external equipment can access to S71200/1500 CPU using the S7 “base” protocol, only working as an HMI, i.e. only basic data transfer are allowed.
|
|
||||||
All other PG operations (control/directory/etc..) must follow the extended protocol, not (yet) covered by Snap7.
|
|
||||||
Particularly to access a DB in S71500 some additional setting plc-side are needed.
|
|
||||||
|
|
||||||
1. Only global DBs can be accessed.
|
|
||||||
2. The optimized block access must be turned off.
|
|
||||||
3. The access level must be “full” and the “connection mechanism” must allow GET/PUT.
|
|
||||||
|
|
||||||
Let’s see these settings in TIA Portal V12
|
|
||||||
DB property
|
|
||||||
Select the DB in the left pane under “Program blocks” and press Alt-Enter (or in the contextual menu select “Properties…”)
|
|
||||||
Uncheck Optimized block access, by default it’s checked.
|
|
||||||

|
|
||||||
|
|
||||||
## Protection
|
|
||||||
|
|
||||||
Select the CPU project in the left pane and press Alt-Enter (or in the contextual menu select “Properties…”)
|
|
||||||
In the item Protection, select “Full access” and Check “Permit access with PUT/GET ….” as in figure.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user