A
recent post shows the typical LabVIEW idiom for implementing limit switches. Look at the diagram on the right half of the image attached to it. It uses the "in range and coerce" function to keep a motor from going forward if one switch is active, and to keep it from going backward if another switch is active.