LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cell xy define a value

Hi, I am a new in LabView and wuld like to ask some questions,

have one txt File (see Attachments) with Values and I shuld putt those in one Table. Is it posible to define X and Y destination for ond Value, if Yes, HOW?

The Table shuld look like Attached JPG. Problem is, the txt File have, sometime, more Columns. The SN123xxxx_LG Nr. is going to be used as Parsingcriteria for Value import and the Data(Value) shuld be written in Table under the Time (00:15, 00:30, 00:45,.......) which is in the front of the Line in txt File!< 

 

THX

Igor 

Download All
0 Kudos
Message 1 of 14
(4,172 Views)
Use the read from spreadsheet file function and wire it to a table on your block diagram. I'll work up an example in a few but its pretty self explainatory
0 Kudos
Message 2 of 14
(4,167 Views)

Hi Igor,

you can use the "read from Spreadsheet File.vi" to get your data into an array. Then you can use the Array function to create the structure you need.

 

Mike

0 Kudos
Message 3 of 14
(4,166 Views)

Hi and THX,

 read the File is not the Problem! I can read it, I see all the Numbers, BUT I have to be able  to every single Number in Table (XxY-> in this case Time x SNxxxxx) as a VALUE!

Text File have 96 Points (Values) pro Day for every single Device (SNxxxxxxxx), I need the Nubers as a Value because I should use them later.

 

THX

0 Kudos
Message 4 of 14
(4,150 Views)

hmmm, is it posible to take the File a Part, for Exempel to create 96 single files to look like this:

 

2009-02-07 12:15:00

 

SN95279523= 7260000.0000

SN95279522= 72074000.0000

SN95279524= 4315000.0000

 

and so on for every singel Timestemp one file

 

2009-02-07 12:30:00

 

SN95279523= 7260000.0000

SN95279522= 72074000.0000

SN95279524= 4315000.0000

 

and so on.......

0 Kudos
Message 5 of 14
(4,149 Views)
Ah you have lots of files, and you want all of the data for time x to be combined into one file? Is this correct? You can read the data from each file to an array. Then extract the data from the array that you need using different array functions as was said earlier by mike.
Message Edited by for(imstuck) on 03-02-2009 09:30 AM
0 Kudos
Message 6 of 14
(4,145 Views)

Hi Igor,

 

do you want the SN as a number? Just use "scan from string" with format "SN%d".

 

To get all values for one SN simply use "index array" on the spreadsheet data (2d array), as each column represents one SN...

Best regards,
GerdW


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

no, i have one File (see Attachment "test.txt") and I would like to take this File a Part and make for every singel Time one File like:

 

yyyy-mm-dd HH:MM

 

SNxxxxxx= value

SNxxxxxy= value

SNxxxxxz= value

......

 

Igor

0 Kudos
Message 8 of 14
(4,136 Views)

Hi Igor,

 

1) read in the file

2) parse the header (aka drop first 3 lines)

3) parse the 4th line containing the serial numbers and store the numbers in shiftregisters (using "scan from string" )

4) parse next line of the file, convert format (aka rebuild text) and store in new file

5) do step 4 until EOF

Message Edited by GerdW on 03-02-2009 09:04 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 9 of 14
(4,107 Views)

Hi GerdW Sounds good, i´l do it tomorow.

 

THX

0 Kudos
Message 10 of 14
(4,099 Views)