Custom datatype error #284
Unanswered
carlosesponda
asked this question in
Q&A
Replies: 1 comment 1 reply
-
interesting, it looks like the PLC is closing the connection when we try to read that data type definition. Is this reliably reproducible? Like does it happen every time with this PLC and the same data type? Does it happen on other PLCs with this same UDT? It's more likely a bug in my code, but I have seen some weird issues before with Logix. I had one case where compacting and re-downloading the program fixed a similar issue (except instead of closing the tcp connection it responded with an error saying it didn't exist). What platform and firmware are you on? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm having problems running pycomm 3 with some custom datatypes I use.
It contains 141 tags ( 71 BOOL, 1 DINT , 5 INT, 61 REAL AND 3 STRING) I don't know if there's a limit in size, but I was able to narrow down the error to this specific datatype.
This is the error I get every time I add one of those custom datatypes:
The above exception was the direct cause of the following exception:
XXX\cip_driver.py", line 583, in _receive
reply = self.sock.receive()
File "XXX\Python\Python310\lib\site-packages\pycomm3\socket.py", line 72, in receive
raise CommError("socket connection broken") from err
pycomm3.exceptions.CommError: socket connection broken
The above exception was the direct cause of the following exception:
XXX\logix_driver.py", line 724, in _read_template
response = self.generic_message(
File "XXX\Python\Python310\lib\site-packages\pycomm3\cip_driver.py", line 543, in generic_message
response = self.send(request)
File "XXX\Python\Python310\lib\site-packages\pycomm3\logix_driver.py", line 1387, in send
return super().send(request)
File "XXX\Python\Python310\lib\site-packages\pycomm3\cip_driver.py", line 566, in send
reply = None if request.no_response else self._receive()
File "XXX\Python\Python310\lib\site-packages\pycomm3\cip_driver.py", line 585, in _receive
raise CommError("failed to receive reply") from err
pycomm3.exceptions.CommError: failed to receive reply
The above exception was the direct cause of the following exception:
XXX\logix_driver.py", line 883, in _get_data_type
_data = self._read_template(instance_id, template["object_definition_size"])
File "XXX\Python\Python310\lib\site-packages\pycomm3\logix_driver.py", line 749, in _read_template
raise ResponseError("Failed to read template") from err
pycomm3.exceptions.ResponseError: Failed to read template
The above exception was the direct cause of the following exception:
XXX\logix_driver.py", line 631, in _isolate_user_tags
user_tags.append(self._create_tag(name, tag))
File "XXX\Python\Python310\lib\site-packages\pycomm3\logix_driver.py", line 659, in _create_tag
new_tag["data_type"] = self._get_data_type(template_instance_id, raw_tag["symbol_type"])
File "XXX\Python\Python310\lib\site-packages\pycomm3\logix_driver.py", line 889, in _get_data_type
raise ResponseError(
pycomm3.exceptions.ResponseError: Failed to get data type information for 3791
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "XXX", line 8, in
PLC.open() #opens connection to the PLC
File "XXX\Python\Python310\lib\site-packages\pycomm3\logix_driver.py", line 165, in open
self._initialize_driver(**self._init_args)
File "XXX\Python\Python310\lib\site-packages\pycomm3\logix_driver.py", line 192, in _initialize_driver
self.get_tag_list(program="*" if init_program_tags else None)
File "XXX\Python\Python310\lib\site-packages\pycomm3\cip_driver.py", line 81, in wrapped
return func(self, *args, **kwargs)
File "XXX\Python\Python310\lib\site-packages\pycomm3\logix_driver.py", line 422, in get_tag_list
tags = self._get_tag_list()
File "XXX\Python\Python310\lib\site-packages\pycomm3\logix_driver.py", line 440, in _get_tag_list
return self._isolate_user_tags(all_tags, program)
File "XXX\Python\Python310\lib\site-packages\pycomm3\logix_driver.py", line 636, in _isolate_user_tags
raise ResponseError("failed isolating user tags") from err
pycomm3.exceptions.ResponseError: failed isolating user tags
Beta Was this translation helpful? Give feedback.
All reactions