gijzelaerr / python-snap7

A Python wrapper for the snap7 PLC communication library
http://python-snap7.readthedocs.org/
MIT License
643 stars 246 forks source link

get_string NOT working as described in docs #445

Closed Picca-SNI closed 1 year ago

Picca-SNI commented 1 year ago

Trying to read a string from a S7-1500 PLC, documentation says util.get_string takes 3 arguments (bytearray, index, max_size) however, using the function like this does not work, because it only takes two arguments (bytearray, index)

terminal output: Ext_PO_number = get_string(dataBuffer, EXT_PO_NUM_START, EXT_PO_NUM_LEN) TypeError: get_string() takes 2 positional arguments but 3 were given Command exited with return code 1 ERROR - Task failed with exception

nikteliy commented 1 year ago

Hi @Picca-SNI Could you provide a link to the documentation with the error? According to the official documentation, the get_string() function only takes two arguments.

Picca-SNI commented 1 year ago

My bad ... apparently google sent me to the docs for version 1.0 ....