Repository navigation
What changes against 4.1.5. Run the installer line again. Mostly fixes: cts import with folders below a POU, the task rules of cts analyze and cts diagram tasks --moves. CTS0102 and CTS0103 now also look at programs' variables, so cts analyze may name a few new findings the first time.
Import
-
cts importsets the settings of a member in a folder below its POU (FB_Pump.Service.M_Start.xml, an accessor'sFB_Pump.Service.P_Speed.Get.xml, a folder name with a dot) and of a member of a POU renamed on disk; a settings file removed with its text leaves the sync base, and when the IDE changed those settings the object is deleted only with--force;--take ideon the settings of an object the IDE deleted removes the file instead of failing; and a build flag the text says keeps its value when the IDE object has no build property or the settings file lacks the flag. A build field the file adds no longer leaves the settings unapplied because the IDE stores the fields in its own order, settings the IDE gave an object whose text the disk deleted also stop the delete without--force,--take idewrites the settings of an object the IDE has without a timestamp, the file of a folder below a POU named like one of its members (FB_Valve.Service.M_Toggle.xml) is no longer taken for that member's settings, compiler defines the settings file changes from a value the pragma cannot hold go to the IDE, and a field of its object in a renamed POU's member's file is named as not taken. -
An import names the file of a folder it makes below a POU after the POU's own file, also for a member still in a file of its own (
FB_Valve.M_Toggle.st). A branch that brings such folders with their files (FB_Valve.Service.xml,FB_Valve.Service.Old.xml) gets each folder the IDE lacks made below its POU, a new POU first, with the guid its file names; the disk and the sync base keep the branch's files instead of gainingFB_Valve/Service/.cds-object.xml, and no folder namedFB_Valve.Service.Oldappears beside the POU. -
Such a folder is made with the name its file holds (
v1.0,A:BinFB_Valve.A_B.xml), once, not one folder per dot or one named as the file; a folder beside a POU whose name starts with the POU's (FB_Valve.Backup) is made beside it, not below it. One the IDE already has under another guid, or below a POU renamed on disk, no longer refuses the import or stays out of the sync base: its file takes the IDE's.cts import --forcemakes such a folder the IDE deleted again, the member back inside, and an empty one too, whether the IDE deleted it alone or with its POU, where it was refused as an object named otherwise than its file (#80);--savesaves when only such a folder was made, whichcreated_objectsnames; and a dry run refuses a folder below a POU the IDE deleted as the import does. Such a folder whose file the disk deleted is deleted in the IDE too, as a top-level folder is, after the members the text takes out of it and never with one; while theFolderpragma of a member still names it, or it holds a member the disk does not have, the import refuses and says which. A member itsFolderpragma puts into another folder below its POU, or out of one, takes its settings file along (FB_Valve.M_Toggle.xmlbecomesFB_Valve.Service.M_Toggle.xml, a property's accessors' too), which a dry run names; access rights copied from another kind of object, whose right ids the IDE replaces with its own kind's, are named unapplied with the ids it replaced; andcreated_objectsgives the accessors a recreated property brings their file too. Deleting such a folder also works when the IDE is unchanged since the last export, below a POU renamed on disk, and with a graphical member whose file the disk deleted with it; the disk deleting a POU the IDE edited takes the folder along under--forceinstead of failing;--forcedeletes such a folder only the IDE has, or one it changed; a folder only the IDE has inside it, or a member the IDE moved into it, refuses the import and its dry run alike instead of going along or failing part way; and a file beside a POU that does not parse is refused by name instead of stopping the import. It also deletes a folder that held a property the text takes out, which its accessors no longer refuse, under--forcetoo; deletes a graphical member whose file the disk deleted in such a folder when the IDE is unchanged since the last export, where the member stayed or the folder was refused; and finds the folders inside it where the disk moved the POU, so a POU moved to another directory no longer stops the import with a missing directory, and a folder whose file moved with the POU is not deleted with the outer one under--force; a new folder the disk brings inside one whose file it deleted refuses the import and its dry run, where the import made it and then deleted both. A POU the disk deleted and the IDE edited is refused saying so and that putting its file back keeps it or--forcedeletes it, not "cannot identify disk text", and the text answer of an import names why each object stayed unapplied (the right ids the IDE replaced), not only--json. A dry run with--forcenames what the import overwrites, deletes and makes again, in its text and under the keys the import's answer uses (overwritten_ide_changes,deleted_objects,created_objects): a folder only the IDE has inside one deleted below a POU goes with it, a property the IDE deleted comes back with its accessors, where it listed them as changes only the IDE made thatcts syncwould settle and said to run thects import --forceit was; with--forceand without, itscreated_objectsnow names every object the import's answer then names, objects new on disk and the folders made for them (one the disk has only as a directory, one below a POU a member'sFolderpragma alone names) too, and its text says each once: nowould deleteline beside thedeletedrow of the same object, and awould createline only for what noaddedrow names. A dry run also counts an object changed on disk and in the IDE (both=1) and says so on its row, as compare does, where onlyide_changed=0stood beside a POU the disk deleted and the IDE edited. -
cts importempties the body of a POU whose file has no// --- implementation ---line, ascts exportwrites an empty body; before, the IDE kept its body and the import ended unapplied, with--forcetoo. Code after the declaration of a POU, method or accessor with no such line before it, or a line that reads like it and is not it (// --- Implementation ---,// --- implementation --, one inside a comment), makes the file not importable, naming its line, where the import put the body into the declaration and emptied the IDE's.cts import --force --dry-runwithout a sync base names underdeleted_objectsthe objects kept as XML only the IDE has (a graphical member, a folder below a POU), which the import deletes, where it listed them as left tocts sync. Each unapplied object's text line says its own cause (the agent's error, else the parts the IDE read back otherwise) and the closing line no longer calls every miss a text the IDE did not read back. A folder's file below a POU whose name puts the folder elsewhere than itsParentSVNodeGuid(FB_Valve.Service.New.xmlnamingFB_Valveas its parent) is refused, naming the file export would write, where the import made the folder and wrote a second file beside it. The import names a folder below a POU it deleted by its file's name (FB_Valve.Service), as its dry run andcts comparedo.
Tasks: what two tasks share
-
CTS0102 and CTS0103 now cover a program's variables, not only GVLs: one written as
PRG_Main.nSpeedfrom another task's code, or in the program's own code (wherenSpeedalone names it, in its methods and actions too, unless one declares its own), counts for that task; a program'sVAR_TEMPdoes not. -
A property used through an instance (
fbAxis.P_Speed := 5,n := fbAxis.P_Speed), throughTHIS^or by its name in its block runs itsSETorGETin the task of that code: what the accessor writes and reads counts there, through the instance'sVAR_IN_OUTtoo. A property's use is also a reference for CTS0107, which names it as the property (uses the property 'FB_Axis.P_Speed', notcalls 'FB_Axis.P_Speed.Get'), and a call in the call graph. -
A method's own variable named like its block's
VAR_IN_OUTis no longer taken for what the instance was given, a method the block's code calls on another instance of its type (fbOther.Clear()) no longer counts as one of its own, an instance inside a structure (stLine.fbFill.Clear()) reaches what it was given, and the inner instance of each of two instances of a block (Fast.lineA.fbFill.Clear()) reaches only what that one was given, not also whatlineB.fbFillwas. -
A property is followed through
THIS^.fbAxis.P, through an instance the block inherits, through a GVL instance named bare (fbAxis.P := 5) and in a program whose file is named apart (MAIN__1a2b3c4d); assigning it runs itsSETand writes no part of the instance, so CTS0102 no longer namesPRG_Main.fbAxisfor two tasks that set its property. A method's own instance hides its program's of that name,Mode.Run(a type named like a property of the block) no longer runs the property'sGET, a method that hides its block'sVAR_IN_OUTstill reaches it through the methods it calls,PRG_Main.fbFill.Clear()takes thePRG_Mainof the caller's application, and a program's method or accessor that another task calls is reported for that task instead of being left to CTS0104.THIS^.nSpeedin a program's method or accessor is the program'snSpeedasnSpeedis, even where the method declares its own. A variable handed throughTHIS^to another block'sVAR_IN_OUT(fbFill(aBuf := THIS^.aBuf),fbFill.Put(aDst := THIS^.aBuf)), in a program or a block, is bound asaBufis, andTHIS^.aBufin a block's method whereaBufis the block'sVAR_IN_OUTreaches what the caller bound, also in a method that declares its ownaBufor takes one as its ownVAR_IN_OUT(whereaBufalone is the method's), so what the callee does to it counts for CTS0102 and CTS0103. Two applications that each have aPLC_PRGof their own no longer share what it calls: a task runs only its application'sPLC_PRGand what that one calls, so the other's writes no longer make a hazard in it, a program of the POU pool another application runs too no longer hides the hazard of its method called from another task, andcts analyzeno longer fails reading one's calls in the other's text. CTS0085 follows each one's calls apart too, so a call in one and a call back in the other make no recursion and a recursion only in the second application's copy is no longer missed;cts diagram tasks --moveslists a move of such a program once and moves a block only one program of the task calls whatever the other application'sPLC_PRGcalls, and--moverefuses a function as it should where the other application has a block of its name. A GVL variable or instance named bare (fbAxis.P := 5,nCount := 0) is the one of the code's own application where another application declares the name too, and a program's method or accessor that a task which does not run the program calls is reported for that task also when two other tasks run the program. A POU named from one application is its own or the POU pool's, never another application's of that name, for the task rules, CTS0085 andcts diagram folders; a block, method or base block named there is that application's too, and an instance inside one application's program no longer takes what the other's program of that name gave it. An output mapped throughTHIS^(fbTimer(Q => THIS^.xOut)) is a write, and a derived block'sVAR_IN_OUTit inherits is bound and followed into its methods as its own is, byTHIS^.aBuforaBuf.
cts diagram tasks --moves
-
cts diagram tasks --moveswarns of a move into a task of the same interval and a lower priority too: the code now waits for the tasks it held up. Of two moves warned of in different ways (one more urgent, the other less), neither leaves the other out any more. -
A program that code calls rather than a task's list runs in its caller's task, as a function does:
--movesproposes the program or block that calls it instead, and--moverefuses it. -
fixes Ncounts only the hazardscts analyzereports: one the baseline, a suppression, acts:ignore-filedirective or the configuration hides gets no move, andadds Nleaves out a new hazard the configuration or a directive would hide, so such a move is no longer dropped. The same goes for the moves incts diagram viewand for--movesafter--move, and now forhazards=Nand the red ofcts diagram tasks(with--moveand--sincetoo) and of every task drawing incts diagram view; of two findingscts analyzetells apart only by number (one global or program two applications share from the POU pool), the one the baseline or a suppression holds is the one hidden. -
Among moves that fix as much,
--movesand the view's Tasks tab put the one with the milder warning first: less urgent at the same pace, then more urgent, then a change of interval, the larger the graver (twice before 25 times), then another kind of task; warnings on one move add up, and a pace that is not an interval weighs more than any change of interval. The "draw one before and after" line names, of the shown moves, one that adds nothing if there is one, then the one with the mildest warning, one with none if there is one. A move between two tasks of the same kind at other paces says both (runs on event bStop instead of on event bStart), and moves the other way between two intervals rank alike.
Several applications
- Two applications that each have a program, block, GVL or task of one name get a card each in
cts docsand a node or class each incts diagram calls,classesandview, named with the application's folder (PLC_PRG (Device/PLC Logic/App2)) only where the name repeats: what one calls, runs in, reads and writes, and the base it extends (its application's, else the POU pool's), no longer lands on the other's card, a name two applications share asks--fromfor one of them, a task's name too where--from MainTasksaid no task is named so, and one only one of them runs programs under draws that one, andGVL.xin an application's code is its own GVL's, not the POU pool's list of that name. A child application's code (a task configuration of its own in a folder of its parent's) calls, reads, writes and extends its parent application's objects, its own of a name first, where its calls, globals and inherited members were lost in the docs, the drawings and the rules; CTS0070, CTS0051, CTS0059 and CTS0093 take a global named bare only from the code's own application (or its parent's, or the POU pool), so a localnSpeedno longer hides another application's global; and two lists of one application that give a name two types leave it open also in two folders, as folders do not scope names.