Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

How to name the columns of the csv file exported using 'Scope' or 'To File' ?

0 votes

I am exporting a csv file using the following probe before a Scope/ToFile block.

The columns of the exported csv file are as shown below.

As you can see there are two columns with the same name 'Capacitor voltage'. When I import this as a table in my MATLAB script for post-processing and analysis, it is a bit difficult to handle this situation. Is there a workaround where the above columns will be named something like 'C1_Capacitor voltage', 'R2_Resistor current', and 'C2_Capacitor voltage'?

asked May 13 by ka (12 points)

1 Answer

0 votes

You could place the components of interest inside a Masked Subsystem, and add their respective signals of interest as Mask Probe Signals, with your own custom names. Do you know how to do this?

answered May 13 by Kris Eberle (750 points)

Thanks for the suggestion, Kris!

I was able to do that. Although I have to carefully name each mask signal of my interest.

Let me pick your brain a bit more, please. I have created a masked subsystem out of a simple inductor as shown below.

Is there any way I can name the mask signals with a reference to the 'Path' of the probed component as highlighted red in the above figure? If this is possible, then I can use this masked subsystem as many times as I want in my circuit without worrying to name the probe signals individually. I am kind of hoping there is a solution here.

Hi again,

Unfortunately, I don't think this is possible to include a path reference as part of the signal naming process. You will need to copy the path information into the signal name field manually.