Navigation

  • index
  • modules |
  • next |
  • previous |
  • python-snap7 0.0rc0 documentation »
  • Logo

Logo¶

class snap7.logo.Logo(lib_location: str | None = None)[source]¶

A snap7 Siemens Logo client: There are two main comfort functions available Logo.read() and Logo.write(). This function offers 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

connect(ip_address: str, tsap_snap7: int, tsap_logo: int, tcp_port: int = 102) → Logo[source]¶

Connect to a Siemens LOGO server.

Notes

Howto setup Logo communication configuration see: https://snap7.sourceforge.net/logo.html

Parameters:
  • ip_address – IP ip_address of server

  • tsap_snap7 – TSAP SNAP7 Client (e.g. 10.00 = 0x1000)

  • tsap_logo – TSAP Logo Server (e.g. 20.00 = 0x2000)

  • tcp_port – TCP port of server

Returns:

The snap7 Logo instance

read(vm_address: str) → int[source]¶

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

write(vm_address: str, value: int) → int[source]¶

Writes to VM addresses of Siemens Logo.

Parameters:
  • vm_address – write offset

  • value – integer

Examples

>>> Logo().write("VW10", 200) or Logo().write("V10.3", 1)

Table of Contents

  • Logo
    • Logo
      • Logo.connect()
      • Logo.read()
      • Logo.write()

Previous topic

Partner

Next topic

Util

This Page

  • Show Source

Quick search

Navigation

  • index
  • modules |
  • next |
  • previous |
  • python-snap7 0.0rc0 documentation »
  • Logo
© Copyright 2013, Gijs Molenaar, Stephan Preeker. Created using Sphinx 7.3.7.