Go to Post If I 'win' a trophy through an underhanded move, I lost. But if I 'lose' for doing the right thing, I won. - Molten [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 13-02-2013, 11:04
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
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
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:59.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi