LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Aligning data on a file

I have a single file to which 2 different set of data will be written.

The 1st one prints the 1st row, which has "Time" and channel numbers. The 2nd one prints the corresponding values for every iteration.

Im having problems aligning the channel numbers to the corresponding values.

I have attached the o/p file and a screenshot of the VI that prints the 1st row(thats where the problem is, i think).

In the VI, "Input" contains the channel number in the form of "101" etc.

Can someone help me with this?

 

 

 

Thank you,

Eureka

Download All
0 Kudos
Message 1 of 3
(2,419 Views)

Your problem is that the first line consists of spaces separating the channel numbers and the values uses tabs. I don't know where your "input" is coming from, but wherever it is, change it to use tabs and not spaces.

 

Also, learn how to actually write LabVIEW code, not text-based code using icons. You do not need the sequence frame, or the local variables. The first frame is completely unnecessary.

0 Kudos
Message 2 of 3
(2,416 Views)

Eureka,

 

You also need to be mindful of how you manipulate your array. If you look closely at your code, you may notice that you added "Time" as an element to the front of your 1st row. This will shift the entire row over by one element. To correct this you can add an element to the second row just like you did to the first. Even if the text is "       "  <spaces> This should help along with smercutio's suggestion.

 

Kyle K.

Product Manager for Product Data
National Instruments
0 Kudos
Message 3 of 3
(2,383 Views)