LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programming a robot with labview fpga

Hello ! 

Im now working on this project , i have to develop a control system on labview of a robot , i wrote the vi. of the movment of the wheels and it compiled well, yet i would like to know how can i make the robot to move using booleans , i tried to connect them into the while loop but the robot doesnt move ,if someone could give me some suggestions i would be very thankfull.

Thank you very much 

Images of the vi. and the robot down

0 Kudos
Message 1 of 9
(3,034 Views)

Hi May2018end,

 

I think you need to make sure that the VI can move the motors before trying to give it some functionality. Try something simpler where you are only outputting the signals to move the motor. 

 

From what I can see, there is a PWM signal for each motor. Have you used an oscilloscope for checking that the output signals are fine? 

 

Make sure you can move the motor and then start adding extra functionalities to the application.

 

Regards, 

PedroR

0 Kudos
Message 2 of 9
(2,989 Views)

Thank you very much  for the answer, I could finally make it move 😄 😄 😄 the motors can already move and i can control the movement of the robot , now im trying to program the robot to move along a given trajectory , do you know how can i start ? 

Thank you very much !! 

0 Kudos
Message 3 of 9
(2,954 Views)

You are welcome, I'm glad you made it work 🙂

 

I guess that will depend on the trajectory you want to set or maybe you will use feedback from a proximity sensor or similar. If you want to just give it a preset trajectory, test how many "meters" a value on the code will move the motor so you can scale that value and make it move X meters.

 

If it's turning, for example, you'll need to command just one motor to run and calculate what will be the angular distance that it needs to move to turn X degrees.

 

This could get to be very exciting and once you have scaled it, you will be able to move it freely around.

 

Regards,

PedroR

0 Kudos
Message 4 of 9
(2,935 Views)

Well the trajectory i wanted is simple , just for example to advance 40 or 60 cm , then turn and go back the same distance ,or to advance like in a square , advance 40cm then turn 90º and advance other 40cm and turn again , i made the vi to the angle of rotation of all 4 encoders of the robot but i still have to use booleans to make it advance .

 

0 Kudos
Message 5 of 9
(2,919 Views)

For using booleans, you'll need to work it out in code because the boolean is only read once and if you connect it directly to the output, it will output one pulse. What you can do is using the boolean to output a train of pulses that represent the 40 cm.

 

I don't understand the image you posted, it seems that you are reading one of the digital inputs for moving the motor so I imagine that you are pressing a button connected to the DIO6 and that moves the motor but I don't see how this is done. Could you explain in more detail what this loop is doing?

 

Regards,

PedroR

0 Kudos
Message 6 of 9
(2,906 Views)

Oh , i see , i used the DIO6 all 4 times , that was incorrect , tomorrow in the lab will fix it and post the complete vi. , that program is to measure the number of turns given by each of the encoders , ill post as well the vi. to move the robot in all directions .

0 Kudos
Message 7 of 9
(2,902 Views)

Well in the first vi. in controling the direction and speedness of the robot i`m manipulating and the second is measure the number of turns given by each of the encoders when the robot is moving . The teacher says that i need to program the robot so it can move on a given trajectory , for example : to move 40cm turn or something like that , but im lost there , im not sure where to start Smiley Sad . Im using the NI Single Board RIO 

Download All
0 Kudos
Message 8 of 9
(2,893 Views)

How did you make the robot to move? Please, share the VI that did that and I'll try to help you adding other functionalities.

0 Kudos
Message 9 of 9
(2,873 Views)