LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need help with this program

i am currently working on my bachelors degree and need to write a LabVIEW programm for my project. i want to analyze the values of a force sensor over a set duration multiple times and then write minimum and maximum force, the standard deviation and the median with timestamps in an excel file. additionally i want an electrical input signal to trigger a recording of the force in real time (like 20 samples a second over a few seconds). i managed to write the part that calculates the min, max, median and standard deviation. My problem lies in the measurement duration part. i want to calculate said values over a certain time, lets say 30 seconds. then write only these values in the excel. i dont know how to output a value after calculating it for a set amount of time. after writing the values into the excel file, i want the current values of the program to reset, in order to calculate new min, max, median and standard deviation values.

i would really appreciate it, if someone knowledgeable in this sub would help me out. here again the requirements:

-sensor input from daqmx

-analyze the signal regarding min, max, median, standard deviation

-write min, max, median, standard deviation into excel file after the end of the measurement duration

-recieve input from daqmx to trigger the recording of force over a set time to plot a graph later. (if possible, recieve signal and then record two seconds before input and after input of the signal, maybe that works by constantly writing and rewriting an array)

i did not learn LabVIEW during the regular curriculum of my engineering degree, which is a shame, the program is incredibly powerful, sadly i dont know enough to fully take advantage of the software provided. if someone is willing to help me out i would be incredibly greatful. please just write me a pm or comment under this post. any advice would be appreciated.

0 Kudos
Message 1 of 9
(1,372 Views)

@shaoo11 wrote:

 

... need to write a LabVIEW programm for my project.

 

I did not learn LabVIEW .... any advice would be appreciated.


If you did not learn LV, how do you expect to write a program with it?
Perhaps you should choose a computer language that you did learn.

 

Good luck.

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 2 of 9
(1,350 Views)

Any programming language has a learning curve. If you want to learn LabVIEW, have a look at the learning resources listed at the top of the forum. At any time, come back, show us what you have done, and we will point you in the right direction.

0 Kudos
Message 3 of 9
(1,334 Views)

Hello,

 

in this forum it is common sense not to do the homework for others. But we are here to help you solve your problem by giving hints.

So how far did you come? What have you done yet?

Please attach your code (or a simplified part of it) to show us, where you are stuck.

 

Greets, Dave
0 Kudos
Message 4 of 9
(1,330 Views)

When I was a Graduate Student, I helped a fellow student (a brilliant cell biologist, who became a beloved full professor at UCSF School of Medicine) with a problem in modeling the behavior of some of the cell cultures she was studying.  She had gone to her advisor and said "I need some help modeling and fitting some simple models to the behavior of my cells.  Can I ask a fellow graduate student for help on this section of my thesis, acknowledging his participation?".  The answer was, of course, "Yes", and I am so acknowledge.

 

Do the same thing.  Go to your Professor(s), explain the situation, maybe convince them that the School of Engineering should require that all Engineering Students should take a class on using "LABoratory Virtual Instrument Engineering Workbench"es.  If you don't want to do that, find someone (a friendly graduate student or faculty member) who can give you a crash course in LabVIEW -- it is not difficult to learn, and you should already have some concept of programming, repetition, knowing about numbers, text, logical thinking, etc., so you just need (guided) experience in the "mechanics" of LabVIEW programming.  Because it is visual, it is pretty easy to pick up, particularly if you have a little "experience guidance".

 

Bob Schor

Message 5 of 9
(1,296 Views)


While all of the advice given so far is good advice, let's focus in on Altenbach's. Take a look at the learning resources available and take a stab at your project. Then come back, show us what you've done, and we can help you refine it and fix mistakes. Even if it's just a shell it will give us something to work from.

 

Now for your requirements list, here are some links and things to consider. If you take these and string them together it will be a good start on your project.

 


-sensor input from daqmx


Start with the DAQ Assistant. It should get you to the point you're talking to the hardware at least. Spend some time making sure your data is coming in correctly and you are getting what you think you are.

 


-analyze the signal regarding min, max, median, standard deviation


Once you get your signal from DAQ Assistant, there is a "Statistics Express VI" that you can configure. You should be able to feed the signals out of your DAQ assistant directly into your configured statistics express VI.

 


-write min, max, median, standard deviation into excel file after the end of the measurement duration


Again, there is an express VI to handle this: Write to Measurement File. If that doesn't seem to be doing what you want, an alternate is to create a CSV file using the Write to Delimited Spreadsheet VI. Just make sure the file name ends in .CSV, and that the delimiter is wired in with a comma and Excell will be able to read it natively.

 


-recieve input from daqmx to trigger the recording of force over a set time to plot a graph later. (if possible, recieve signal and then record two seconds before input and after input of the signal, maybe that works by constantly writing and rewriting an array)


Unfortunately for this one I don't have a simple express VI to hand you, as the way to solve it depends on a lot of different factors like hardware and other requirements.

 

And, if you are going to be using all of the above express VIs, it is worth understanding Dynamic Data Types in LabVIEW.

 

It is worth noting that the above tools are meant to extremely easy to use, but sacrifice some performance and functionality in the name of that ease. If there is a task you can't resolve using these express VIs, there is almost certainly a way to accomplish that task without them. Just post here and folks will help you.

 

Finally: If you want good help, post your code!  It doesn't matter how rough it is, it at least gives people here a starting point. And, the more effort and consideration you put into your initial post, the better responses you will get. Little to no effort will usually result in being told in no uncertain terms that we are not here to do your homework.

 

Best of luck in your project

Message 6 of 9
(1,275 Views)

@BowenM made some very helpful suggestions.  However, if you plan to use LabVIEW and want to learn it, I must respectfully disagree on two suggestions of his, namely using the Dreaded DAQ Assistant, and its evil twin, the Dynamic Data Wire.

 

Instead, I'd recommend learning how simple DAQmx ("real" DAQmx) can be by downloading and reading "Learn 10 Functions in NI DAQmx and Handle 80% of Your Data Acquisition Applications" (or words very close to that title, easily found with a Web Search which should "lock in" after about 5-6 words).  Yes, the first section mentions the Dreaded DAQ Assistant, but ignore that and read the next few sections.  Most simple DAQmx loops need only 4 or 5 functions -- Create DAQmx Task, maybe Start Task, DAQmx Read/Write, and Stop (or Clear) Task.

 

If you are sampling data, learn about the Waveform Type, which bundles data samples (Y, an array of Dbl) along with the sampling time (dt, 1/(Sample Rate in Hz)) and the time (t0) that the sample was acquired.  This is much simpler to use (in my opinion) than the Dynamic Data Wire.

 

Bob Schor

Message 7 of 9
(1,191 Views)

I don't disagree that the DAQ assistant is always a poor choice, and that learning DAQmx is the better option... but... there's a limited amount of effort that an undergrad student realistically can do with a single project in a class. Without knowing LabVIEW at all, the best I could expect for a project is to make it work by whatever means.

 

I feel like too often here and other forums we end up soapboxing on what is the "correct" way to do something. This has become so common it is pretty much a running joke. Sometimes you just need to make something work and you can learn the right way to do it later.

0 Kudos
Message 8 of 9
(1,151 Views)

I do agree with @BowenM in this case, though I preach to users to stay away from DAQ Assistant.

 

It is just sometimes easy to get up and going instead of learning the best and proper way. An analogy would be programming a microcontroller using a simple GUI tool than learning all the opcodes etc.,

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 9 of 9
(1,140 Views)