From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I think your fundamental problem is not understanding dataflow. The string you are writing is based on a comparison that occurs before the loop executes. The loop receives the outcome of that comparison, but with each loop iteration, it does not matter what you change the string to on the front panel - the VISA Write will always write the same string. If you want to change what gets sent then you need to put the string control and the corresponding comparison inside the loop.