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

**URL:** <https://forum.plexim.com/t/how-to-name-the-columns-of-the-csv-file-exported-using-scope-or-to-file/774>\
**Category:** PLECS\
**Tags:** data-export, csv-file, exportcsv, matfile\
**Created:** [May 13, 2020, 1:35pm UTC](https://forum.plexim.com/t/how-to-name-the-columns-of-the-csv-file-exported-using-scope-or-to-file/774 "2020-05-13T13:35:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ka1](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@ka1](https://forum.plexim.com/u/ka1)\
**Post date:** [May 13, 2020, 1:35pm UTC](https://forum.plexim.com/t/how-to-name-the-columns-of-the-csv-file-exported-using-scope-or-to-file/774/1 "2020-05-13T13:35:04Z")

</div>

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

 ![181](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/1X/2d2f28fc2ae6ed7dc012af72501b6b1cee72545c.png)

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

 ![181](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/1X/871baa1dbf2a67b763383f17f11054c124813dab.png)

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’?

---

<div class="post-metadata">

**Author:** ![Kris\_Eberle](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/kris_eberle/32/6_2.png) [@Kris\_Eberle](https://forum.plexim.com/u/Kris_Eberle)\
**Post date:** [May 13, 2020, 5:04pm UTC](https://forum.plexim.com/t/how-to-name-the-columns-of-the-csv-file-exported-using-scope-or-to-file/774/2 "2020-05-13T17:04:27Z")

</div>

Hello,

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?

Regards,  
Kris

---

<div class="post-metadata">

**Author:** ![ka1](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@ka1](https://forum.plexim.com/u/ka1)\
**Post date:** [May 13, 2020, 6:50pm UTC](https://forum.plexim.com/t/how-to-name-the-columns-of-the-csv-file-exported-using-scope-or-to-file/774/3 "2020-05-13T18:50:46Z")

</div>

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.

 ![181](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/1X/9e06dc048beab16542b34022cb24fd9d02edb07f.jpeg)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.

---

<div class="post-metadata">

**Author:** ![Kris\_Eberle](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/kris_eberle/32/6_2.png) [@Kris\_Eberle](https://forum.plexim.com/u/Kris_Eberle)\
**Post date:** [May 14, 2020, 5:05pm UTC](https://forum.plexim.com/t/how-to-name-the-columns-of-the-csv-file-exported-using-scope-or-to-file/774/4 "2020-05-14T17:05:32Z")

</div>

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.

Thanks,

Kris

---

<div class="post-metadata">

**Author:** ![Manu\_Parimi](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/manu_parimi/32/6_2.png) [@Manu\_Parimi](https://forum.plexim.com/u/Manu_Parimi)\
**Post date:** [June 10, 2020, 11:52am UTC](https://forum.plexim.com/t/how-to-name-the-columns-of-the-csv-file-exported-using-scope-or-to-file/774/5 "2020-06-10T11:52:39Z")

</div>

Hi Kawsar,

I just wanted to update you that this has been fixed in PLECS 4.4.1. Please download the latest version here – [release notes](https://www.plexim.com/download/release-notes).1. The component signal tied to the Probe block now also displays the component name along with the signal name.

![6](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/1X/cf412905e560e42248dd5da23b6a1837e1769c63.jpeg)2. The To File block has a new parameter “Write signal names” that lets you choose whether CSV files are written with a header row containing the names of the input signals.

Additionally, there is a new From File block, that reads signal trajectories from CSV or MAT files.Regards,Manu

---

<div class="post-metadata">

**Author:** ![ka1](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@ka1](https://forum.plexim.com/u/ka1)\
**Post date:** [June 10, 2020, 12:20pm UTC](https://forum.plexim.com/t/how-to-name-the-columns-of-the-csv-file-exported-using-scope-or-to-file/774/6 "2020-06-10T12:20:27Z")

</div>

Thanks for the update Manu! This is very helpful.
