LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need guidance in getting data from condition and while loop

Solved!
Go to solution

Hi,

 

I prepared code for multichannel by using COMM4, and now I am stuck in getting data from the condition loop and while loop. As I tried to get it within a while loop it is giving "To save file" after every iteration and also overwriting it means when I stopped the code to check file it gave only one row of data points.

kindly please guide

Hasham

0 Kudos
Message 1 of 61
(826 Views)

What are you trying to talk to?  What exactly is the messaging protocol (how the data is formatted)?  I have many concerns, but I would like to have the real details before I give any actual advice.


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
Message 2 of 61
(808 Views)

Hi 


I'm not able to open your file, can you please save it to version 2020 ? 

 

As for the save data, there is a boolean input on the file function APPEND to file. 

If this is true, it will add additional data as more lines. If this is set to false it will overwrite the previous data with the new one, that's probably what is happening with your code. 

 

I would be able to give more input about the condition after you provide an updated version file. 

 

 

Message 3 of 61
(803 Views)

hI,

 

Thanks for your reply. Data is in the form of array within a FOR loop after that conditional Loop and then while loop and when I am connecting Write sheet.VI after FOR Loop within conditional loop then it is giving only one row of data. and when I connect same VI out of all loops then it is giving multiple rows of zeros and before opening the excell file also show message that file is very large it will lost data if you save it.

I also attached code with this reply. 

0 Kudos
Message 4 of 61
(751 Views)

Hi,

 

Thanks for your reply; I attached the requested version of the code. Please guide me as I am stuck on this step.


kind regards

 

Hasham

0 Kudos
Message 5 of 61
(749 Views)

Notice the input on pin 9 of this function:

paul_a_cardinale_0-1719365483028.png

The default is to overwrite.  Wire a True constant to append.

Message 6 of 61
(739 Views)

Hi,

 

Thanks for your reply and yes, it's working. If I need whole data after complete run as by connect true to append it is saving data of every iteration but same time it is popping message to save it. Please guide if I need full data after complete run.

Kind regards

 

Hasham

0 Kudos
Message 7 of 61
(729 Views)

Hi Hasham,

 


@Hasham622x wrote:

If I need whole data after complete run as by connect true to append it is saving data of every iteration but same time it is popping message to save it. 


What about reading the LabVIEW help for this function?

All its inputs are explained and also the behaviour for default input data is explained!

 

The message pops up because you forgot to wire a (correct) value to one of the inputs of that VI!

 

Btw. marking your own message as solution while still asking questions seems not reasonable to me…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 61
(719 Views)

Yes, Sorry, I accept it it's my mistake to tick my question as a solution.

 

If you don't mind, could you please guide which input pin, I should connect to write a delimited spreadsheet.vi.

 

Kind regards

Hasham

0 Kudos
Message 9 of 61
(709 Views)

Hi Hasham,

 

when it asks you for a filepath then you probably forgot to wire a (valid) filepath…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 61
(705 Views)