Skip to content

4.1.6

Latest

Choose a tag to compare

@ArthurkaX ArthurkaX released this 03 Dec 08:03
· 2 commits to main since this release

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 import sets the settings of a member in a folder below its POU (FB_Pump.Service.M_Start.xml, an accessor's FB_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 ide on 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 ide writes 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 gaining FB_Valve/Service/.cds-object.xml, and no folder named FB_Valve.Service.Old appears beside the POU.

  • Such a folder is made with the name its file holds (v1.0, A:B in FB_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 --force makes 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); --save saves when only such a folder was made, which created_objects names; 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 the Folder pragma of a member still names it, or it holds a member the disk does not have, the import refuses and says which. A member its Folder pragma puts into another folder below its POU, or out of one, takes its settings file along (FB_Valve.M_Toggle.xml becomes FB_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; and created_objects gives 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 --force instead of failing; --force deletes 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 --force too; 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 --force deletes 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 --force names 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 that cts sync would settle and said to run the cts import --force it was; with --force and without, its created_objects now 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's Folder pragma alone names) too, and its text says each once: no would delete line beside the deleted row of the same object, and a would create line only for what no added row 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 only ide_changed=0 stood beside a POU the disk deleted and the IDE edited.

  • cts import empties the body of a POU whose file has no // --- implementation --- line, as cts export writes an empty body; before, the IDE kept its body and the import ended unapplied, with --force too. 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-run without a sync base names under deleted_objects the 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 to cts 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 its ParentSVNodeGuid (FB_Valve.Service.New.xml naming FB_Valve as 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 and cts compare do.

Tasks: what two tasks share

  • CTS0102 and CTS0103 now cover a program's variables, not only GVLs: one written as PRG_Main.nSpeed from another task's code, or in the program's own code (where nSpeed alone names it, in its methods and actions too, unless one declares its own), counts for that task; a program's VAR_TEMP does not.

  • A property used through an instance (fbAxis.P_Speed := 5, n := fbAxis.P_Speed), through THIS^ or by its name in its block runs its SET or GET in the task of that code: what the accessor writes and reads counts there, through the instance's VAR_IN_OUT too. A property's use is also a reference for CTS0107, which names it as the property (uses the property 'FB_Axis.P_Speed', not calls 'FB_Axis.P_Speed.Get'), and a call in the call graph.

  • A method's own variable named like its block's VAR_IN_OUT is 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 what lineB.fbFill was.

  • 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 its SET and writes no part of the instance, so CTS0102 no longer names PRG_Main.fbAxis for 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's GET, a method that hides its block's VAR_IN_OUT still reaches it through the methods it calls, PRG_Main.fbFill.Clear() takes the PRG_Main of 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^.nSpeed in a program's method or accessor is the program's nSpeed as nSpeed is, even where the method declares its own. A variable handed through THIS^ to another block's VAR_IN_OUT (fbFill(aBuf := THIS^.aBuf), fbFill.Put(aDst := THIS^.aBuf)), in a program or a block, is bound as aBuf is, and THIS^.aBuf in a block's method where aBuf is the block's VAR_IN_OUT reaches what the caller bound, also in a method that declares its own aBuf or takes one as its own VAR_IN_OUT (where aBuf alone is the method's), so what the callee does to it counts for CTS0102 and CTS0103. Two applications that each have a PLC_PRG of their own no longer share what it calls: a task runs only its application's PLC_PRG and 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, and cts analyze no 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 --moves lists a move of such a program once and moves a block only one program of the task calls whatever the other application's PLC_PRG calls, and --move refuses 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 and cts 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 through THIS^ (fbTimer(Q => THIS^.xOut)) is a write, and a derived block's VAR_IN_OUT it inherits is bound and followed into its methods as its own is, by THIS^.aBuf or aBuf.

cts diagram tasks --moves

  • cts diagram tasks --moves warns 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: --moves proposes the program or block that calls it instead, and --move refuses it.

  • fixes N counts only the hazards cts analyze reports: one the baseline, a suppression, a cts:ignore-file directive or the configuration hides gets no move, and adds N leaves 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 in cts diagram view and for --moves after --move, and now for hazards=N and the red of cts diagram tasks (with --move and --since too) and of every task drawing in cts diagram view; of two findings cts analyze tells 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, --moves and 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 docs and a node or class each in cts diagram calls, classes and view, 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 --from for one of them, a task's name too where --from MainTask said no task is named so, and one only one of them runs programs under draws that one, and GVL.x in 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 local nSpeed no 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.