From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Playback file reproduction on cRIO

Solved!
Go to solution

Hi all,

 

I'm looking for some example on how can reproduce a file (with two columns : time stamp and value) on cRIO.

The idea is reproduce the data recordered from the filed in the lab.

 

Someone can help me?

 

Thanks

 

0 Kudos
Message 1 of 7
(2,403 Views)

What is the format of the file?  How accurate do you need the timing on the output to be?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(2,387 Views)

Hi,

my sample time is 5msec and the file format is a *.txt file.

 

Thanks

0 Kudos
Message 3 of 7
(2,358 Views)

Hi zundap,

 

so you want to create the same kind of file with the same file format as has been done on your other laboratory computers?

Why don't you use the very same VI to do so?

 

(When the VI was created with "reusability" in mind that should be no problem!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(2,354 Views)

Sorry, there is a misunderstanding.

Let me explain better.

I recieve a file (*.txt format) with 2 or more column : time stamp (T=5msec) and value (e.g. volt value)

I need to reproduce the condition in lab so I use this file as data source to stimulate the equipment (target) in lab.

My cRIO project must read this file and generate the same signal (Volt) with the same occurancy (T=5mec) to stimulate the target.

 

 

 

0 Kudos
Message 5 of 7
(2,351 Views)

Hi zundap,

 

so you need to read the file on your cRIO.

Then use a loop to output the analog voltage at the right time…

 

What have you tried? Where are you stuck?

Do you have any specific questions?

Did you transfer the file to your cRIO already? Do you know it's a computer of its own - with all consequences?

How do you use your cRIO? ScanEngine? FPGA?

Which LabVIEW version?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(2,347 Views)
Solution
Accepted by topic author zundap1970

You'll need to parse the file, to get an array of timestamps and an array of values. Then, for each timestamp, probably subtract T0, to get relative times. Then, for each entry, set the voltage, and wait the next dT... Then fix details until it does exactly what you want....

 

Instead of parsing the entire file, you could read a line, 'execute' it (set output voltage and wait) and then read the next line. This will probably be friendlier on memory and real time behavior.

0 Kudos
Message 7 of 7
(2,344 Views)