LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hall effect gaussmeter

Solved!
Go to solution

Though it would be imbecile to ask u about it again,I hope it is the last time.

I tried to remove the inner while loop but without it continuous data aquisition won't be possible.Event structure do not handle the time out case in producer-consumer design,hopefully WAIT function have to be used as u suggested.I have used shift registers and a comparator to check the present and previous "scale" value in the consumer loop (to check for "scale" value change).Though the inner while loop gets stopped when switched from 900G to 3500G and vice versa,but the producer loops never takes over and pushes the consumer loop to continue again when any of the button (900G or 3500G) is pressed .

what could be done to solve it?

Could please make some amendments so that the VI works perfectly.THANKS YET AGAIN A THOUSAND TIMES...

Download All
0 Kudos
Message 31 of 35
(648 Views)

What should be the STOP condition for the inner while customer loop?

0 Kudos
Message 32 of 35
(645 Views)

Working through your questions from the last...

 

If you remove the inner while loop, then you do not need to worry about the stop condition.

 

I made some changes.  Six hundred thanks are enough as long as you promise to study this until you understand the changes.

 

Again, removing the inner loop and letting the outer loop do all the work simplifies things and eliminates questions about stopping and continuous acquisition.

 

Using the timeout on the Wait on Notification takes care of having a wait and setting the timing on the consumer loop.  If the user changes the scale, the change is processed immediately and then the timing restarts.  Note that this may or may not conflict with the timing in the DAQ Assistant which I cannot see.

 

You do not need any Wait or timeout in the Producer loop because the event structure will wait, quite patiently, until you push a button.

 

The shift register in the Consumer loop carries the Density Offset and Divisor from one iteration to the next. It is only updated when a notification is received.  Similarly the Scale on the Flux density gauge is updated only when a scale change has occurred.  By using labelled constants in the initializing cluster, I have named the values in the cluster so that Bundle by Name and Unbundle by Name can be used inside the loop. These provide a form of self-documenting code.

 

Lynn

Message 33 of 35
(638 Views)

I could not have asked for a better explanation.Thanks for describing the working of cluster,bundle and unbundle by name which i did not know earlier ,of course.

The VI is working perfectly with ELVIS.
Last couple of days have been utterly fruitful( regarding LV).
Thanks for your support in building my first project in LV.
KUDOS... 

0 Kudos
Message 34 of 35
(622 Views)

You are welcome.

 

When you have more questions, and you will, post again.  If they are not directly related to this, it might be beter to start a new thread.

 

Lynn

0 Kudos
Message 35 of 35
(619 Views)