ottowayi / pycomm3

A Python Ethernet/IP library for communicating with Allen-Bradley PLCs.
MIT License
406 stars 88 forks source link

[BUG] - get_tag_info throws 'get_tag_info' when tag name is Program:... #216

Closed ronytesler closed 2 years ago

ronytesler commented 2 years ago

Pre-checks

Description A clear and concise description of what the bug is. I run this code:

plc = LogixDriver(path='192.169.1.2\1')
plc.open()
plc.get_tag_list(program='*')
plc.get_tag_info('Program:P01_Flash._1ms_Flash')

data_type: 'BOOL' tag_type: 'atomic'

The get_tag_info function has this code: base, *attrs = tag_name.split(".") This changes the full name that appears in the 'self._tags' variable and then it can't be found there in this line: data = self._tags[util.strip_array(base)] (inside _get_tag_info).

Target PLC Allen-Bradley, Rockwell Automation 1758-PA72 C

ottowayi commented 2 years ago

Thanks for reporting, I just published 1.2.7 with the fix.