I have a fairly simple VI that grabs the units of measure (send a "A") from a MARK-10 test stand and MARK-10 force gauge. I'm struggling with how, or where, I should place my While Loop. What I would like the VI to do is if the units of measure are not correct, change the units (send a "U") and retry the comparison.
Thanks in advance.
Solved! Go to Solution.
That looks like it would do what you want it to do. I have two observations that may improve your design.
1. Is it guaranteed that the unit will be two bytes long at the beginning at index 7? I would recommend using the match pattern vi and if the substring is not found the offset past match will be -1.
2. The close port probably should be outside of the loop and shift registers are good too unless you want to loose any previous error details.
I agree that the close port should be outside the loop--you wouldn't want to close that port on the first iteration. My mistake.