VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

veristand data logging in Labview

I am trying to start data logging for Veristand from a Labview program.  There is no help information on this VI (Worksape ->Start Data Loging.vi) and I don't know how to wire in the Data Log File Configuration.  Do I have to provide the values for all the channels as well as the name, or if I just provide the channel name will it automatically log the data?  Also does this log on the host or on the RT PC?

 

Any help would be appreciated.

 

 

0 Kudos
Message 1 of 8
(8,581 Views)

Josh,

 

The only thing you really need to set is the log file rate, and the "Channel Path" string inside the "Channels" array. That way it knows what channels to log and at what rate. All the other inputs are optional. The log is created on the host.

 

Attached is an example that has a lot of stuff in it, including data logging. Let me know if this helps.

Stephen B
0 Kudos
Message 2 of 8
(8,573 Views)

Hi,Stephen B

 

    I download your LV code about the data logging , and I  change some code and run it successfully on my computer without the RT system . I want to know if I log data from RT system , I must create a UDP session to transport data pack by pack , right?

 

 

 

 

now I want to log data in RT , and I need transport data after Stop logging , but not duiring the logging , As follow Steps:

  1. Start data logging flag on PC ,
  2. Save the logging data in RT system ,
  3. Stop data logging flag on PC , and transport data up to PC

I don't know whether the function above can be available

Thank you!.

 

 

wen wang

 

HIRAIN , CHINA

 

 

 

 

0 Kudos
Message 3 of 8
(8,095 Views)

To log data on the host, you do not need to create a UDP session. The example provided above does create a UDP session, but it is only used to populate the graph with data. There is a separate API (also used in the example) to log data... that doesn't require the user to use a UDP session.

 

To log data on the RT system, I recommend using the Embedded Data Logger custom device that ships with NI VeriStand. Inside your system definition file, right click custom devices and add it in. After adding, you can select which items to log. There is also a trigger channel so you can start/stop logging.

 

After the logging is done, you can either manually FTP the data from the target to the host by opening windows explorer (WindowsKey + E) and typing in ftp://<ip address>/ or you can programatically do the same with FTP functions in a programming language like LabVIEW.

Stephen B
0 Kudos
Message 4 of 8
(8,086 Views)

Hi, 

I am following this thread as this is a first attempt at actually looking at the data acquired with VS2011. If need be I can switch to a new thread.

 

So, I have an application running on a RT Target with VS2011 with hardware IOs, models, custom device... Currently the HW loop rate is 4kHz and when the target runs, its CPUs are all four under a 50-60% load on average.  A LabVIEW program takes advantage of the VS API to start the target, set model parameters and inputs etc...

The system definition has about 50 channels defined, some are models I/Os, some are hardware I/Os.

 

To acquire data I am using the host API Start Data Logging, passing it the channels of interest. Sampling rate was initially set at 1 KHz.

 

What we observe at this point is that the data set found in the tdms file is inconsistent: some channels have less data points returned than what would be expected with a given test duration and sampling rate, some logged channels are kept constant in the code, but are returned as toggling between 0 and their actual set up value.

 

At this point I am not excluding there is something wrong on our side, however, I am wondering if similar issues were observed before? What is the maximum throughput Target --> Host one can expect ??  

 

thx.

Laurent 

0 Kudos
Message 5 of 8
(7,720 Views)

Ok, it appears we had variables with the same name across models, despite the full path being unique such as:

 

  • Targets/HILRT2/Simulation Models/Models/Time/Outports/t_s
  • Targets/HILRT2/Simulation Models/Models/ACGrid_Model_ver3/t_s ..

So that was likley the issue, confusing the write to tdms operation. It looks ok now.

 

Laurent

0 Kudos
Message 6 of 8
(7,714 Views)

Hi BSI,

 

We have the same problem with ARINC 429 bus where each message has an SDI and SSM. So, as you, each full path is unique but the final name occurs several times.

 

How do you solved your problem?

 

Cheers,

 

CHCastro
0 Kudos
Message 7 of 8
(7,633 Views)

Sorry for the late reply, I did not see your message coming.

 

--> We made sure that the names were unique for saved channels...

 

L.

 

 

0 Kudos
Message 8 of 8
(7,502 Views)