Filenapper Posted June 2, 2006 Report Share Posted June 2, 2006 Hi, I have the following question, For my practical training assignment i have to make a program with labview with the help of a NI-DAQ card. The program has to measure a analog signal and show it in a waveform graph. And it has to have the option to export the measured values to a spreadsheet. It also has to send out I/O signals with the daq device to remotly control a fraction collector. Now i have the following problems i cant get the measuring to occur every 100ms, i think its because the measurement reacts to another timer in the program wich has to send a I/O signal for a given time. And the second problem is that i have to send the values to a spreadsheet, but i don't know how to collect the values so that i can export them all in once. I'm really a newbie to labview so i don't know everything about it and i'm supposed to have it done in a week or so. An i'm really stuck so i would aprecciate it if someone could take al look at it and give me some pointers. Thanks, Filenapper Download File:post-5187-1149248210.vi Quote Link to comment
Gary Rubin Posted June 2, 2006 Author Report Share Posted June 2, 2006 Now i have the following problems i cant get the measuring to occur every 100ms, i think its because the measurement reacts to another timer in the program wich has to send a I/O signal for a given time. You are correct that the second wait is causing preventing the acquisition from occuring every 100ms. One option would be to do the following: -Get rid of the sequence structure. -Put the I/O stuff in a case structure which only executes every fifth iteration And the second problem is that i have to send the values to a spreadsheet, but i don't know how to collect the values so that i can export them all in once. Depending on how long you want to run, you might not want to store it all up, then export at once. Instead, write to file as you go. Check out this example provided in LV7.1: Cont Acq&Graph Voltage-To File(Binary).vi Quote Link to comment
Filenapper Posted June 6, 2006 Report Share Posted June 6, 2006 -Put the I/O stuff in a case structure which only executes every fifth iteration How can i let it excecute every fifth iteration?? :question: Thanks in advance, Filenapper. Quote Link to comment
Gary Rubin Posted June 6, 2006 Author Report Share Posted June 6, 2006 How can i let it excecute every fifth iteration?? There is a function that does integer division and returns an integer quotient and a remainder. It can be found with all of the other arithmetic operations and has an R and IQ on it. Use this to divide the loop iteration value (the little i in the lower left corner of the loop) by 5. Every 5th iteration, the remainder will equal zero. Use a case structure so that the part of the code inside the case structure only executes when the remainder is equal to zero. Quote Link to comment
Filenapper Posted June 7, 2006 Report Share Posted June 7, 2006 THANKS!! It works and i also found a way to export it to a spreadsheet. Thanks again, Filenapper. Quote Link to comment
crelf Posted June 7, 2006 Report Share Posted June 7, 2006 It works and i also found a way to export it to a spreadsheet. I'd appreciate it if you posted a little example snippet of code so if we're ever searching this forum thread again we can see how you did it. Quote Link to comment
Mike Ashe Posted June 7, 2006 Report Share Posted June 7, 2006 This was a good example of how to ask for homework help and actually get it. Good job to Filenapper! Perhaps we should point some of the HH's here as a good real life example. :-) Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.