Open bmd9526git opened 2 years ago
Looks like a problem with structured text based on the error listing. I had a similar problem with ST routines that contained blank lines due to Rockwell's inappropriate use of CDATA. However, that should have been fixed in v1.5. Are you using that version?
running the following code and then opening the l5x in designer is giving the errors below; i'll update with what I do to fix, but probably wont get into your code to figure out why this is happening
code: prj = project.Project(fn) # where fn is some l5x file def saveFile(saveIdx): prj.write(controller + str(saveIdx) + 'AutoGen.L5X') saveFile('NoEdits')
import errors: Error: Line 60783: Required CDATA for element 'Line' was missing. RSLogix5000Content/Controller/AddOnInstructionDefinitions/AddOnInstructionDefinition[@Name="AOI_DaysSince"]/Routines/Routine[@Name="Logic"]/STContent/Line[@Number="5"] Error: Line 61646: Error creating 'LocalTag[@Name="AOI_DaySince"]' (Data type does not exist.). RSLogix5000Content/Controller/AddOnInstructionDefinitions/AddOnInstructionDefinition[@Name="AOI_ISO_Weeknumber"]/LocalTags/LocalTag[@Name="AOI_DaySince"] Error: Line 72136: Required CDATA for element 'Line' was missing. RSLogix5000Content/Controller/AddOnInstructionDefinitions/AddOnInstructionDefinition[@Name="AOI_TIME_ADD"]/Routines/Routine[@Name="Logic"]/STContent/Line[@Number="23"] Error: Line 73468: Required CDATA for element 'Line' was missing. RSLogix5000Content/Controller/AddOnInstructionDefinitions/AddOnInstructionDefinition[@Name="AOI_TIME_DIFFERENCE"]/Routines/Routine[@Name="Logic"]/STContent/Line[@Number="25"] Error: Line 74626: Error creating 'LocalTag[@Name="AOI_SNTP_Time_To_Current_Date"]' (Data type does not exist.). RSLogix5000Content/Controller/AddOnInstructionDefinitions/AddOnInstructionDefinition[@Name="AOI_SNTP_QUERY"]/LocalTags/LocalTag[@Name="AOI_SNTP_Time_To_Current_Date"] Error: Line 158502: Error creating 'Tag[@Name="DSTAOIWeekNumMar"]' (Data type does not exist.). RSLogix5000Content/Controller/Tags/Tag[@Name="DSTAOIWeekNumMar"] Error: Line 158564: Error creating 'Tag[@Name="DSTAOIWeekNumNov"]' (Data type does not exist.). RSLogix5000Content/Controller/Tags/Tag[@Name="DSTAOIWeekNumNov"] Error: Line 580186: Required CDATA for element 'Line' was missing. RSLogix5000Content/Controller/Programs/Program[@Name="FS_PCI"]/Routines/Routine[@Name="R001_Init"]/STContent/Line[@Number="3"] Error: Line 609113: Error creating 'Tag[@Name="SNTP_AOI_TAG"]' (Data type does not exist.). RSLogix5000Content/Controller/Programs/Program[@Name="MainProgram"]/Tags/Tag[@Name="SNTP_AOI_TAG"]