LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing to text file problem

Hi, i am fairly new to daq in Labview. i have labview 8.0
 
i have uploaded my programme, it uses an encoder attached to an engine. i also uploaded the text file to show you how it writes.
 
everytime the encoder pulses, 720 pulses per rev, it takes in 2 analogue voltage input readings, so acts like a triggering source. it also takes in one set of thermocouple readings from 4 thermocouple. it takes in one set of thermocouple readings as it is traditional daq and is integrated which daqmx, but this is not a problem.
 
the encoder also pulses at top dead centre (TDC), so once per rev as well.
 
the programme works fine in reading in the data, but there is a problem in the text file when it writes to it.
 
in the text file it writes the data for the 720 pulses and also the 2 analogue inputs and the thermocouple inputs, but does not write the data for the TDC count.
 
i think it is something to do with the 'insert into array.vi' icon in the bottom wire loop for the TDC count.
 
i have rang NI, but they say that i have to look at it myself, but i am getting stuck because i am not familiar with labview
 
any suggestions would be most appreciated, thanks
 
Notay

Message Edited by Notay on 09-04-2007 07:10 AM

0 Kudos
Message 1 of 3
(2,414 Views)
I think the Insert into array you do right before the Array to spreadsheet is wrong. You are inserting a new row and I think you want to insert a new column. Even if you fix that, you are going to get some weird results in the data file because the number of rows in the top acquisition loop are going to be different than the number of elements in the bottom loop. Why don't you put the counter read in the same loop as everything else?
0 Kudos
Message 2 of 3
(2,383 Views)
hi Dennis, thanks for your reply,
 
i initially had the counter in the same wire loop but there was a problem with the rate for some reason and hence it was put in a different loop. should this make much difference to the vi?
 
i will have a go a sorting the insert into array out as you stated and get back to you.
 
thanks
 
Notay
0 Kudos
Message 3 of 3
(2,367 Views)