LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hall effect gaussmeter

Solved!
Go to solution

Generally it is better to create a new thread rather than posting to one almost three years old.  Many times the persons who particpated in that thread may no longer be active.  The person who started that thread has not been on the Forums since then.

 

The key to your question is a subtle point which was mentioned in the post which included the Gaussmeter Scale.ctl.  I started with a radio button control, not a cluster.

 

Radio Button.png

 

The radio button is actually an enumerated control, not a cluster or a boolean, even though it is on the palette with booleans.  The next step was to customize the control.  This opens a new window where you can modify the control appearance and properties. I replaced each of the round radio buttons with the square boolean OK buttons.  Change labels and boolean text for the scales.

 

Customize -> Replace.png

 

When the button is customized to the look you want, save it (creating the .ctl file) as a typedef or strict typedef.  Look at the help for more information about typedefs.

 

Lynn

 

 

Message 21 of 35
(1,127 Views)

Thanx a lot!!!!Smiley Happy

It worked.The explanation was amazing.

0 Kudos
Message 22 of 35
(1,121 Views)

Glad it helped.  This is one of those things which is not difficult, but which a beginner would never figure out without a few suggestions about where to go.

 

Lynn

Message 23 of 35
(1,118 Views)

Hello

We are working with NI ELVIS II and a hall sensor(WSH315) using the attached programs.While the data acquisition is done perfectly, we are facing problems with the processing part.The hall effect voltage graph indicators and o/p indicators are functioning properly but the flux density indicator and meter (in "scale":Value change case) are not acquiring the data continuously,thus showing stagnant value throughout the execution.

Thanking you.YET AGAIN....

Download All
0 Kudos
Message 24 of 35
(1,104 Views)

I do not have DAQmx or the DAQ Assistant, so I cannot see what is going on inside.

 

With an event structure timeout of 1000 ms, you will only update your indicators once per second, or less, depending on the DAQ Assistant timing.  Are you seeing something other than this?

 

Lynn

0 Kudos
Message 25 of 35
(1,095 Views)

I have tried with values less than 1000ms as u prescribed me to,but the scenario is still the same as previously.Though the hall effect vol changes instantneously, values at the flux density indicator and meter remains constant even after executing the VI for 1 minutre.The values only update when i press the  STOP button and then run the VI again(whether previously  in 900 G or 3500G),and suprisingly the reading are correct as i can relate to the O/P hall voltage, but are not further updated again thereafter.Is the local variable of the 'numeric' indicator of the O/P vol creating any trouble?

PLEASE DO HELP.........

0 Kudos
Message 26 of 35
(1,091 Views)

It seems the case ' "scale" :Value Change' is executed only once, as i confirmed it by placing a random number generating block which generates a number once only when  I execute the VI, but gives different number when I stop and run the VI again.

0 Kudos
Message 27 of 35
(1,084 Views)

Now that you have explained what you are seeing, I can identifiy at least part of your problem.

 

The cases of the event structure only execute when the appropriate event occurs (or 1000 ms after the last Value Change event for the Timeout).  If you never change the scale, the Scale: Value Change case never executes.  If it never executes, the Flux Density indicators never update.

 

The fix: Two ideas come to mind immediately.

1. Move all the indicators which need to follow the data outside the event structure. Since the scaling data changes and needs to be kept between changes, it should be put into a shift register and the scaling arithmetic also moved outside the event structure.  Hint: This also allows you to eliminate the local variables.

2. Probably a better approach but more involved would be to change to a Producer/Consumer architecture where the data acquistion and display are in a separate loop.

 

Try my suggeston 1 and post back if you have problems.  You will learn more that way than if I do it for you.

 

Lynn

Message 28 of 35
(1,069 Views)

Thanks for replying.

1.I have implemented your first suggestion which worked perfectly....Kudos.

2.Your second suggestion to use producer/consumer design is showing some problems.I have used notifiers instead of queues as I need not any buffering to be done. Once u run the VI in one of the state (900G or 3500G) it tend to remains in that state even if u switch on the other button (900G or 3500G which was not pressed earlier) ,otherwise its working as desired.

I don't want to abandon the producer/consumer design after getting this close.

    

Download All
0 Kudos
Message 29 of 35
(1,046 Views)

You are making progress.

 

Your inner loop in the consumer never stops.  The consequence is that the outer loop only runs once, meaning that only the first change of scale is applied.  This is basic dataflow and is fundamental to the way LV works.  Search the LV help for "dataflow" and "data dependency" to get some ideas about how this works and its effects on the program.

 

You probably do not want to wait forever for a notification of a scale change.  Set a finite timeout and only change the scale when the notifier did not timeout.  Use shift registers to keep track of the current scale values.  I thnk you only need one loop for the consumer - the outer one.

 

Lynn

0 Kudos
Message 30 of 35
(1,035 Views)