pycomm3 icon indicating copy to clipboard operation
pycomm3 copied to clipboard

[BUG] - MLX 1100 - failing `get_file_directory`

Open harisankarbs007 opened this issue 2 years ago • 1 comments

Description

plc.get_file_directory() is kipping O0 and starts from I0.

Output: data files: 16, logic files: 5 I0 S1 B2 T3 C4 R5 N6 F7 B8 T9 N10 F11 ST12 MG13 n7:0, 54, N, None

Target PLC Model: plc_ML1100 Firmware Revision: [e.g. 32] Other Devices in CIP Path: None

Code Sample Minimal reproduceable code sample

try:
	with SLCDriver('192.168.111.13') as plc:
		dc=plc.get_file_directory()
		for dp in dc:
			print(dp)	
except Exception as ex:
	print(ex)		

Additional context

  • if reading/writing a tag, describe it's type/structure/etc
  • attach any relevant L5X or data files
  • paste/attach logging output

harisankarbs007 avatar May 26 '23 18:05 harisankarbs007

The get_file_directory method reads the SYS0 file and tries to parse it for the directory information, but I haven't been able to find any documentation on its format or how to interpret it. I've reverse engineered what I could with the devices I had access to, so it's support is very experimental. There may be something firmware or configuration wise that alters the format of the file that I'm not accounting for. If you'd like to try making it work, the methods _parse_file0 and _get_sys0_info methods of slc_driver.py are most relevant. If it's just skipping the O0 file, it may be the starting offset (file_position) is one row too late.

ottowayi avatar Jul 02 '23 14:07 ottowayi