LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

load from ascii fails

Hello,

I want to import 2 Signals from an ascii file. The Ascii File looks like:

A   B        C
-------------------

1   234    1.324
2   234    1.234
3   563    1.578
4   643    2.324
5   734    3.234
6   832    2.234
7   923    1.234

I use the Express Vi "Load from Ascii".
First Signal:         B y-values, A x-values (time)
Second Signal:    C y-values, A x-values(time)

In the Express VI itself everything works fine.

But if I start the whole programm it says:

"Error -90904 occurred at an unidentified location
This error code is undefined. No one has provided a description for this code, or you might have wired a number that is not an error code to the error code input."

This only happen, if I set A to the y-values. (but this is important)

How can I prevent this error?
Thanks

0 Kudos
Message 1 of 6
(2,980 Views)
Hi,

I couldn't find the 'Load from Ascii' express-vi on my LV8.2.

To load such a 'simple' ascii file I would do this:
- load the whole file (if it's not too big)
- strip the first 3 lines
- convert the rest using 'spreadsheet string to array'
- get the needed columns by 'index array'

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(2,975 Views)
Oh sorry, I forgot to mention, that this VI is from the System Identification Toolbox.

Now I want to create a waveform and i need the samling time for this.

How can I insert the first column (time) to be the X-Value of the waveform?
0 Kudos
Message 3 of 6
(2,972 Views)
Hi Myjestic,

the waveform datatype just takes t0, dt and an array with all y-values. So you just have to give start time and time between samples instead of the full X-axis (=your first column).

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,964 Views)
🙂 okay

than, how can I calculate the average dt between the single values of the first column (time)?
0 Kudos
Message 5 of 6
(2,959 Views)
Hi,

the A column seems to contain only integer values:
1st method) take (last_time-first_time)/number_of_samples (easy way, when dt is roughly the same for all samples)
2nd method) calc the difference between two consecutive time values and get the mean of all these dt-values (there's a Mean function somewhere in the palette)

Best regards,
GerdW


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