Skip to content

3.3.0

Choose a tag to compare

@gijzelaerr gijzelaerr released this 20 Oct 09:51
· 8 commits to master since this release
aa6befd

New features

  • Add the typed DB accessors (db_read_int, db_write_real, db_read_string, ...,
    db_read_array/db_write_array) and the tag helpers (read_tag, write_tag,
    read_tags) to AsyncClient, matching the synchronous Client, as well as
    is_alive, connect_routed, and read_diagnostic_buffer. (#922)

Bug fixes

  • get_string and get_wstring now raise ValueError when the buffer is shorter than the declared current length,
    instead of silently returning a truncated value (#945).
  • USERDATA responses whose last-data-unit byte is neither 0x00 nor 0x01 are rejected with S7ProtocolError
    instead of being treated as "more data" (#946).
  • get_wstring compared the declared maximum in bytes with the 16382-character limit, so any WSTRING with a
    capacity of 8192 characters or more was rejected, including ones written by set_wstring (#923).
  • The get-block-info request now places the trailing A after the block number, as native Snap7 does
    ('0' type '00001' 'A'), instead of before it. The bundled server parses the new layout (#929).
  • set_plc_datetime encoded the weekday as Monday=1, but S7 DATE_AND_TIME counts Sunday=1 .. Saturday=7, so every
    day was off by one position. The bundled server's clock reply uses the same convention now (#932).
  • set_plc_datetime now raises ValueError for years outside 1990-2089 instead of silently sending a different
    year, since the two-digit S7 year cannot represent them (#933).
  • parse_get_clock_response now accepts the ten-byte S7 clock reply (reserved, century, then the time with milliseconds)
    that native Snap7 and PLCs send, and still accepts the legacy eight-byte form. The bundled server emits the
    ten-byte form (#934).
  • parse_response now fails on any nonzero S7 header error word, as native Snap7 does, instead of only when the error
    class is nonzero. Read and upload responses with error class 0 and a nonzero error code were previously treated as
    successes while the write path rejected them (#930).
  • parse_list_blocks_response now requires exactly the seven four-byte block-type entries (28 bytes) that native Snap7
    expects, with distinct, known type codes. Empty or partial tables and duplicate entries are rejected instead of being
    reported as zero block counts (#939).
  • set_plc_datetime and the session-password calls now accept the null acknowledgement (return code 0x0A, no data) that
    real PLCs send for services that return no data, instead of failing with "Object does not exist". The bundled
    server acknowledges these services the same way (#940).
  • Compress now uses the PI service _GARB and copy RAM to ROM uses file system EP with _MODU, matching real
    engineering tools and native Snap7, instead of the invented _MSZL. The bundled server recognises the new
    requests (#941).
  • Read-SZL requests now carry the 0xFF/octet-string data header and continuation requests the 12-byte parameter
    block (method 0x12) that real engineering tools send; both previously used the header of a request without data
    and an 8-byte parameter block (#942).
  • get_order_code no longer keeps the trailing space padding of the order code on S7-1200/1500 CPUs, for example
    6ES7 212-1BE40-0XB0 is now 6ES7 212-1BE40-0XB0 (#949).

Documentation

  • Add a "Tested and Verified Hardware" section to the PLC support matrix, listing the CPUs, firmware versions and
    python-snap7 versions the real-PLC acceptance suite has passed on (S7-1200 CPU 1212C V4.7.3, S7-1500 CPU 1511F-1 PN
    V2.9.7). (#947)