06-08-2010 03:01 PM
Hi.I am new to LabView.
I have to write a program to incorporate between Elvis and LV.This program is designed for first year students.Every student should create a test file in labview containing a sin wave -DC offset etc ...then they should use the NI ELVIS oscilloscope to see the wave and plot the results on a test sheet.This test sheet(which should be designed in LabView)n should be self marked so when the students filled in the approprite parts the answers should be marked by the program .
From my basic knowledge I think I have to use Excel with LV .I have also use ELVIS as a DAQ device but I dont know how to start and how to use Excel ,also how to make a self marked system in labview.
Any help really appreciated.
Solved! Go to Solution.
06-09-2010 04:57 AM
Hi en99,
You should look at some of the training material online for some help getting started, for example:
http://zone.ni.com/devzone/cda/tut/p/id/7466 - good starting guide for students.
http://digital.ni.com/manuals.nsf/websearch/348FFE6BA9C9771A8625748E004B5555 - getting started with ELVIS
http://decibel.ni.com/content/docs/DOC-7332 - example to put data in a spreadsheet
If you search on www.ni.com for "getting started" then the product there are many helpful guides and tutorials.
Let me know if you have any more specific questions about LabVIEW.
Kind regards,
06-10-2010 06:30 PM
Hi Owen
Many thanks for your reply.I wish I had time to start from beginning ,unfortunately I have to do it as soon as possible.
I have made this sample vi to show what I need to do.
This is the basic program
students should first specify thier group then a wave automatically will be generated and they can observe the wave using NI Elvis Osciloscope then they should fill in the phase ,amplitude and frequency sections and then click Ok.The radio button is in off state so after clicking ok if the answer is correct it will illuminate like below
What I could do up to now is
1.
using Simulate Signal and DAQ I could generate a signal in LV and see the generated signal using ELVIS OSC.This is a picture of generated signal.
As can be seen it is not a perfect sin wave and I dont know how can I fix the problem.When I use Front panel graph with the generated signal in LV ,the graph shows a perfect sin wave but when I use DAQ Assistant (analogue output) I cant get a perfect sine wave in Elvis.This is my first problem.
2.Also as can be seen is test program.when a student specify his/her group and fill in the wave detail parts the program should automatically read the cotrrect values from an excel file and compare student values with the correct values and then change the radio button state if the answer is correct.My first problem is how can I do this comparison process..secondly how can I read the correct values from the excel file.I could read values from excel using ReadfromSpreadsheet.vi but I don't know how can I have access to data of every column because I need to compare them one by one with the student values.
I have attached this test file to this post
and again sorry everybody for this long post.I know most of my question are very basic but undfortunately I am completely lost and I dont know how to start.Any help really appropriated
06-10-2010 10:44 PM
Did you take photographs of your monitor for a screenshot?
How are you running this VI? It runs one time. Please don't tell me you are running this by way of the Run Continuous button.
Your VI creates on cycle of a sine wave and sends it to the DAQ assistant which outputs that signal then stops. When your VI runs again, it will repeat that all over again, but there is going to be a slight delay, partially because it needs to recreate the signal in the Simulate signal Express VI, but also because you are writing data out to a file which might taken longer to write then it takes for your sine wave to generate.
You really need to look at some online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
Also look in the Example Finder for DAQmx examples. Particularly ones that mention continuous generation.
06-10-2010 10:53 PM
I think that if you go to continuous sample mode, your sine wave will look better.
Without seeing your csv file, it's a little hard for me to understand. Is the group number in a column with these other values on the same row? If so, you could use the index array function to get this column and then Search 1D Array to find the group. That gives you the row to index out the other values.
p.s. You really don't have much choice except 'Starting at the beginning'. There is no existing example that does what you want and this forum isnot a code writing service. You'll have to write the code yourself and attach more than a whole bunch of disconnected contols and indicators.
06-11-2010 04:48 PM
Many thanks for your help.I have started with the tutorials.They were really usefull.I could make a new program .It can read the valuse from the spreadsheet file and
compare them with the user inputs then if the answer is correct or near the correct value the radio button starts to illuminate.
I have attached both the vi and the excel file.The only problem left is I would like to generate different type of waves for different groups.For example a sine wave for group 2,4,6 and square wave for group 1,3,5 .Using stimulate signal I can choose the signal type manually but in the actual program signal type had to be choosen automatically after choosing the group. Would you please help me how can I generate different type of signals?
06-11-2010 05:34 PM
Don't use the Express VI. There is a Basic Function generator on the Signal processing / Waveform generation palette. You use an enum to choose what type of waveform you want. So you just need a case structure or a select statement to choose the correct enum based on your data to feed into that.
You could also continue to use the different express VI's one for each waveform type, just place each one in its own case of a case structure. Again using your data to select the correct case.
06-12-2010 12:10 PM - edited 06-12-2010 12:13 PM
And CLEAN UP that block diagram. Don't let students think that is a way LabVIEW programs should look.
Just a few minutes of work and I had this:
p.s. What is the challenge in this exercise? All that has to be done is copy the data in the indicators to the controls.
06-16-2010 07:17 PM
06-16-2010 07:33 PM