Hello all,
I'm having issues with a very simple While Loop issue that I'm sure is
going to make me look stupid! But I'm new to Labview and no
searching or tutorial searching has helped so maybe someone here can.
I'm using labview to communicate with a piece of hardware I'm building
via the USB RAW functionality. I'm communicating fine with my USB
device - which I oddly thought would be the most difficult part, go
figure. In any case, the structure I'm building is a continuous
outer while loop, and inside I'm going to have a number of other while
loops that I will only want to run once whenever I push a control
button. This is to send single defined commands to the USB
device. There will be about three of these in the whole VI to
send different commands to the device via switches, so the final
structure will have a main functioning VI in the outermost while loop,
with the command whiles occasionally firing whenever the user pushes
the button to send a command to the device.
I've attached a capture of my current VI. The rocker switch is
set to latch when pressed and the inner while loop is set to Continue
while True, so I would have assumed the command would only get sent
whenever I push the button and it would only get sent once.
However, currently the VI just sends the command over and over again
until I stop the outer loop with the stop button, regardless of what I
do to the "Send Command" switch. I've tried moving the "Send
Command" switch to the outer while loop and passing the value into the
other while loop (a loop "pipe" or something like that), but that
doesn't seem to help. Does anyone have any ideas? Any help
would be appreciated.