LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting properties of 'write to measurement vi' from front panel.

Solved!
Go to solution

I am using "write to measurement vi" in the consumer code. I am saving data into series of file with 800k samples per file. I can successfully do this by editing the properties of "write to measurement vi" (by double clicking on it).
But I want to control these parameters (like file name and path, file format, samples per file, suffix, etc) of write to measurement vi from the front panel rather than by going to the block diagram and double clicking it again and again.
If this is not possible, then I would like to do this:
I can set all other parameters like "number of samples per file", file format, etc by configuring the write to measurement vi from the block diagram.
Then I want to supply the folder address and file name from the front panel.
I tried to do this by connecting file path control to the write to measurement vi terminal. But when I supply any file name in the file path control, it gives error: "file of this name does not exist".
Okay, I know that this is the obvious error if there is no file having the same name which I entered in the file path control.
But when I do the same thing (giving name of the file which do not exist in the folder path) by editing the property dialog of "write to measurement file vi", this function automatically creates a new file of that name (when code is executed).

In short, I want to supply the name and path of the file from the front panel to the write to measurement vi function in the  block diagram. Also, this file is not already existing in the file path. So, my code should create the new file of desired name when code is executed.

Sorry if I couldn't express the problem correctly.

My task is to transmit various signals from 5kHz to 50kHz and receive it using the same board (synchronized transmission and reception). This means that I have to take 10 readings for 4 types of signals. Which means total 40 readings. For this,  everytime when I change the frequency of the transmit signal from the front panel, I also want to change the name of the file (without replacing existing file) where the received signal will be saved. I am using tdms format for data logging. The saved files should have max 800k samples in one file (which can be done simply by using property dialog of write to measurement vi ).
I want that write to measurement vi should take file name and path from the front panel and rest of the settings from its property dialog.
Is this possible?
If no, then please suggest the alternatives.

I have attached my vi for reference.

Thanks in advance.

0 Kudos
Message 1 of 4
(1,583 Views)
Solution
Accepted by topic author Amartansh13

for saving different name every execution done, may i suggest use a time stamp, try to work on it.make your file name be the time of your computer time. i used  it, whenever i save data, for me to identify what time the test was done. you can also include the day.

this is only,
Path Creator



Thank you & Best regards
syrpimp

=======================================================
“You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley
Message 2 of 4
(1,539 Views)

I strongly suggest you to learn how to use the low level file functions. Specially the TDMS files are very useful for data management!

Besides, you could take the Core 1-2 online courses, it would give you lots of ideas to help building better applications.

0 Kudos
Message 3 of 4
(1,523 Views)

Thanks a lot . Path creator was perfect. 

 

0 Kudos
Message 4 of 4
(1,475 Views)