LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

University project help

Hi, my name is Wesley Ham and I am currently in my final year at the University of Plymouth England studying for a Mechanical engineering degree.

As one of my main modules I have to write a dissertation, and for this I have chosen to encompass both mechanics and electronics in the form of an automated test rig for testing air flow outputs from solenoid valves.

This rig incorporates a pressure sensor a National instruments 6008 DAQ and a Motion control mdrive 17 stepper motor. The rig is controlled by the National Instruments LabView 7.1 software.

See attached flow diagram jpeg and method document  help explain what I am trying to accomplish

As I am not an electrical engineer I have been finding this quite a challenge but none the less have made some reasonable headway. I have however had some problems in getting the LabView code to work properly and need some help, time is running out before the dissertation needs to be submitted and I really need to get over this hurdle.

The code that I have produced so far is also attached to this message (
base design.vi), however as you can see, it is not finished. I think that the concepts are correct but I am having difficulties in getting the code to run. Can anyone give me some advice on how they think the code should be written, am I on the right track?

LabView is available on my university network, however I have consulted the lecturer who teaches the LabView module and his knowledge is more limited than mine. 

It is a simple design and should take no time at all with the help of someone that knows what they are doing.

Regards Wesley

Message Edited by Wes Uk on 03-08-2006 12:43 PM

Download All
0 Kudos
Message 1 of 11
(4,113 Views)

Wes,

My suggestion for a major project like this is to break it down into more manageable sub-projects. Instead of having one big VI, write one that does each part of the project. In other words take each frame in the sequence you have there and make each one VI. Design it, debug it, and leave it alone when you get it to work. Then go on to the next task.

Message Edited by nyc on 03-08-2006 02:12 PM

0 Kudos
Message 2 of 11
(4,096 Views)
Wesley,

Some of the best LabVIEW programmers are mechanical engineers.

Some general comments. Most experienced LabVIEW programmers avoid or minimize the use of sequence structures. Use data dependency or a state machine instead.

In Frame 0 a single Write to File would be sufficient. Concatenate can be expanded to create one string from all the inputs, commas, and return. Usually it is better to open the file at the beginning of the program, do all the writes, and then close the file at the end. Opening and closing the file can be time consuming. Just pass the filename or file refnum from one write to the next.

In Frame 1 if "Write" is false, why initialize the port, do nothing, and then close the port? Put all of that inside the case structure. As with files it is usually better to initialize the port at the beginning, pass the reference to the read and write nodes and then close at the end. You also do not need two sets of port parameter controls if you do it this way.

Frame 2 with for loop, subFrame 0: No data dependency exists between the 200 ms delay and the data write. You do not know which will execute first. (This also applies to the delay in the next frame.) The write to solenoid and the read pressure could occur with no delay, 200 ms delay, or 400 ms delay between them. The dealys will always occur but might happen before or after the DAQ calls.

SubFrame 1: "Failed Valve" is not connected to anything. The Stop button does not do anything. You cannot stop a for loop. If you need to stop a loop, use a while loop.

Lynn
Message 3 of 11
(4,083 Views)

Thanks guys, I'm currently trying to break it down into Sub VI's

I am having problems getting my stepper motor to respond to the strings I send it, I does work when I use the software supplied with it, however LabView isn't quite as fortunate

Any ideas?

Cheers Wes

0 Kudos
Message 4 of 11
(4,071 Views)

If you are using a serial port to talk to the motor, try using portmon to watch both programs talk to the device.

http://www.sysinternals.com/Utilities/Portmon.html

0 Kudos
Message 5 of 11
(4,061 Views)

There seems to be a fair number of people out there who are in the same situation as you - in school needing to drive stepper motors to get a degree. It's beginning to sound like a class assignment. Smiley Wink 

Anyway here are couple of the other recent discussions that have been centered around the "I can't talk to my stepper motor over a serial link" topic:

How can one write text commands to a usb device through VISA?

Sending a Character through Serial

Perhaps you can find something you can apply to your project discussed in one of them.
0 Kudos
Message 6 of 11
(4,034 Views)

Hi! I am a student in the first year of university. We have to learn LabView and i am new so i don't know very much. Here is my "problem": we have to do a project by our selfs with what we learned. (we learned: While loop, formula node, for loop, case, flat and staked sequence, how to change and create an icon, about controls and indicators, clusters, array - the basic things). We have to use 5 things that we have learned and 2 new things. I have make a project but my prof. says that is too simple (and i agree) beacouse i'm a rookie. I attach my project ... can you give me some tips how to improve my project ? or if you have a better ideea i'll be glad to hear it ... (i am from Romania ... sorry for my bad english)

PS: I use LabView 7.1

0 Kudos
Message 7 of 11
(3,508 Views)

Hello again! i got an ideea how to make my project more complex. Here is the ideea: With a camera inspect the resistor and the camera reads the 4 colors ... and then i can make a program to measure the resistor. Have you any ideea how could i make that work ... ? 

0 Kudos
Message 8 of 11
(3,487 Views)

SparX

 

You know the While loop and the Case Structure,

Look at the help to see what an enumerated control is (1 thing to Learn)

With these 3 things you can make some very complex code using the State Machine Architechture (look up "State Machine" in the Examples).

Use the numeric and boolean palettes to add complexity to your project.

(If this, then do this, Scan n resisitors, wait for button to be pressed to state machine to move on to next state.) - Is sequence of Resistors the expected one (index an array into a for loop).

Use you imagination and make something that looks complicated, but is actually very simple.

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 9 of 11
(3,483 Views)

I'd forgotten about this tool, thanks "Uncle".

 

link that works is http://live.sysinternals.com/

then download                    portmon.exe

just the job for my IRDA problem.

 

Wes - You show those Electrical engineers that we Mechanicals can do LabVIEW, and can beat them at their own game!

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 10 of 11
(3,482 Views)