LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Invisible dynamic array...

  • How is this VI supposed to be used?
  • It will be used to automate experiment of measuring power spectrum  of harmonics that are described on the main  GUI
  • What is the purpose of these long 20 second delays?
  • These delays are for waiting for  the spectrum analyzer to finish its calculations before loading the data from it. I don't know a way to do a programmatic check of a command status. That is why I used the delay which is a quick and dirty way to fix this problem.
  • How is the operator supposed to interact with the controls?
  • The user will select scalling,. units, measuremement parameters ,update the scenario in the table if needed and then press Measure. The measurements results are being saved in the text file
  • Which are used as controls and which as indicators?
  • The only controls are the scalling ,units , measure mode comboxes andt he the Scenario which will be edited by operator if needed.
I have uploaded the updated version of SPEKTR.



0 Kudos
Message 11 of 15
(1,152 Views)

Just curious,

Why did you not use some suggestions from this thread?

http://forums.ni.com/ni/board/message?board.id=170&thread.id=327896

You should also use a state machine instead of those nasty stacked sequence structures.. Especially embbedding them..  that's not a good practice.

Will you be doing anything woth the controls in the event structure loop?  What is the intention of that loop? 

I would start by cleaning up the code.  Replace the stacked sequence with a state machine.  Avoid cohesion dots by using appropriate control types.

RayR

0 Kudos
Message 12 of 15
(1,147 Views)
I know what a state machine is but how do I implement it  and what will be the benefits?

Plus I don't know how to use your DONE? command. 


Message Edited by RSibagatullin on 06-05-2008 12:12 PM
0 Kudos
Message 13 of 15
(1,142 Views)
Some of the benefits are:
 
Maintainability:  code easier to read and easier to debug.  it is possible to "see" what values are actually passed to & from each state.  You can use shift registers to "store" values.  You can wire left to right.  You can use the error cluster easily.
 
Scalability:  you can add more functionality which may not be restricted by a static sequence of events (as compared to the stacked structure).  You can use TypeDef controls which allow you to add more states easily. 
 
Structure:  you can return to certain states by defining the state transition.
 
to name a few!!
 
 
0 Kudos
Message 14 of 15
(1,133 Views)
0 Kudos
Message 15 of 15
(1,110 Views)