|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Need help with coding issue
My team's robot has two different ways of scoring, one on one side, "the front", and one on the other side, "the back." The reason I put those in quotation marks is due to the fact that both sides may be considered the front of the robot. Our question is, how can we flip the coding of the robot so we can easily switch from one side of the robot being controlled by moving forward on the remote, to the other side being controlled like that. It's mainly so the drive team has an easier way of controlling the robot in the case that we cannot use one way to score. Any help would be appreciated.
|
|
#2
|
||||
|
||||
|
Re: Need help with coding issue
Quote:
|
|
#3
|
|||||
|
|||||
|
Re: Need help with coding issue
If it were tank drive, you'd need to switch the sides and the direction of the joystick axis.
Something like this: |
|
#4
|
|||
|
|||
|
Re: Need help with coding issue
U/Mark McLeod sorry I don't know how to quote texts but is there any chance you could post the false version of the box in the code?
|
|
#5
|
|||
|
|||
|
Re: Need help with coding issue
It should just be a pass through (without criss-crossing the lines). Because he posted a snippet, you should be able to download it and drop it back in LabVIEW and have it turn back into code.
Last edited by mshafer1 : 06-02-2017 at 08:31. Reason: adding snippet |
|
#6
|
|||||
|
|||||
|
Re: Need help with coding issue
Quote:
Matthew took it and showed you the False case side. It uncrosses the lines and are straight through otherwise. To convert the image to code: 1) Save the image I posted to your desktop, 2) drag the image onto blank space in a block diagram 3) instant code and you can look at the False case directly. To make your own snippets, highlight just the code you want, and choose Edit->Create VI Snippet from Selection Last edited by Mark McLeod : 06-02-2017 at 10:57. |
|
#7
|
|||
|
|||
|
Re: Need help with coding issue
Thank you all for your help with this. I will post back with results and more questions
Quote:
|
|
#8
|
|||
|
|||
|
Re: Need help with coding issue
As a fun snippet sidenote, I'm not sure if this is something related to me using Chrome or intended use. I don't need to save it. I just drag from Chrome over to my Block Diagram and it puts the code in place for me.
For completeness, you can tell the difference between a snippet and a screenshot by taking a look at the upper left corner. The awkward hand is shown to drag the code to your LabVIEW by the arrow. If you see that, it's a snippet. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|