Python Snap7
Python Snap7
Release 0.0rc0
1 Introduction 3
4 development 9
4.1 Github . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2 Test suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.3 Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
5 Client 11
6 Server 27
7 Partner 29
8 Logo 31
9 Util 35
Index 55
i
ii
python-snap7 Documentation, Release 0.0rc0
Contents:
Contents 1
python-snap7 Documentation, Release 0.0rc0
2 Contents
CHAPTER 1
Introduction
python-snap7 is a Python wrapper for the Snap7 library. Snap7 is an open source, 32/64 bit, multi-platform Ethernet
communication suite for interfacing natively with Siemens S7 PLCs.
Python-snap7 is developer for snap7 1.1.0 and Python 3.6+. It is tested on Windows (10 64 bit), OSX 10.15 and Linux,
but it may work on other operating systems. Python Versions <3.6 may work, but is not supported anymore.
The project development is centralized on github.
3
python-snap7 Documentation, Release 0.0rc0
4 Chapter 1. Introduction
CHAPTER 2
We advice you to install python-snap7 using a binary wheel. The binary wheels should work on Windows 64x, OS X
(intel) and Linux x64. python-snap7 is available on PyPI. You can install it by using pip:
5
python-snap7 Documentation, Release 0.0rc0
If you are running an unsupported platform you need to do a bit more work. This involves two steps. First, install the
snap7 library, followed by the installation of the python-snap7 package.
3.1 Snap7
3.1.1 Ubuntu
If you are using Ubuntu you can use the Ubuntu packages from our launchpad PPA. To install:
3.1.2 Windows
Download the zip file from the sourceforce page. Unzip the zip file, and copy
release\\Windows\\Win64\\snap7.dll somewhere in your system PATH, for example
%systemroot%\System32\. Alternatively you can copy the file somewhere on your file system and ad-
just the system PATH.
3.1.3 OSX
7
python-snap7 Documentation, Release 0.0rc0
Download the latest source from the sourceforce page and do a manual compile. Download the file and run:
For more information about or help with compilation please check out the documentation on the snap7 website.
3.2 Python-Snap7
Once snap7 is available in your library or system path, you can install it from the git repository or from a source tarball:
development
4.1 Github
We develop python-snap7 on github. If you have questions about python-snap7 please raise a question in the Q&A
discussion sessions. If you have a bug or feature request for python-snap7 please raise an issue in the issue tracker.
Even better is if you have a solution to problem! In that case you can make our live easier by following these steps:
• fork our repository on Github
• Add a tests that will fail because of the problem
• Fix the problem
• Run the test suite again
• Commit to your repository
• Issue a github pull request.
Also we try to be as much pep8 compatible as possible, where possible and reasonable.
python-snap7 comes with a test suite with close to 100% coverage. This test suite verifies that the code actually works
and makes development much easier. To run all tests please run from the source:
$ make test
Note that some tests require to run as root, since snap7 needs to bind on a privileged TCP port.
If the test complain about missing Python modules make sure the source directory is in your PYTHONPATH environ-
ment variable, or the python-snap7 module is installed.
9
python-snap7 Documentation, Release 0.0rc0
4.3 Credits
10 Chapter 4. development
CHAPTER 5
Client
Examples
Examples
11
python-snap7 Documentation, Release 0.0rc0
12 Chapter 5. Client
python-snap7 Documentation, Release 0.0rc0
Parameters
• db_number – number of DB to get.
• _buffer – buffer where the data read will be place.
• size – amount of bytes to be read.
Returns Snap7 code.
13
python-snap7 Documentation, Release 0.0rc0
Examples
Note: A whole block (including header and footer) must be available into the user buffer.
Parameters
• block_num – new block number.
• data – buffer where the data will be place.
Returns Snap7 code.
14 Chapter 5. Client
python-snap7 Documentation, Release 0.0rc0
Parameters
• _type – type of block.
• block_num – number of block to upload.
Returns Snap7 code.
15
python-snap7 Documentation, Release 0.0rc0
Parameters
16 Chapter 5. Client
python-snap7 Documentation, Release 0.0rc0
17
python-snap7 Documentation, Release 0.0rc0
Example
Note: Use it only for reading DBs, not Marks, Inputs, Outputs.
Parameters
• db_number – number of the DB to be read.
• start – byte index from where is start to read from.
• size – amount of bytes to be read.
Returns Buffer read.
Example
>>> buffer
bytearray(b'\x00\x00')
18 Chapter 5. Client
python-snap7 Documentation, Release 0.0rc0
Examples
>>> client.destroy()
640719840
19
python-snap7 Documentation, Release 0.0rc0
Parameters
• blocktype – specified block type.
• db_number – number of db to get information from.
Returns Structure of information from block.
Raises Snap7Exception – if the blocktype is not valid.
Examples
get_connected() → bool
Returns the connection status
get_cp_info() → snap7.types.S7CpInfo
Returns some information about the CP (communication processor).
Returns Structure object containing the CP information.
get_cpu_info() → snap7.types.S7CpuInfo
Returns some information about the AG.
Returns data structure with the information.
Return type S7CpuInfo
Examples
20 Chapter 5. Client
python-snap7 Documentation, Release 0.0rc0
get_cpu_state() → str
Returns the CPU status (running/stopped)
Returns Description of the cpu state.
Raises Snap7Exception – if the cpu state is invalid.
Examples
>>> client.get_cpu_statE()
'S7CpuStatusRun'
get_exec_time() → int
Returns the last job execution time in milliseconds.
Returns Execution time value.
get_last_error() → int
Returns the last job result.
Returns Returns the last error value.
get_order_code() → snap7.types.S7OrderCode
Returns the CPU order code.
Returns Order of the code in a structure object.
get_param(number: int) → int
Reads an internal Server parameter.
Parameters number – number of argument to be read.
Returns Value of the param read.
get_pdu_length() → int
Returns info about the PDU length (requested and negotiated).
Returns PDU length.
Examples
>>> client.get_pdu_length()
480
21
python-snap7 Documentation, Release 0.0rc0
Examples
>>> client.get_plc_datetime()
datetime.datetime(2021, 4, 6, 12, 12, 36)
get_protection() → snap7.types.S7Protection
Gets the CPU protection level info.
Returns Structure object with protection attributes.
iso_exchange_buffer(data: bytearray) → bytearray
Exchanges a given S7 PDU (protocol data unit) with the CPU.
Parameters data – buffer to exchange.
Returns Snap7 code.
list_blocks() → snap7.types.BlocksList
Returns the AG blocks amount divided by type.
Returns Block list structure object.
Examples
22 Chapter 5. Client
python-snap7 Documentation, Release 0.0rc0
plc_cold_start() → int
Puts the CPU in RUN mode performing a COLD START.
Returns Error code from snap7 library.
plc_hot_start() → int
Puts the CPU in RUN mode performing an HOT START.
Returns Error code from snap7 library.
plc_stop() → int
Puts the CPU in STOP mode
Returns Error code from snap7 library.
read_area(area: snap7.types.Areas, dbnumber: int, start: int, size: int) → bytearray
Reads a data area from a PLC With it you can read DB, Inputs, Outputs, Merkers, Timers and Counters.
Parameters
• area – area to be read from.
• dbnumber – number of the db to be read from. In case of Inputs, Marks or Outputs, this
should be equal to 0.
• start – byte index to start reading.
• size – number of bytes to read.
Returns Buffer with the data read.
Raises ValueError – if the area is not defined in the Areas
Example
>>> buffer
bytearray(b'\x00\x00')
23
python-snap7 Documentation, Release 0.0rc0
Parameters
• address – PLC/Equipment IPV4 Address, for example “192.168.1.12”
• local_tsap – Local TSAP (PC TSAP)
• remote_tsap – Remote TSAP (PLC TSAP)
Raises
• ValueError – if the address is not a valid IPV4.
• Snap7Exception – if the result of setting the connection params is different than 0.
set_connection_type(connection_type: int)
Sets the connection resource type, i.e the way in which the Clients connects to a PLC.
Parameters connection_type – 1 for PG, 2 for OP, 3 to 10 for S7 Basic
Raises Snap7Exception – if the result of setting the connection type is different than 0.
set_plc_system_datetime() → int
Sets the PLC date/time with the host (PC) date/time.
Returns Snap7 code.
tm_read(start: int, amount: int) → bytearray
Reads timers from a PLC.
Parameters
• start – byte index from where is start to read from.
• amount – amount of byte to be read.
Returns Buffer read.
tm_write(start: int, amount: int, data: bytearray) → int
Write timers into a PLC.
Parameters
• start – byte index from where is start to write to.
• amount – amount of byte to be written.
• data – data to be write.
Returns Snap7 code.
upload(block_num: int) → bytearray
Uploads a block from AG.
24 Chapter 5. Client
python-snap7 Documentation, Release 0.0rc0
25
python-snap7 Documentation, Release 0.0rc0
26 Chapter 5. Client
CHAPTER 6
Server
create()
Create the server.
destroy()
Destroy the server.
event_text(event: snap7.types.SrvEvent) → str
Returns a textual explanation of a given event object
Parameters event – an PSrvEvent struct object
Returns The error string
get_mask(kind: int) → ctypes.c_uint
Reads the specified filter mask.
Parameters kind –
Returns Mask
get_param(number) → int
Reads an internal Server object parameter.
Parameters number – number of the parameter to be set.
Returns Value of the parameter.
get_status() → Tuple[str, str, int]
27
python-snap7 Documentation, Release 0.0rc0
Reads the server status, the Virtual CPU status and the number of the clients connected.
pick_event() → Optional[snap7.types.SrvEvent]
Extracts an event (if available) from the Events queue.
Returns Server event.
snap7.server.error_wrap(func)
Parses a s7 error code returned the decorated function.
snap7.server.mainloop(tcpport: int = 1102, init_standard_values: bool = False)
Init a fake Snap7 server with some default values.
Parameters
• tcpport – port that the server will listen.
• init_standard_values – if True will init some defaults values to be read on DB0.
28 Chapter 6. Server
CHAPTER 7
Partner
29
python-snap7 Documentation, Release 0.0rc0
get_last_error() → ctypes.c_int
Returns the last job result.
get_param(number) → int
Reads an internal Partner object parameter.
get_stats() → Tuple[ctypes.c_uint, ctypes.c_uint, ctypes.c_uint, ctypes.c_uint]
Returns some statistics.
Returns a tuple containing bytes send, received, send errors, recv errors
get_status() → ctypes.c_int
Returns the Partner status.
get_times() → Tuple[ctypes.c_int, ctypes.c_int]
Returns the last send and recv jobs execution time in milliseconds.
set_recv_callback() → int
Sets the user callback that the Partner object has to call when a data packet is incoming.
set_send_callback() → int
Sets the user callback that the Partner object has to call when the asynchronous data sent is complete.
stop() → int
Stops the Partner, disconnects gracefully the remote partner.
snap7.partner.error_wrap(func)
Parses a s7 error code returned the decorated function.
30 Chapter 7. Partner
CHAPTER 8
Logo
class snap7.logo.Logo
A snap7 Siemens Logo client: There are two main comfort functions available Logo.read() and Logo.
write(). This functions realize a high level access to the VM addresses of the Siemens Logo just use the
form:
Notes
V10.3 for bit values V10 for the complete byte VW12 for a word (used for analog values) For more information
see examples for Siemens Logo 7 and 8
__init__()
Creates a new instance of Logo
connect(ip_address: str, tsap_snap7: int, tsap_logo: int, tcpport: int = 102) → int
Connect to a Siemens LOGO server.
Notes
31
python-snap7 Documentation, Release 0.0rc0
Parameters
• db_number – for Logo only DB=1
• start – start address for Logo7 0..951 / Logo8 0..1469
• size – in bytes
Returns Array of bytes
db_write(db_number: int, start: int, data: bytearray) → int
Writes to a DB object.
Parameters
• db_number – for Logo only DB=1
• start – start address for Logo7 0..951 / Logo8 0..1469
• data – bytearray
Returns Error code from snap7 library.
destroy() → int
Destroy a client.
Returns Error code from snap7 library.
disconnect() → int
Disconnect a client.
Returns Error code from snap7 library.
get_connected() → bool
Returns the connection status
Notes
This function has a bug, that returns True when the connection is lost. This comes from the original
snap7 library.
get_param(number) → int
Reads an internal Logo object parameter.
Parameters number – Parameter type number
Returns Parameter value
read(vm_address: str)
Reads from VM addresses of Siemens Logo. Examples: read(“V40”) / read(“VW64”) / read(“V10.2”)
Parameters vm_address – of Logo memory (e.g. V30.1, VW32, V24)
Returns integer
set_connection_params(ip_address: str, tsap_snap7: int, tsap_logo: int)
Sets internally (IP, LocalTSAP, RemoteTSAP) Coordinates.
32 Chapter 8. Logo
python-snap7 Documentation, Release 0.0rc0
Notes
Examples
33
python-snap7 Documentation, Release 0.0rc0
34 Chapter 8. Logo
CHAPTER 9
Util
This module contains utility functions for working with PLC DB objects. There are functions to work with the raw
bytearray data snap7 functions return In order to work with this data you need to make python able to work with the
PLC bytearray data.
For example code see test_util.py and example.py in the example folder.
example:
spec/DB layout
client = snap7.client.Client()
client.connect('192.168.200.24', 0, 3)
# this looks confusing but this means uploading from the PLC to YOU
# so downloading in the PC world :)
all_data = client.upload(db_number)
35
python-snap7 Documentation, Release 0.0rc0
db1 = snap7.util.DB(
db_number, # the db we use
all_data, # bytearray from the plc
layout, # layout specification DB variable data
# A DB specification is the specification of a
# DB object in the PLC you can find it using
# the dataview option on a DB object in PCS7
To test of you layout matches the data from the plc you can
just print db1[0] or db['test'] in the example
db1['test']['testbool1'] = 0
db1[0]['testbool1']
to read and write a single Row from the plc. takes like 5ms!
db1['test'].write()
db1['test'].read(client)
class snap7.util.DB(db_number: int, bytearray_: bytearray, specification: str, row_size: int, size: int,
id_field: Optional[str] = None, db_offset: Optional[int] = 0, layout_offset: Op-
tional[int] = 0, row_offset: Optional[int] = 0, area: Optional[snap7.types.Areas]
= <Areas.DB: 132>)
Manage a DB bytearray block given a specification of the Layout.
It is possible to have many repetitive instances of a specification this is called a “row”.
Probably most usecases there is just one row
bytearray_
buffer data from the PLC.
specification
36 Chapter 9. Util
python-snap7 Documentation, Release 0.0rc0
Examples
__init__(db_number: int, bytearray_: bytearray, specification: str, row_size: int, size: int, id_field:
Optional[str] = None, db_offset: Optional[int] = 0, layout_offset: Optional[int] = 0,
row_offset: Optional[int] = 0, area: Optional[snap7.types.Areas] = <Areas.DB: 132>)
Creates a new instance of the Row class.
Parameters
• db_number – number of the DB to read from. This value should be 0 if area!=Areas.DB.
• bytearray – initial buffer read from the PLC.
• specification – layout of the PLC memory.
• row_size – bytes size of a db row.
• size – lenght of the memory area.
• id_field – name to reference the row. Optional.
• db_offset – at which byte in the db starts reading.
• layout_offset – at which byte in the row specificaion we start reading the data.
• row_offset – offset between rows.
• area – which memory area this row is representing.
make_rows()
Make each row for the DB.
set_data(bytearray_: bytearray)
Set the new buffer data from the PLC to the current instance.
Parameters bytearray – buffer to save.
Raises TypeError – if bytearray_ is not an instance of bytearray
class snap7.util.DB_Row(bytearray_: bytearray, _specification: str, row_size: Optional[int] = 0,
db_offset: int = 0, layout_offset: int = 0, row_offset: Optional[int] = 0,
area: Optional[snap7.types.Areas] = <Areas.DB: 132>)
Provide ROW API for DB bytearray
bytearray_
reference to the data of the parent DB.
_specification
row specification layout.
37
python-snap7 Documentation, Release 0.0rc0
__getitem__(key)
Get a specific db field
__init__(bytearray_: bytearray, _specification: str, row_size: Optional[int] = 0, db_offset: int = 0,
layout_offset: int = 0, row_offset: Optional[int] = 0, area: Optional[snap7.types.Areas] =
<Areas.DB: 132>)
Creates a new instance of the DB_Row class.
Parameters
• bytearray – reference to the data of the parent DB.
• _specification – row specification layout.
• row_size – Amount of bytes of the row.
• db_offset – at which byte in the db starts reading.
• layout_offset – at which byte in the row specificaion we start reading the data.
• row_offset – offset between rows.
• area – which memory area this row is representing.
Raises TypeError – if bytearray_ is not an instance of bytearray or DB.
export() → Dict[str, Union[str, int, float, bool, datetime.datetime]]
Export dictionary with values
Returns dictionary containing the values of each value of the row.
get_bytearray() → bytearray
Gets bytearray from self or DB parent
Returns Buffer data corresponding to the row.
get_offset(byte_index: Union[str, int]) → int
Calculate correct beginning position for a row the db_offset = row_size * index
get_value(byte_index: Union[str, int], type_: str) → Union[ValueError, int, float, str, date-
time.datetime]
Gets the value for a specific type.
Parameters
• byte_index – byte index from where start reading.
• type – type of data to read.
Raises
• Snap7Exception – if reading a string when checking the lenght of the string.
• ValueError – if the type_ is not handled.
Returns Value read according to the type_
read(client: snap7.client.Client) → None
Read current data of db row from plc.
Parameters client – Client snap7 instance.
Raises
38 Chapter 9. Util
python-snap7 Documentation, Release 0.0rc0
Examples
39
python-snap7 Documentation, Release 0.0rc0
Notes
WORD 8bit 1bytes Decimal number unsigned B#(0) to B#(255) => 0 to 255
Parameters
• bytearray – buffer to be read from.
• byte_index – byte index to be read.
Returns value get from the byte index.
snap7.util.get_date_time_object(bytearray_: bytearray, byte_index: int) → datetime.datetime
Get DATE_AND_TIME Value from bytearray as python datetime object .. rubric:: Notes
Datatype DATE_AND_TIME consists in 8 bytes in the PLC.
Parameters
• bytearray – buffer to read.
• byte_index – byte index from where to start writing.
Examples
Notes
Datatype dint consists in 4 bytes in the PLC. Maximum possible value is 2147483647. Lower posible value is
-2147483648.
Parameters
• bytearray – buffer to read.
• byte_index – byte index from where to start reading.
Returns Value read.
Examples
40 Chapter 9. Util
python-snap7 Documentation, Release 0.0rc0
Parameters
• bytearray – buffer to read.
• byte_index – byte index from where to start writing.
Examples
Notes
Datatype dword consists in 8 bytes in the PLC. The maximum value posible is 4294967295
Parameters
• bytearray – buffer to read.
• byte_index – byte index from where to start reading.
Returns Value read.
Examples
Notes
Examples
41
python-snap7 Documentation, Release 0.0rc0
Notes
Datatype real is represented in 4 bytes in the PLC. The packed representation uses the IEEE 754 binary32.
Parameters
• bytearray – buffer to read from.
• byte_index – byte index to reading from.
Returns Real value.
Examples
Notes
Datatype sint (Small int) consists in 1 byte in the PLC. Maximum value posible is 127. Lowest value posible is
-128.
Parameters
• bytearray – buffer to read from.
• byte_index – byte index from where to start reading.
Returns Value read.
Examples
Notes
The first byte of the buffer will contain the max size posible for a string. The second byte contains the length of
the string that contains.
Parameters
• bytearray – buffer from where to get the string.
• byte_index – byte index from where to start reading.
42 Chapter 9. Util
python-snap7 Documentation, Release 0.0rc0
Examples
Notes
Examples
Notes
Datatype udint consists in 4 bytes in the PLC. Maximum possible value is 4294967295. Minimum posible value
is 0.
Parameters
• bytearray – buffer to read.
• byte_index – byte index from where to start reading.
Returns Value read.
43
python-snap7 Documentation, Release 0.0rc0
Examples
Notes
Datatype uint in the PLC is represented in two bytes Maximum posible value is 65535. Lower posible value is
0.
Parameters
• bytearray – buffer to read from.
• byte_index – byte index to start reading from.
Returns Value read.
Examples
Notes
Datatype usint (Unsigned small int) consists on 1 byte in the PLC. Maximum posible value is 255. Lower
posible value is 0.
Parameters
• bytearray – buffer to read from.
• byte_index – byte index from where to start reading.
Returns Value read.
Examples
44 Chapter 9. Util
python-snap7 Documentation, Release 0.0rc0
Notes
WORD 16bit 2bytes Decimal number unsigned B#(0,0) to B#(255,255) => 0 to 65535
Parameters
• bytearray – buffer to get the word from.
• byte_index – byte index from where start reading from.
Returns Word value.
Examples
Parameters db_specification – string formatted table with the indexes, aliases and types.
Returns Parsed DB specification.
Examples
45
python-snap7 Documentation, Release 0.0rc0
Examples
Notes
Datatype dint consists in 4 bytes in the PLC. Maximum possible value is 2147483647. Lower posible value is
-2147483648.
Parameters
• bytearray – buffer to write.
• byte_index – byte index from where to start writing.
Examples
Notes
Datatype dword consists in 8 bytes in the PLC. The maximum value posible is 4294967295
Parameters
• bytearray – buffer to write to.
• byte_index – byte index from where to writing reading.
• dword – value to write.
Examples
46 Chapter 9. Util
python-snap7 Documentation, Release 0.0rc0
Notes
Examples
Notes
Datatype real is represented in 4 bytes in the PLC. The packed representation uses the IEEE 754 binary32.
Parameters
• bytearray – buffer to write to.
• byte_index – byte index to start writing from.
• real – value to be written.
Returns Buffer with the value written.
Examples
Notes
Datatype sint (Small int) consists in 1 byte in the PLC. Maximum value posible is 127. Lowest value posible is
-128.
Parameters bytearray – buffer to write to.
byte_index: byte index from where to start writing. _int: value to write.
Returns Buffer with the written value.
47
python-snap7 Documentation, Release 0.0rc0
Examples
Examples
Notes
Examples
>>> data
bytearray(b'Ú¯')
48 Chapter 9. Util
python-snap7 Documentation, Release 0.0rc0
Notes
Datatype dint consists in 4 bytes in the PLC. Maximum possible value is 4294967295. Minimum posible value
is 0.
Parameters
• bytearray – buffer to write.
• byte_index – byte index from where to start writing.
Examples
Notes
Examples
Notes
Datatype usint (Unsigned small int) consists on 1 byte in the PLC. Maximum posible value is 255. Lower
posible value is 0.
Parameters bytearray – buffer to write.
byte_index: byte index from where to start writing. _int: value to write.
49
python-snap7 Documentation, Release 0.0rc0
Examples
Notes
50 Chapter 9. Util
CHAPTER 10
• genindex
• modindex
• search
51
python-snap7 Documentation, Release 0.0rc0
s
snap7.client, 11
snap7.partner, 29
snap7.server, 27
snap7.util, 35
53
python-snap7 Documentation, Release 0.0rc0
55
python-snap7 Documentation, Release 0.0rc0
F L
full_upload() (snap7.client.Client method), 19 layout_offset (snap7.util.DB attribute), 37
list_blocks() (snap7.client.Client method), 22
G list_blocks_of_type() (snap7.client.Client
get_block_info() (snap7.client.Client method), 19 method), 22
get_bool() (in module snap7.util), 39 Logo (class in snap7.logo), 31
get_byte() (in module snap7.util), 39
get_bytearray() (snap7.util.DB_Row method), 38 M
get_connected() (snap7.client.Client method), 20 mainloop() (in module snap7.server), 28
get_connected() (snap7.logo.Logo method), 32 make_rows() (snap7.util.DB method), 37
get_cp_info() (snap7.client.Client method), 20 mb_read() (snap7.client.Client method), 22
get_cpu_info() (snap7.client.Client method), 20 mb_write() (snap7.client.Client method), 22
get_cpu_state() (snap7.client.Client method), 21
get_date_time_object() (in module snap7.util), P
40 parse_specification() (in module snap7.util), 45
get_dint() (in module snap7.util), 40 Partner (class in snap7.partner), 29
get_dt() (in module snap7.util), 40 pick_event() (snap7.server.Server method), 28
get_dword() (in module snap7.util), 41 plc_cold_start() (snap7.client.Client method), 22
get_exec_time() (snap7.client.Client method), 21 plc_hot_start() (snap7.client.Client method), 23
get_int() (in module snap7.util), 41 plc_stop() (snap7.client.Client method), 23
get_last_error() (snap7.client.Client method), 21
get_last_error() (snap7.partner.Partner method), R
30
read() (snap7.logo.Logo method), 32
get_mask() (snap7.server.Server method), 27
read() (snap7.util.DB_Row method), 38
get_offset() (snap7.util.DB_Row method), 38
read_area() (snap7.client.Client method), 23
get_order_code() (snap7.client.Client method), 21
read_multi_vars() (snap7.client.Client method),
get_param() (snap7.client.Client method), 21
23
get_param() (snap7.logo.Logo method), 32
read_szl() (snap7.client.Client method), 23
get_param() (snap7.partner.Partner method), 30
read_szl_list() (snap7.client.Client method), 23
get_param() (snap7.server.Server method), 27
row_size (snap7.util.DB attribute), 37
get_pdu_length() (snap7.client.Client method), 21
get_pg_block_info() (snap7.client.Client
method), 21
S
get_plc_datetime() (snap7.client.Client method), Server (class in snap7.server), 27
21 set_bool() (in module snap7.util), 45
get_protection() (snap7.client.Client method), 22 set_byte() (in module snap7.util), 45
get_real() (in module snap7.util), 41 set_connection_params() (snap7.client.Client
get_sint() (in module snap7.util), 42 method), 24
get_stats() (snap7.partner.Partner method), 30 set_connection_params() (snap7.logo.Logo
get_status() (snap7.partner.Partner method), 30 method), 32
get_status() (snap7.server.Server method), 27
56 Index
python-snap7 Documentation, Release 0.0rc0
set_connection_type() (snap7.client.Client
method), 24
set_connection_type() (snap7.logo.Logo
method), 33
set_data() (snap7.util.DB method), 37
set_dint() (in module snap7.util), 46
set_dword() (in module snap7.util), 46
set_int() (in module snap7.util), 46
set_param() (snap7.logo.Logo method), 33
set_plc_system_datetime()
(snap7.client.Client method), 24
set_real() (in module snap7.util), 47
set_recv_callback() (snap7.partner.Partner
method), 30
set_send_callback() (snap7.partner.Partner
method), 30
set_sint() (in module snap7.util), 47
set_string() (in module snap7.util), 48
set_time() (in module snap7.util), 48
set_udint() (in module snap7.util), 48
set_uint() (in module snap7.util), 49
set_usint() (in module snap7.util), 49
set_value() (snap7.util.DB_Row method), 39
set_word() (in module snap7.util), 50
snap7.client (module), 11
snap7.partner (module), 29
snap7.server (module), 27
snap7.util (module), 35
specification (snap7.util.DB attribute), 36
stop() (snap7.partner.Partner method), 30
T
tm_read() (snap7.client.Client method), 24
tm_write() (snap7.client.Client method), 24
U
unchanged() (snap7.util.DB_Row method), 39
upload() (snap7.client.Client method), 24
utc2local() (in module snap7.util), 50
W
wait_as_completion() (snap7.client.Client
method), 25
write() (snap7.logo.Logo method), 33
write() (snap7.util.DB_Row method), 39
write_multi_vars() (snap7.client.Client method),
25
Index 57