|
Re: Stopping all motors
I assume this is not an emergency type of stop. Because the space bar on the key board will stop ALL motors.
Reading the joy stick button in each loop is not a bad way to go. What ever way you go, you are still going to have to "read" this "other option" and have a reference to it in each loop. Plus you will have create code to constantly update this "other option" to check if the button has changed.
This is duplicating what the Get Joy Stick already does.
When you read the joy stick all you are doing is reading from stored values that have been previously stored. In this case stored in a shift register. The get joy stick function does not read from the joystick, but from this storage location on the cRIO. Anything else you do would just be duplicating the stored values.
Create a sub VI that gets the joy stick button state and returns it. Then drop copies of this sub VI into each loop and wire the Boolean output as needed.
But you could create your own copy the stored joy stick button data in your own global, but you would have to constantly copy the data from one stored location to the other stored location. Each loop could then read the copy of the data.
You could use a LabVIEW notifier. But again it will require you to create code to copy the data and send out the notifier.
__________________
Omar
|