Auto-save .trc files

Comprehensive CAN monitor for Windows® and its add-ins: Plotter, CANdb Import, Instruments Panel, and J1939
Post Reply
YKraemer
Posts: 4
Joined: Thu 8. Jun 2017, 23:03

Auto-save .trc files

Post by YKraemer » Thu 8. Jun 2017, 23:09

Hello,

is there any possibility to auto-save .trc files? At the moment, I only know the following solution: open a .trc, run a test and then save it manually to a certain location. I'd like to do the following: start a trace which is automatically saved (and best case split after reaching a file size X), run the test and have the .trc without saving it by hand again.
Any chance this is possible?

Thanks and best,
Yvonne

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Auto-save .trc files

Post by PEAK-Support » Fri 9. Jun 2017, 09:57

While the installation of a PCAN-Explorer Version, we alsways copy a sample macro per default.
In this macro you will find a function called

Code: Select all

Sub LosslessTrace()
.

You only need to change the following lines for your code

Code: Select all

 ' Modify as required
  const DefaultDestDir = "c:\Trace"
  const DefaultConnection = "TestNet@pcan_pci"
  const MessagesPerTracer = 100000
DefaultDestDir is the Directory where to store all Trace Files (could store as much as this Directory could handle!)
DefaultConnection is the name of the used Connection in your Project
MessagesPerTracer is the max. Numbers per single Trace file
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

YKraemer
Posts: 4
Joined: Thu 8. Jun 2017, 23:03

Re: Auto-save .trc files

Post by YKraemer » Fri 9. Jun 2017, 17:32

Hello,
thank you very much for your quick reply. How can I change this when a version of PCAN Explorer is already installed?

Thanks!

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Auto-save .trc files

Post by PEAK-Support » Fri 9. Jun 2017, 17:58

It is a VBS Macro - a simple Text File - see online Help of PCAN-Explorer How to Edit and Apply Macros.
SelectMacro.JPG
SelectMacro.JPG (96.83 KiB) Viewed 11993 times
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

YKraemer
Posts: 4
Joined: Thu 8. Jun 2017, 23:03

Re: Auto-save .trc files

Post by YKraemer » Fri 9. Jun 2017, 18:06

Thank you very much - I'll look into that!
Last question regarding the commands:


const DefaultConnection = "TestNet@pcan_pci"
--> What do you mean with the 'used connection in the Porject'?

const MessagesPerTracer = 100000
--> In case the max number is reached will PCAN automatcally create a second file from a measurement? If so what is a good message number you can recommend?

Thank you!

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Auto-save .trc files

Post by PEAK-Support » Fri 9. Jun 2017, 18:17

const DefaultConnection = "TestNet@pcan_pci"
--> What do you mean with the 'used connection in the Porject'?
This is the name of the Connection you use --> Connections Window - Connection
(for example TestNet@pcan_usb for a Net you ´have named TestNet and use the pcan_usb Device)
const MessagesPerTracer = 100000
--> In case the max number is reached will PCAN automatcally create a second file from a measurement? If so what is a good message number you can recommend?
Open the VBS Script - it is very well documented!

Code: Select all

  Do While IsRunning

    ' Tracer records data until the filling level reaches 95%
    Do While IsRunning And (CurrentTracer.FillingLevel < 95)
      Wait 50
      IsRunning = CurrentTracer.TraceState = peTraceStarted
    Loop
    If IsRunning Then
      NextTracer.Start
      CurrentTracer.Stop
    End If
Leave the value as is is and every single Trave file have max. 100.000 CAN Frames. You also could use higher values - then the Trace files are larger. This system run invinity - until you press stop macro. You could save milions of CAN Frames as long as you have storage on the disk of the PC.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

YKraemer
Posts: 4
Joined: Thu 8. Jun 2017, 23:03

Re: Auto-save .trc files

Post by YKraemer » Fri 9. Jun 2017, 18:30

Thank you very much! :)
Have a great weekend!!

virus
Posts: 2
Joined: Wed 13. Nov 2019, 11:47

Re: Auto-save .trc files

Post by virus » Wed 13. Nov 2019, 12:08

Hey Guys, I am having an issue when trying to auto save the can log. It seems, once one of the traces is full, its closed as it should but the second trace never starts recording! any idea on how I could get past it? I am using PCAN Explorer 5.4.3.905

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Auto-save .trc files

Post by PEAK-Support » Wed 13. Nov 2019, 12:15

please send the serial number and the version Information of your used PE5 to support@peak-system.com (do not pos here!) Also send the script you use for autosave trace files.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

virus
Posts: 2
Joined: Wed 13. Nov 2019, 11:47

Re: Auto-save .trc files

Post by virus » Wed 13. Nov 2019, 12:56

I dropped you an email! thanks

Post Reply