Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

VisuElement Trace Reset

caprez95
2018-02-06
2023-06-28
  • caprez95 - 2018-02-06

    Hallo zusammen

    Ich schreibe die Software für ein kleines Projekt und komme nicht weiter.
    Mein Programm steuert einen Schrittmotor an und zeichnet den Strom in einem Trace auf.

    Sobald der Test beendet ist, soll der Inhalt des Trace gelöscht und die Zeit auf 0 zurückgesetzt werden.
    Ich weiss allerdings nicht, wie ich das machen soll.

    In der Bibliothek "TraceManager" gibt es die Funktion "TraceState" mit einer Methode "Reset".
    Ich vermute, dass sich damit das Trace zurücksetzen lässt. Jedoch habe ich das bis jetzt nicht hinbekommen.

    Hat jemand von euch eine Idee?

    Gruss caprez95

     
    👍
    2
  • RSmith - 2020-12-14

    Hast du die Zeit zurückgesetzt? (Google translated)

    I have the same request to reset the Trace time

     
  • dkugler - 2020-12-15

    meins Wissens lässt sich die Zeit nicht zurücksetzen. Die Zeitachse läuft immer seit Start der Steuerung. Ich würde es auch sehr begrüßen, wenn der Trace die Zeit ab Reset oder Start der Aufzeichnung anzeigen würde. Ich kenne bisher nur den Weg, mit der Hand am Arm, die Aufzeichnung in ein Array selber zu programmieren und dann das XY-Chart Element zur Anzeige verwenden. Der Vorteil ist, man hat den Speicherverbrauch selber in der Hand und kann die Aufzeichnungszeit und -zyklus flexibel zur Laufzeit anpassen. Außerdem kann man auf das Array dann sehr flexibel zugreifen und den Anzeigebereich innerhlab des Arrays verändern. Viel Erfolg!

     
  • RSmith - 2020-12-15

    Thank you dkugler for confirming. Using Trend (instead of Trace) allows the display of absolute time, which at least makes more sense to the user than the controller runtime. Unfortunately it is not supported by my PLC, so I will have a look at XY chart.

     
  • kleeswi - 2022-05-11

    I have a related problem. In my case the variables in the trace switch between different parameters in the background and thus the curve jumps. Now I want to reset the trace every time I switch the parameters. I found the function TraceMgrPacketRestart(Input) in https://help.codesys.com/webapp/TraceMgrPacketRestart;product=CmpTraceMgr;version=3.5.17.0 to do that. My problem is that I am trying to get a trace packet handle of the type RTS_IEC_HANDLE as the Input of the function, but I don't know where the trace object is and how to use the variable, if it is even possible. I use a trace within a visualisation page.

     
  • kleeswi - 2022-05-11
     

    Last edit: kleeswi 2022-05-11

Log in to post a comment.