08-05-2016 05:25 PM
Hello Professionals, I am new to LabView. I would like to make a case structure in the LabView with the NXT robot project. I try to use Case structure. But I dont see a way to change the case value. For example
I would like the robot wheels to move in forward direction, untill the distance arrived by the Ultrasonic sensor close to 25 . Once it reaches I would like the wheels to move in backward drection untill Ultrasonic distance is 45. Again I want to move to the next case value say 60 . Can any one give a solution. Here with I attach you the VI.
08-05-2016 05:25 PM
Hello Professionals, I am new to LabView. I would like to make a case structure in the LabView with the NXT robot project. I try to use Case structure. But I dont see a way to change the case value. For example
I would like the robot wheels to move in forward direction, untill the distance arrived by the Ultrasonic sensor close to 25 . Once it reaches I would like the wheels to move in backward drection untill Ultrasonic distance is 45. Again I want to move to the next case value say 60 . Can any one give a solution. Here with I attach you the VI.
08-05-2016 07:26 PM
Think about your problem. You want to do "something" until "some condition is reached", at which point you want to do "something else" (and so on). To my mind, the natural "case" is "What am I doing?". Within each Case, there is (a) a different "thing to do" (i.e. Move Forward or Move Backward) and (b) a different "time to do something else" (i.e. "Distance < 25" or "Distance > 40".
Things that have separate States with a rule of what happens during a State and what causes the State to change is called ... a State Machine. If you are brand new to LabVIEW, some of the concepts behind the State Machine might stretch your mind a bit (but that's not too bad ...).
If you start LabVIEW and choose Create Project, one of the Example Projects should be Simple State Machine. Look it over, read the documentation, and ask questions if there are still things you don't understand.
Bob Schor
08-08-2016 05:39 AM
Hi,
welcome to LabVIEW. Please visit a Training or do the self paced online training. LabVEIW is very intuitive and easy to use, but there is a certain amount of rules to follow and concepts to know, to make everything work. You will not regret it in the long run.
08-08-2016 06:04 AM
here is an awesome example for you, press run and wait till it counts to 25
08-08-2016 01:30 PM
Here are some free training links if you are interested:
-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)
Learn NI Training Resource Videos
6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-08-2016 03:31 PM - last edited on 05-02-2017 03:31 PM by karina.barles
Hello Gregor,
Thank you. I just have Labview 2012. Your version seems to be higher. Can you save it to the lower version, so that I will be able ot access it. Looking forward to hear from you.
With regards
John4u
08-09-2016 01:53 AM
Sure, here it is
08-09-2016 11:53 PM
Thank you Gregor, I am able to make a step further. It is very useful.
Regards
John4u
08-15-2016 11:26 AM
Hello Gregor,
I tried to create a similar one as you sent. But I am not getting the same result. In the forward case it goes to +1 and again gets back to 0. Can you or any one here tell me where the correction has to be made. Here with I attach you the file. Thank you.
Regards
John4u