LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Project

hi, from school ive been designated a task to do but not a clue how to do it at all and was wondering if anyone could help

Basically using labview, i need to automate a path for a dani robot to take, stop at a specific place then locate an object using an ultrasonic sensor in a designated space between 0.3m and 0.5m in a curvature, The school has given me a half completed VI and i need to complete it. Ill uploaded The VI, any help would be welcome thanks.

N.B Its a 4 wheel dani robot, the wheels are 100mm each, each loop of the wheel takes 800 pulses

 

 

Download All
0 Kudos
Message 1 of 4
(3,020 Views)

Hi James,

 

are you in the same class as manoprudhvi?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,994 Views)
Hi gerdW no im not
0 Kudos
Message 3 of 4
(2,942 Views)

Wow.  Who gave you the code Main(1)?  Clearly not your instructor (did you notice the (1), signifying that there are at least two files called "Main.vi" on your PC)?  Whoever designed this code knows very little about LabVIEW programming (hmm, maybe it is your Instructor, who also thinks of LabVIEW as a "toy language, because it uses pictures" ...).

 

I recommend that you spend some time with the LabVIEW Tutorials (look at the upper right area on the LabVIEW Forums' first page).  Learn about Data Flow.  Learn why the Error line, present in most NI LabVIEW Functions, is important and should be used to enhance Data Flow in your Block Diagrams.  Learn why Local Variables are bad, and how you can/should replace them.  Learn how to get rid of the ugly Frame Sequence (which serves no useful purpose) in your Main(1).  [I didn't bother looking at the other functions].

 

Hint on getting rid of Local Variables -- you use them to set initial values for PWM Left and Right.  But these are also their Default Values (good idea!!), so when you run your code, these should be the values they'll have.  Of course, you might run the code, change these controls, stop the code, then re-run it (without exiting LabVIEW and "starting fresh") -- what you'd want to do is to ensure that all the Controls start with their default values, like this ...  Note that the Error Line runs through the Invoke Node, so you should use the Error Line to ensure that this function runs before you enter the main Loop (simply bring the Error line into the Loop, where you can then plunk your other functions down on it to control their order of execution).

Reset to Default.png

Bob Schor

0 Kudos
Message 4 of 4
(2,889 Views)