Jump to content

multiscanning


Recommended Posts

hello. I am really new to labview (actually this is the first program I was asked to do). The problem is as follows: I have to acquire data from 4 channels and then write them to a file (and plot them). I think I have managed to do that (more or less) but what my (childish) program is doing is acquiring every 8 sec till i press the stop button. What i am asked to do is to use a ready vi ( or create my own if i wish!) where someone can select how many points to acquire and then the programm shoud "drive" him to the next vi where the acquisition is made. I really have no clue how to do that (and that is just the beginning as i was told!) I am really new to that (using labview 7.1) and really frustrated so any hints would be really helpful. Thx in advance

Link to comment
  • 2 weeks later...

Hello again and really thx for your help (I was away on a trip so it's only now that i managed to check the program!) The programm you created is almost what I want but I have a problem. I do not seem to understand HOW i ...convince it to acquire ALL four channels at the same time. I suppose it's a simple command or s'th but i am not quite sure how that can be done. Btw, since I saw that you are using Labview for 6 years or so perhaps u can provide me with some help considering online help or books I can refer to?

Thx in advance

Link to comment
Hello again and really thx for your help (I was away on a trip so it's only now that i managed to check the program!) The programm you created is almost what I want but I have a problem. I do not seem to understand HOW i ...convince it to acquire ALL four channels at the same time. I suppose it's a simple command or s'th but i am not quite sure how that can be done. Btw, since I saw that you are using Labview for 6 years or so perhaps u can provide me with some help considering online help or books I can refer to?

Thx in advance

First The software is set up to take 4 readings at a time from a standard NI Multifunction DAQ card. To change the number of channels you need to edit the AI Config:physical channels constant on the left side of the screen. Look up Physical Channel Naming Convention in the help menu.

I was taught an LV programmer with like 10+ years expereince so I never had to go through the pains of learning on my own. There were some things that helped though.

1. Take a LV training course if you can afford it. Although I do not agree with alot of the practices they teach, it will help get you familiar with the functions and enviroment and more importantly give you the confidence you need to really experiment in LV. (BTW I hope you didn't buy the sales pitch that anyone can program LV. While anyone can do something in LV it takes training and experience to do it well. Like anything elser.)

2. Learn the array functions inside and out. This is the most important function in LV since almost all data is in an array.

3. STATE MACHINES!!! Use this style of programming in LV. The example I provided above is a style of state machine. Walk through it get know how it operates. I personally hate the LV style state machine and most other floating around the net (See KISS).

3. Use the K.I.S.S. (Keep It Simple Stupid) method. If you can do it with a simple array function then do it with a simple array function. Do not use LV qeueing or other complex functions unless they make your program simpler or greatly improve performance. Usually though they add another uneccessary layer of complexity.

4. Search for examples. NI provides some good examples. Pick them apart and figure out how they work.

5. Use the help menu in LV. They offer alot of good resources.

6. Participate in this forum and the NI forum. There is a wealth of knowledge and experience that you will not find anywhere else. (Lava is much better than NI) If you can't find an example in LV than look here.

Another thing, post examples of your code and ask for opinions. This is the easiest way to see what your doing right and wrong. For instance if you provided an example of what you tried in this post it would be easier to give you the answers you need.

Share what you have learned! I cannot stress this enough. I know more than many of my conterparts because I do share information. Many of them believe they need to keep what they have learned secret to secure there jobs. NOT TRUE. I keep my job by becoming better at it and I become better at it by sharing information.

Lastly, check out this website. I only read a little bit but it seemed pretty well done.

http://www.upscale.utoronto.ca/GeneralInterest/LabView.html

Also I just found this FAQ searching around on LAVA.

http://forums.lavausergroup.org/index.php?showtopic=239

Link to comment
  • 2 months later...

Hello again. Still trying to figure out things. (See, i'm not actually working but I am still in my post-graduate studies!). unfortunately i cannot afford any lessons on labview [and the research team i belong doesn;t have enough money to afford it!]. Anyway, I've been trying to figure out how your program works so I tried to insert a "write .lvm" just to check out ...numbers. It seems to be done but still i cannot figure out what these numbers are! Whether it is indeed a measurement the way I want it or a wrong signal. Plus, I tried to see the logic of the program by pressing that "lamp" (and, according to labview help!, watch the programm running. When I do this it never seems to reach the "Acquire Data" case and i cannot really figure out why. Plus, i tried to test it by putting "8 sec/sample" and "1 samples" in the set up menu. There is "something" going on but seeing the results in the .lvm file plus that latest test, i am not sure whether it actually takes ,eg continious samples for 8 sec, averaging them at the 8th second and indeed gives the mean value. Is that the case?

If so if I put "5 samples" instead of "1 sample" then what would that 5 samples be? 5 times the same (average) measurement? :unsure: I have a few more questions (such as why does it stop after each measurement? ) but i believe these questions are more vital right now :)

Any help would just be really appreciated.... :blink:

:throwpc:

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.