VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

using usb stick in veristand

Solved!
Go to solution

HI,

 

Using Embedded data logger custom device in veristand we could log data in tdms file format located at "c:\logs"  on PXI RT. If i want to access this file, i am booting the pxi in windows and then only i could access the file for analysis. Its very tedious process to  accessing the file since i have to boot everytime in windows mode. My qustion is can i log the data on USB stick in PXI RT controller insted of logging into PXI RT hard drive like in cRIO we can give the file path directly to the USB stick as "U:\..."?  And Is any other option to access the file from RT onto the host...??

0 Kudos
Message 1 of 12
(7,106 Views)

By default your RT controller will have an FTP server installed on it.  While the contorller is running RT, you can remotely access files on your host computer by going to:

ftp://<IP address of controller>

 

Usually I just use Windows Explorer to do this:

ftp.png

0 Kudos
Message 2 of 12
(7,097 Views)

Since the Embedded Data Logger is a custom device plug in, you're welcome to modify the LabVIEW source code to suite your needs.  I recommend you make a backup copy of the LLBs before doing so.  The Embedded Data Logger is not a "basic" custom device, and modifying this code is done at your own risk.

 

I took a brief look at the Main Page found here on Win 7: "C:\Users\Public\Documents\National Instruments\NI VeriStand 2011\Custom Devices\National Instruments\Embedded Data Logger\Embedded Data Logger - Configuration.llb\Embedded Data Logger Main Page.vi".  In the "Add File: Value Change" event case, "New Log File Configuration.vi" requires the "Default Log Directory" input, which is hard-coded as "c:\logs".  This event case sets the "Log File Dir" property in the custom device.  Both the PharLap and VxWorks driver VIs appear to use the "Log File Dir" property to create the log file.  As a first pass, you might try changing "c:\logs" to "u:\logs" in the Main Page.

 

It's worth mentioning that USB is associated with jitter in real-time applications, i.e. NI VeriStand.  If you modify the EDL to utilize the USB drive, I recommend you obtain health and performance benchmarks before and after the change.

 

Steve K

0 Kudos
Message 3 of 12
(7,090 Views)

Unless I'm misunderstanding, I don't think you need to modify the source for the embedded data logger. Just change your log file to be a different drive than C:\blah\blah.tdms to be <Other drive letter>:\blah\blah.tdms

 

According to this: http://digital.ni.com/public.nsf/allkb/BE80D012BB933B54862572D6004FE5F9?OpenDocument

The USB drives are enumerated starting at 😧

 

And you can access them via ftp as described here: http://digital.ni.com/public.nsf/allkb/87FE3B95FAD7CE9D862575C300582AD6?OpenDocument

something like ftp://<ip address>/D:/

Stephen B
0 Kudos
Message 4 of 12
(7,083 Views)

What you're describing makes better sense from an implementation standpoint, I saw this in the driver VI:

 

2012-01-03_131953.jpg

 

Where BUILD FILE PATH is:

2012-01-03_132022.jpg

 

...and assumed the drive letter in the custom device property trickled its way down to the logging loops.  JKV999 should test your reply before mine.

 

Steve K

0 Kudos
Message 5 of 12
(7,080 Views)

Hello everybody,

 

yes i could log tdms file into my usb stick with file path as "u:\logs\*.tdms". But if i switch off rt controller while the test is running, the file will not be saved on usb stick. Our plan is to deploy the system deffinition file on veristand rt and acquire data on to usb stick without host pc. so that i can carry the crio/pxi on remote place and connect the sensor to the analog input and switch the controller so that the tdms file will be saved on usb stick. after some time i will switch off the controller, remove the usb stick and plug into my pc so that i can analyse the data. this is the plan

0 Kudos
Message 6 of 12
(7,070 Views)

Even I am looking for same kind of application to log data into USB without host. I could able to see files in USB when running with host PC. But without host PC I couldnot see files in USB device.

 

Regards

Vijay

0 Kudos
Message 7 of 12
(7,065 Views)

JKV999, is it correct that you want to power off the system without any other interaction, while it's writing a file, and have that file intact?

0 Kudos
Message 8 of 12
(7,059 Views)

yes i will switch off the power wen the file is being written. But how the file will be saved when power goes off.

0 Kudos
Message 9 of 12
(7,055 Views)
Solution
Accepted by JKV999

The "Log Command" channel controls the data logging operation inside the Embedded Data Logger.  You can use this channel to open or close data log files.  The valid values are:

 

0: Idle (no command)

1: Open File. Closes the previous file reference if it was open and opens a new file reference.

2: Close File. Closes the file reference without opening a new file reference.

 

The Log Command channel is reset to Idle after the command is processed.

 

I'd address your requirement by periodically writing 1 to the Log Command channel.  You can accomplish this with a calculated channel, alarm and procedure combination.  I do not expect the active file to be available when you shut the system down, i.e. only the second-to-last and previous logs will be valid.  There are other ways to accomplish your requirement, but this seems straightforward to me.

 

Steve K

Message 10 of 12
(7,046 Views)