Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

MOBOT steering problem

Solved!
Go to solution
I have a problem with using LabView to control MOBOT Transporter http://mobot.pl/index.php?site=products&type=855 mobile platform. Problem is following: In attachment I enclosed a vi that basically can control this mobot in four directions and receive datas from sonars. The question is how to make soft start? One frame sent to platform means one single movement. I need to start with low power and increment a speed. Can anyone help me?
0 Kudos
Message 1 of 29
(4,999 Views)

Hi bikekowal,

 

I'd like to look into your problem, but I see no VI attached to your post, could you please provide it, so that we can see your actual implementation?

 

Thank you very much!

 

Best regards,
Jano
0 Kudos
Message 2 of 29
(4,980 Views)

Sorry for my mistake. File attached.

0 Kudos
Message 3 of 29
(4,978 Views)
Solution
Accepted by topic author bikekowal

Thank you bikekowal,

 

I went through the page you attached but the mentioned Mobot transporter is not there, neither is a users manual or list of commands (if you have both of them, this would be a real help)

 

Let's look at the actual problem - In principle (if the robot is using a DC motor) you have two ways of controlling the speed: either use a pulsed signal, and by changing the PWM change the actual speed of the motor, or if you have direct control of the voltage, you can raise the voltage slowly to raise the speed. I do not know how the controler of this robot works, so I'm just making assumptions at this point.

 

There is the question about the speed of writing of the commands, but it might be possible to simulate the PWM by shutting on/off the motor for defined periods of time - say having "wait untill next ms multiple" wired to 50 ms (something like 20x per second might be doable, depending on the hardware) inside a while loop and sending the command:

- slow speed                1x on; 2x off

- medium speed           2x on; 1x off

- fast speed                 just on

 

As a sidenote: are you aware, that at this point, you are writing the commands just once, and won't be able to update them?

 

 

Best regards,
Jano
0 Kudos
Message 4 of 29
(4,975 Views)

Maybe this website is not uptodate - it looks similiar to explorer but is bigger. This MOBOT is a mobile platform in which wheels can't turn. Turning the platform can be done by steering wheels in differential mode - one pair of wheels (on one side of mobot) is going forward, another - backward. We can only control the speed of pairs of DC motors.The steering frame looks like this:

 

tx_data[0]  = 0xFC;                                               

tx_data[1]  = 10;                                                          

tx_data[2]  = 100 + (100 - speed); - speed of one side wheels

tx_data[3]  = 100 - (100 - speed); - speed of another side wheels

where speed range is 0 to 100.

 

You wrote:

As a sidenote: are you aware, that at this point, you are writing the commands just once, and won't be able to update them?

 

Yes, I am aware, and this is problem for me. Can you suggest anything?

0 Kudos
Message 5 of 29
(4,903 Views)

As far as the repetition is concerned, you can put a while loop around your structure and wire a stop control to it.

 

Actually what I see you doing is inserting the commands as a hexadecimal string, which confuses me a little (you provided the text ones liketx_data[1]  = 10). Is there some way to translate the comands?

 

If yes, you could put together the function and feed the actual speed values into the VI - those can be incremented in different ways, but for example a shift register might be quite good for this kind of use.

Best regards,
Jano
0 Kudos
Message 6 of 29
(4,895 Views)

Adrent, thank you for your reply.

 

I will try to use while loop, it can be helpful.

 

I wrote:

tx_data[0]  = 0xFC;                                               

tx_data[1]  = 10;                                                          

tx_data[2]  = 100 + (100 - speed); - speed of one side wheels

tx_data[3]  = 100 - (100 - speed); - speed of another side wheels

where speed range is 0 to 100.

 

but as you've already found frames are being sent as a hexadecimal strings - it is normal translation between hexadecimal and decimal data types. Two first parts of strings are constant, last ones - tx_data[2] and tx_data[3] are responsible for controlling wheels on both sides.I'll see how can I use shitft register in my project.

 

regards,

Marcin

0 Kudos
Message 7 of 29
(4,890 Views)

Hi Marcin,

 

I'm not completely sure if your problem is solved, so if you have any other questions on LabVIEW programming or other, don't hesitate to ask.

 

Cześć 🙂

Best regards,
Jano
0 Kudos
Message 8 of 29
(4,882 Views)

OK, thanks a lot for your help.

 

Cześć 🙂

0 Kudos
Message 9 of 29
(4,868 Views)

I have another problem. I tried to build a .vi that allows mi to control a speed of mobot. A .vi is enclosed. The problem is that the string is not as it should be. I don't know where exactly the problem is, data types seems to be OK but the output string is wrong. To compare - there is a example string below the speed steering structure. Can you help me?

regards,

Marcin

0 Kudos
Message 10 of 29
(4,854 Views)