LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

am i doing this right

Solved!
Go to solution

I am trying to display m data on a quiver graph for 4000ms. Does this seem right?

0 Kudos
Message 1 of 11
(4,178 Views)

Your question is very difficult to answer.  Some of your VIs are almost self-documenting (you can more-or-less figure out what you are trying to do, now if only your wires were straighter, you used labels, gave variables mnemonic names, etc.  However, one of them just goes on, and on, and on, with no indication of what is being done.  Try to make every VI fit into a single (modest-sized) screen -- this means Make Lots of Sub-VIs (and, for goodness sake, make sure that each has an Icon with at least the name of the sub-VI shown).  If your code is basically "Do this, then do that, then process this, then display that", consider creating a State Machine (which allows you to "layer" the four operations as different "states" in a Case Structure.

 

If none of this makes sense, ask questions and be prepared to learn.

 

Bob Schor

0 Kudos
Message 2 of 11
(4,162 Views)

alright i guess ill learn to make a state machine.

0 Kudos
Message 3 of 11
(4,154 Views)

@reggie2016 wrote:

I am trying to display m data on a quiver graph for 4000ms. Does this seem right?


Some general comments about posting here:

  • Be polite and give the zip file a unique and descriptive name. ("New Compressed (zipped) Folder.zip" is just lazy)
  • If attaching a bunch of VIs, tell us the name of the toplevel and don't let us guess (If you would name the zip file after the toplevel, we potentially would have better clues.).
  • The statement "Does this seems right" is confusing. It is right if you get the result you expect. Do you?
  • Are you instead trying to get programming advice how to improve the readability and performance of the code?
  • Where do you read the "m" file? (I only see TDMS and spreadsheet reads). Typically m-files are related to matlab. Else explain what you mean by "m data".
  • ...

 

 

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

sorry i didnt explain it well the the main file is conduction velocity and the others are sub vis. i am not getting the results i want because nothing is appearing on the quiver plot. I am trying to get advice on readability and performance of the code. i am trying to display data on a quiver graph for 4000ms. sorry for the confusion.

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

Have you tried probing your data after your Re-arrange subVI? I would just probe various points or set up extra indicators to make sure that there is data being transferred into the Plot Helper node.

 

If there is data going into the Plot Helper node, I don't know if it affects your plot at all, but I don't see any inputs into the Nx, Ny, and Nz nodes. Is it possible that in order to plot your data you need those matrices defined?

 

If nothing else, I would set a simple error handler node at the end of your code and make sure that there are no errors coming out of the Plot Helper node. If you do see an error, could you post the error code on the forum? It would help everyone to be able to understand the issue better.

Andy F.
Applications Engineering
National Instruments
0 Kudos
Message 6 of 11
(3,980 Views)

I have made my code look a little bit cleaner now by using the simple state machine sample. When i run the program it goes straight to the Display Movie State machine. How can I get it to run the states in order. The main vi is called Main and the other files are subvis.

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

Right now your state machine runs as:

 

  1. Display Quiver Plot
  2. Stop.

The enum outside the loop represents the first state. after the first state runs you go to the next state. Wash rinse repeat.

 

Also you should always have a exit state .




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 8 of 11
(3,893 Views)

how do i get it to run each state I thought i had it set up right?

0 Kudos
Message 9 of 11
(3,823 Views)
Solution
Accepted by topic author reggie2016

here is a very simple example.




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 10 of 11
(3,807 Views)