04-03-2013 05:31 PM
I think the state machine you are talking about already exists in the program, if you've tested the code with an empty Excel file you'll notice that everything you said can be found in the result except "to skip rows/columns" which is hard to integrate into the program, if you have any suggestions please modify the code i've posted and see what heppens.
Thank you
MGarry
04-04-2013 03:25 AM
Anyone to help me with the program please, i want to skip the highlighted rows/columns to prevent them from being overwritten and specify the range of blocs where i want to write samples, i have been trying to integrate a code to do that using the invoke/property nodes but i couldn't make it.
04-04-2013 06:52 AM
There is no state machine in your code. All your code does is continuously build a table of data in one loop and continuously keep rewriting the whole table to excel over and over. That's nothing like the application you described.
04-04-2013 07:05 AM
If only the skipping function can be added to the code the result will be good, don't you think so ?
04-04-2013 08:57 AM
No, I don't think so. I've attached an example that shows how to acquire data at a set interval and add that data to both a table and an excel file. Note that for this example I modified your file to be an excel template and that I leave excel open while the main program runs.
04-04-2013 10:48 AM
Thanks a lot Wayne this will help me in my application, there is just a thing each time i run the code it opens a new template is there a way to keep using only one template even after stoping and runing the program it should keep filling in the same file (so if something happens suddenly and stops the program we should be able to re-run the program and recuperate all the samples on the same file: No lost data).
I have also noticed that the equations are not working because the sapmles are transfered as String and not as numeric do you know how to fix this?
You deserve a compliment.
MGarry
04-04-2013 11:06 AM
You can modify as needed to resume using a particular file. You will need to add some code to figure out what was the last file used and where you can start adding data. Equations working on my machine so it must be a setting in Excel.
04-04-2013 11:16 AM
Ok Wayne maybe it's something with Excel,thank you again.
MGarry
04-05-2013 05:12 AM - edited 04-05-2013 05:19 AM
I confirm that the functions are not working cause the type string is not supported in this kind of operations, i have been looking into Excel see what's wrong and even followed exactly what is recommended to do by Microsoft support and nothing has changed, i run the VI and samples are written in String type, i was wondering if i could change the type of data from LabVIEW because i tried to adapt the "Set Cell Value" VI to take a numeric in "value" pin but it didn't work, any suggestions to fix this?
Please notice that the attached file shows what samples look like on Excel after being written (the blue cells should contain the average of the 8 first samples).
MGarry
04-05-2013 08:31 AM
Someone to help me please, Wayne said it's working fine in his machine, i did everything i could and it still not working why!!
MGarry