Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Excel and Graph School Project

Hello,
This is a project that I'm starting to work on for a school project. We only get the extreme basics in LabVIEW, so I'm flying blind on this one. I'm hoping there someone that could point me in the right direction.
This project is an small motor Dynamometer that uses a 6221 and SCB-68 DAQmx LabVIEW interface. Here is what I want to achieve:
 
After starting the program the user is welcomed and upon clicking OK the DAQ sends a signal to a solidstate relay to start a small motor. Attached to the motor is a small generator, and as the motor ramps up the 6221 will take around 250 voltage readings from the generator and and log them (in excel... or whatever is easisest). These data points will be taken over a 20 second time interval, and at the end of that interval the relay will be disengaged. After this task is complete, the logged data will be read and graphed after curve fitting the data (some noise from the generator causes error). When this task is complete, the user is promted to save the data file, then promted again if they would like find the stall torque of the motor. If the user clicks ok, the 6221 sends a signal to two different solid state relays ( to engage a motor and a solenoid) and reads the resistance from a load cell, then displays the data below the previously graphed data, promts the user to save the data, then the program ends. If the user clicks no, the program ends.
 
 
I don't believe it will be a difficult task, but I don't have any advanced training, so any help would be very much appreciated. I have about 7 weeks Smiley Surprised from July 3 (today) to complete this program.
0 Kudos
Message 1 of 6
(3,608 Views)

Hi jray3475,

Before going straight into developing your application I would highly recommend you go through the Getting Started with NI-DAQmx series. Both these documents along with this video can provide you with a solid foundation for starting to build your application.

As for your specific application, you should be able to use a series of DAQ Assistants to control the relays using the Digital I/O ports and also perform an Analog Input operation to read your 250 voltage points. As for logging data you should be able to use the Write to Measurement File express VI to log to a text file. All your decision making can be done using case structures and while loops (all covered in the LabVIEW in 6-hours training).

Please post back if you have any specific questions.


 
Abhinav T.
Applications Engineering
National Instruments India

LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
Measurement Fundamentals
0 Kudos
Message 2 of 6
(3,592 Views)
Thank you for your time and reply Abhinav, it is very much appreciated. I'll start going over the presentations today. When using the DAQ assitant, how do I stop the function? Do I place all of these items in loops somehow, so after the number of data points acheived it stops, and the next process starts? I'm not sure how to prevent all the processes from starting all at once. Thank you again for sharing your knowledge, I'll start reviewing the recomended information.
0 Kudos
Message 3 of 6
(3,586 Views)
jray3475,

I think alot of your questions will become alot clearer once you have gone through all the material I point you to.

Essentially you will beed to setup a finite acquisition call in the DAQ assistant. This function is a blocking call and will not finish until all your samples are completed.

You can ensure that function calls happen in a certain order by using the error clusters. VIs will not execute until all input data has been received and if you create a data dependancy using the error clusters you should be able to give all functions an order. Below is an example of that.


Message Edited by Abhinav T on 07-04-2007 10:18 PM

Abhinav T.
Applications Engineering
National Instruments India

LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
Measurement Fundamentals
0 Kudos
Message 4 of 6
(3,564 Views)

The VI has been coming along well.... except a few issues. Turns out I need 15,000 data points when acquiring the generator voltage, which is no problem. The problem has been graphing the data from the excel file after manipulating the data. I use a "read measurement" to pull up the data and manipulate the time and voltage readings with equations and then curve fitting. My goal is to plot speed vs time, the torque vs time, and power vs time. I would like to plot the torque and power curves on the same graph. I have not had any luck at all with the graphing. I'm not sure what I'm doing wrong, but all of this is done in a sequence sequence structure to make sure things happen one at a time, it is recording the voltages and times correctly. I'm on the verge of just inserting a macro and plotting the data in Excel, but I'd like to plot it in LabVIEW. Any ideas? Thanks so much for your time.  My equations are:

T=J*α/gc       

Where:

J

= Mass moment of inertia (lb-in^2); α = Rotational acceleration (rad/s^2); T = Torque (in-lbf); gc = Gravitational constant

___________________________________________

w=V/km

Where:

V

= Voltage (V); w= Rotational speed (rad/s); km= Motor constant (V-s/rad)

_________________________________________________

α=Δω/Δt

Where:

α

= Rotational acceleration (rad/s2); Δω = Change in rotational speed (rad/s); Δt = Change in time (s)

____________________________________

P=T/ω

Where:

P

= Power (lbf-in/s); T = Torque (in-lbf); ω = Rotational speed (rad/s)

_________________________________________________
0 Kudos
Message 5 of 6
(3,523 Views)

Hi jay3475,

 

To address the issue at hand, please describe the actual problem that you’re having when plotting the data.  Are you using a waveform graph or a waveform chart?  Is it not displaying properly?  Are you receiving an error?  As long as your x-axis and y-axis have the same units for all of the plots that you are trying to display, there should definitely be a way to get it working.  If they do not have the same units, it may make for a more meaningful presentation to display each piece of data (voltage, power, torque, etc.) in a separate plot.

 

Please post back with further clarifications.  Thanks!

 

Regards,

 

Ed W.

Applications Engineer

National Instruments

0 Kudos
Message 6 of 6
(3,501 Views)