From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read DC Velocities VI Error

Hi all,

 

I have a problem with a simple VI. I am writing velocities using the DANI 1.0 using steering frame, but the velocities written to the motors is different from that which is read, hence, my robot is not moving. I used indicators to know what was written...and they are OK, but that which is read is completely different...

...LabVIEW, LabVIEW Robotics,...

Please help me...

Robot.jpg

0 Kudos
Message 1 of 6
(2,480 Views)

Hi Chimsom,

It looks like your code writes values to the motor Setpoints, not the actual velocities. This means that LabVIEW needs to call a VI to apply the selected velocity to the motors to actually see the change. You call this VI before writing the setpoints, which is why the values never actually get written to the motors.

One way to remedy this is to right-click the tunnels on your orange "starter kit host" wire and green "steering frame" wire at the end of your while loop and change them to shift registers. This causes the value of the wire to be retained at the end of each loop cycle. By default, these tunnels save the initial value (before entering the loop) and use that value for every iteration. I've linked a document about this below, for your reference.

 

Passing Data Between Loop Iterations in LabVIEW
http://www.ni.com/getting-started/labview-basics/shift-registers

 

Best,

 

Nick Smith 

Applications Engineer 

National Instruments 

http://www.ni.com/support

NickelsAndDimes
Product Support Engineer - sbRIO
National Instruments
0 Kudos
Message 2 of 6
(2,434 Views)

Here's another document that specifically discusses writing values to the motors:

 

Programming a Starter Kit Robot (Robotics Module)
http://zone.ni.com/reference/en-XX/help/372983D-01/lvrobogsm/robo_skit_programming/#skit_steering

NickelsAndDimes
Product Support Engineer - sbRIO
National Instruments
0 Kudos
Message 3 of 6
(2,432 Views)

Thanks Nickels.

 

I tried what you said but the problem still persists.

 

I am still on it anyway, trying to fix the problem, help will be highly welcomed.

 

Thank you.

0 Kudos
Message 4 of 6
(2,408 Views)

Have you tried starting with the sample code in the starter kit manual? There's a handful of differences between that code and yours (Notably, you have a case structure that can write 0 velocity to your motors before they get a chance to actually start moving). If the example code doesn't work on your system, then it's possible that there's something wrong with your hardware itself. If it does work, you can add functionality to that as needed for your system.

 

Implementing Steering for a Robot
http://zone.ni.com/reference/en-XX/help/372983D-01/lvrobogsm/robo_skit_programming/#skit_steering

NickelsAndDimes
Product Support Engineer - sbRIO
National Instruments
0 Kudos
Message 5 of 6
(2,392 Views)

Thanks Nick...I will keep trying.

0 Kudos
Message 6 of 6
(2,379 Views)