12-21-2021 05:13 PM - edited 12-21-2021 05:15 PM
Firstly I’m a complete beginner so please be kind to me. I’m creating a two wheel robot that can turn left and right and reverse with LED’s and it runs off myRio and wrote out what I want my code to do as shown in the first image. My professor then quickly drafted me some code to show me an example of what it looked like and now i am trying to replicate the picture I have of that code as I only have it saved as an image and can’t actually see the functions as shown in the second image. I’ve gotten so far with replicating the code on labview however don’t know how to implement the parts highlighted in yellow on the third image please help. My email is ronnie3755@gmail.com
12-21-2021 05:23 PM
12-21-2021 06:11 PM
At this point of exploration, Leave all the hardware out of it and write a simple computer simulation that shows the result when you operate the controls.
Work out the logic until you are happy, then add the hardware. Start with the learning resources listed at the top of the forum.
Please offer us consistent pictures. For example your front panel does not contain anything labeled "Throttle" or "slide". Personally I probably would use a steering control that is zero for straight, negative for left, and positive for right. You can handle the math on the diagram accordingly. Same for the throttle.
Your diagram seems overly convoluted. I am sure it could be simplified dramatically!
12-21-2021 07:32 PM
"Enable", "Direction", & "Direction 2" are terminals of front panel controls.
The items with blue halos are Express VIs (I think from DAQ Assistant).
The "Simple Error Handler" is in: Functions → Programming → Dialog and User Interface.
"Reset myRIO.vi" is probably under Functions → Instrument I/O.
Note: You can pin any palette, then click on "Search" to find a function.
12-21-2021 08:14 PM
@paul_cardinale wrote:
"Reset myRIO.vi" is probably under Functions → Instrument I/O.
Once you have some idea of what you want to do, and what some Controls and Indicators might be useful, start sketching out how you might implement them. To help you think "digitally", start with the Robot at rest at position 0, 0, with heading 0° (East -- do you understand why I chose East? Think X-Y Coordinates ...). How would you compute the position and heading at 1 second intervals, given that you know the Control setting at these same intervals? [Make it easy on yourself -- start by varying only Speed. What if you make Speed negative? Can you do that in a car?].
Now learn a little LabVIEW. Learn about Loops and Shift Registers (which let you keep track of things like Position and Heading that change at regular intervals) and the Wait (ms) function (that puts time into your loop so you can, in fact, make it run once/second). Use Indicators to tell you where you are in space, as well as your current Heading, and try to "go somewhere".
Once you can do this "on the screen", you can start to worry about how to make your two-wheeled Robot, controlled by your myRIO, do the same thing. It won't be that difficult if you already have a good idea of what you need to do!
Bob Schor
12-22-2021 05:20 AM
Thank you so much for replying but I can’t find the DAQ assistant this is what I’m seeing?
12-22-2021 08:27 AM - edited 12-22-2021 08:28 AM
Hi NKS,
why do you look inside the ExpressVI palette when you want to look for MeasurementIO functions?
Did you install DAQmx?
Which version of DAQmx did install and which LabVIEW version do you use?
Did you install DAQmx in the right order (after your LabVIEW installation)?
Why do you ask for DAQAssistent at all when you want to work with your myRIO and the related myRIO functions???
12-22-2021 08:50 AM
One other thing to note (and I know I am way late to the party): Members here prefer that you upload your VIs instead of pictures. Try and Save to a Previous Version (LabVIEW 2018 - 18.0) should suffice for most members.
Stay away from loading images unless absolutely necessary
12-22-2021 06:15 PM - edited 12-22-2021 06:19 PM
@Eric1977 wrote:
One other thing to note (and I know I am way late to the party): Members here prefer that you upload your VIs instead of pictures. Try and Save to a Previous Version (LabVIEW 2018 - 18.0) should suffice for most members.
Stay away from loading images unless absolutely necessary
Inline snippets are appreciated by those of us who post by phone....
Where is that LabVIEW viewer for mobile app anyway?Oh only 6 kudos? B@@÷+%$#
12-24-2021 08:21 AM
please can someone create this for me in labview I cant find any icons and my project is due tomorrow. It's a two wheel robot powered by myrio and had left, right and reverse lights. Thank you