Repository navigation
What changes against 4.0.0. Nothing to do on upgrading: run the installer line again.
Trend and trace on the PLC
cts trend setpicks the variables a Trend RecordingCtsTrendrecords in fixed slots, gated byGVL_CtsTrend.xRecord(off from a download on);cts trend onandoffswitch it on the PLC.cts trend pullcopies the PLC's trend file in a pause of the recording and merges its samples into this PC's database of the trend;cts trend queryasks it with one read-only SQL statement. A failed pull leaves no partial file.cts guide trendwalks through it.cts tracemakes and changes the IDE's TraceCtsTraceof the active application while online (variables, task, every, samples, a trigger with edge, level and post, a condition).cts trace startdownloads only the trace and starts it,stopstops it,pullreads the PLC's buffer into a CSV with a summary per variable, without a login, andremovedeletes it from the PLC and the project.cts trace setgives the time a sample takes and the time the buffer holds.cts guide tracewalks through it.
Feedback
cts diagprints what a bug report needs: the cts, Windows and git versions, whether the CODESYS menu entry is up to date, the IDEs with an agent and the sync folder's git state as settings and counts. It names no file, object, branch, project or path.- The quick window's More >
6Report a problem makes a report for a GitHub issue or the Discord server:cts diag, the failure shown and this IDE session's cts runs and agent errors, with the names the agent knows, paths and quoted text replaced. It goes onto the clipboard and into a text file to read before sending. The link under a failure is now Report and makes the same report; it no longer copies the run's whole output with names.
FSM
- The FSM window's Live button paints the step the PLC is in and the transition that led there, read a few times a second while the IDE is logged in. It offers the state variable's path in each instance of the block the declarations make, or takes a typed one; a state written as a constant or an enumeration member is found by its number.
cts fsmgives each machine the paths to read online (watch) and each state the numbers it stands for (values);cts fsm NAMEnames thects readthat shows the state.cts fsm --svg FOLDERwrites the FSM window's GRAFCET drawing of each machine as an SVG file on white, for a document or a review; hovering a step or a transition shows its line and the code behind it. It works with--disk, so no IDE is needed.
Diagrams
cts diagram classes [NAME]prints a mermaid classDiagram of the sync folder's project, offline: inheritance, interfaces, the blocks and structures a block holds and the ones it only refers to (one line per pair of classes, naming the members), with each class's inputs, outputs, methods and properties. With NAME the classes around it, a line only between classes a step apart; without it the inheritance alone. Many classes tied to one class alone print as one list.cts diagram calls [--from TASK|NAME]prints a mermaid flowchart of who calls whom from the tasks down,--depthcalls deep; a node says how many callees it leaves out, many objects one node calls that call nothing further print as one list, and a task's graphical program shows as having no text.cts diagram viewwrites every call, class and state machine drawing of the project into one HTML page and opens it: a list on the left, a canvas that pans and zooms, a click on a node to go to it, light and dark. The page carries mermaid, so it needs no network and can be sent as one file. In the IDE: quick window More,7Diagrams.
Sync
- A text object in the folder of a new device, application or other new container is created in the same import; before the import refused with "no IDE parent for new object" and a second run was needed. (Reported by YoSiem in #73.)
- A new persistent or task-local variable list is created as its own type; before the import created it as a plain GVL and failed half way. (Reported by YoSiem in #73.)
- A file moved into another application, or between an application and the project's POUs, deletes its object and makes it new there; the IDE kept compiling a moved object where it was. Renames and moves within one application still keep the object. (Reported by YoSiem in #73.)
- A Windows device name (
COM1,CON,AUX,LPT1, ...) gets a_after it in its file name, so a serial interfaceCOM1isCOM1_.xml; before Windows opened the device and export recorded no base. (Reported by YoSiem in #72.) - A member in a folder below its POU keeps the folder: export writes
Folder="..."in the cts pragma above it and import moves it there; before cts did not see such a folder and an edited method in one refused the import. cts importmakes a new object-like container (a Trend Recording Manager) from its.cds-object.xmlbefore the objects in it.cts importnames the objects only the IDE changed, which it leaves as the IDE has them (ide_changed=N, one line each); the quick window says Shift+1 makes the disk win.cts import --savewith a conflict left does not save the project; before it saved the IDE's half-imported state.cts comparelists an.xmlor.csvobject deleted in the IDE as deleted when it reuses its cache of the IDE; before it showed it unchanged untilcts compare --full.- An error inside cts during compare is reported as
internalwith its type, not as a refusal or a quiet full export. - A git command cts runs is stopped after ten minutes and the call names it; before a hook or credential helper waiting for input held cts forever.
Commands
cts new interfacemakes an interface;cts newtakes--extendsand--implements, and an interface property has no accessor bodies.cts importcreates a property below an interface.cts guide testssets the test application up from files (copies of the device, application, Library Manager and Task Configuration, simulation on,cts lib add CmpLog, one import) instead of CODESYS menus.cts lib addtakes the namespace the library's own properties name, as CODESYS does; before ModbusFB gotLibraryCategoryIds.cts buildnames a qualified-only library only when it holds one of the unknown names.cts read --untilrefusesNAME=VALUEwith the form it takes instead of waiting out its timeout.cts read-object --pathmatches whole path segments:A/MAINno longer matchesAppA/MAIN.cts visu from-svg --gvlmatches GVL files and variable names regardless of case, as ST does; before an existingxRundid not coverXRUNand a second declaration was added.cts snapshooter treeanddiffname each leaf's type and each difference in the short answer.cts plc-logkeeps an entry with a line break in its text on its one line.cts statusdoes not count a.projectfolder holding only the open project file as uncommitted.cts docsrefuses an output folder that could replace project files, keeps same-named libraries of different vendors apart and sees task assignment changes.cts analyzereads.stfiles as strict UTF-8, as import does, and two runs at once no longer write into one temporary state file.cts --timeout Nbefore the command is the global flag; a timeout takes more than 0 and at most 86400 seconds.- The Next line after a dialog presses its OK, else the button Enter presses; a login refused with "Gateway not configured" points at
cts scanandcts connect --ip.
Agent
pingreports the agent's uptime from a monotonic clock; a clock set back made it negative.- Stopping the agent closes a connection accepted meanwhile and releases the pipe name.