LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView Help

Need help writing a program using LakeShore 425 gauss meter.

Goal: Need to read 8 different peak (max) gauss readings and call out the MIN value of the 8.

Process: Press START button, record the max value on an array, reset the gauss meter to zero, press start again, record the max value on an array....complete 8 readings and display the MIN. Reset the meter after each reading and at the end.

0 Kudos
Message 1 of 7
(3,425 Views)

What do you have for now?

0 Kudos
Message 2 of 7
(3,409 Views)

Hi Dave,

 

when you start reaching your goal I suggest to use a statemachine approach - you already mentioned some of the steps/state needed…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 7
(3,390 Views)

This is what I have right now. Just added the Event Structure and didn't test yet. When I run. Start button is not working correctly and it will record 8 readings at one time. Need to press start and record, 8x

Thanks for the help.Capture.JPG

0 Kudos
Message 4 of 7
(3,328 Views)

I think you should look up some state machine examples, your event structure should be inside the loop 

0 Kudos
Message 5 of 7
(3,325 Views)

Hi,

 

I completely agree with GerdW.  You should use a state-machine design pattern in this case.  You can read more about it here:

 

http://www.ni.com/white-paper/3024/en/

 

In the case where you are waiting for the user to press the start button, you can move that event structure to perhaps an "Idle" case or state as we would refer to it, and return to this state after the other actions have been performed such as the data acquisition.  Suggested states for this might be: Initialize, Idle (Wait for Start), Acquire, Cleanup.  The beauty of this design is that you do not have to execute in any particular order (though some should be thought out such as Cleanup happens only after others) and you can repeat states until your 8 separate records are finished.

Adam
0 Kudos
Message 6 of 7
(3,317 Views)

Thank you for the suggestions. I will look into State machine and Idle case.

Thanks

0 Kudos
Message 7 of 7
(3,304 Views)