Jump to content

Case structure and Timers


Recommended Posts

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 :D

Download File:post-5187-1149248210.vi

Link to comment
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

Link to comment
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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.