pyads
pyads copied to clipboard
read_write()
i am using python 3.12 and pyads 3.4
when call read_write() function, there is an error 'int' has no attribute if size
the code as below:
read_data_type = pyads.PLCTYPE_USINT * self.getReadSize() write_data_type = lambda v: (pyads.PLCTYPE_USINT * len(self.cmd))(*v) self.result = bytearray(self.conn.read_write( self.ADSIGRP_SUMUP_READ, self.n_vars, read_data_type, self.cmd, write_data_type))
i print out the two variables read_data_type <class 'lib.gom_cx.c_ubyte_Array_260'> write data type <class 'lib.gom_cx.c_ubyte_Array_12'>
i debug into read_write() looks like it comes from this line.