11-20-2015 12:23 PM
The top 5 rookie mistakes are interesting. Regarding "3. Ignoring Code Modularity", I have put together a brand new FGV many times before finally making a re-use library for it. And regarding "5. Disregarding the Need for Documentation"... I'm still a rookie 😞
11-27-2015 02:02 PM
I am in the same lab group as @TheHunted, and have been trying to write a VI for our project that uses a simple state machine instead of a flat sequence structure.
The tutorials mentioned by @Johnnyg17 were very helpful for this, and most of the programming is done now, but there's one big problem that no one in our group knows how to fix. The problem is that after the first case in the case sequence is finished, the case sequence does not go on to the second case. I have looked at the pictures in the tutorials several times to try to figure out what I'm doing wrong, and can't.
I would really appreciate it if someone could point me in the right direction to fix this. I know this is a school project, so please don't do my homework for me! But with it being Thanksgiving Break, I can't ask any of my professors about this right now and my group needs to get this project done soon.
P.S. I've attached the VI, since it's too big to get a screenshot of the whole thing on my monitor.
11-27-2015
02:14 PM
- last edited on
12-16-2024
04:02 PM
by
Content Cleaner
Attaching your code or a Snippet of your code is a million times better than attaching a screenshot. So thank you.
Your code won't go on to the next iteration because you put the DAQmx loop inside of your main loop. This means that you main loop will never finish the first iteration until you end the DAQmx loop. Move the DAQmx loop outside of the main loop and it should work fine.
LabVIEW programming is based entirely on dataflow and parallelism. This is incredibly powerful and has lead to its success over the years (coupled with the graphical programming), but is usually one of the first things that new developers stumble over. The Highlight Execution feature is a great way to watch how your application utilizes dataflow. Looking at your code, watching the Highlight Execution run would show you a lot of issues.
On another note, your Photosensor case has a For loop where each iteration waits until 5000ms multiple for 5000 iterations... This doesn't make sense and would take 7 hours to complete. Motor case does that same thing, but with 1000ms.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
12-09-2015 05:51 AM - edited 12-09-2015 05:52 AM
All of the LabVIEW program is working well now, except we would like to be able to increase the speed at which the photosensor is being read. Here is a snippet of the part of the code which reads the photosensor:
I would appreciate suggestions for how to speed up this loop (but please don't do my homework for me).
12-09-2015 05:56 AM