the position control on roboclaw 2X30A

Questions about using encoders with the Roboclaw product line
gc967
Posts: 9
Joined: Sun Nov 03, 2019 8:39 pm
the position control on roboclaw 2X30A

Post by gc967 »

HI,

i am using roboclaw 2X30A to control motor position.

there are two problems.

first one, how to determine the value of MAX POS on Ion Studio in position setting if i want to control the motor running in just one circle range.

second, i succeeded to control position on Ion Studio but failed to apply it on myRIO through LabView program. The status block works well since it can read the PID values. However, when using the speedacceldeccelpostion m1 block, i cannot control the motor. Sometimes, it will report some errors but errors will disappear if I run the program again.

thanks,
Geng

Image

Attachments
sometimes it will report error
sometimes it will report error
Capture1.PNG (89.67 KiB) Viewed 8209 times
running position control but the motor fail to move
running position control but the motor fail to move
Capture.PNG (81.52 KiB) Viewed 8209 times
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: the position control on roboclaw 2X30A

Post by Basicmicro Support »

You will need to be more specific about your application. What do you mean by one circle range?

As for Lab View, check the variable ranges allowed. For the position commands it appears the position variable is being limited to a byte. This need to be changed to a long.
gc967
Posts: 9
Joined: Sun Nov 03, 2019 8:39 pm
Re: the position control on roboclaw 2X30A

Post by gc967 »

Actually, I mean when I use the position control in Ion Studio, how i can let the motor rotate just 360 degrees accurately. In other words, how to calculate the value of MAX position in order to achieve this goal.

thanks,
gc967
Posts: 9
Joined: Sun Nov 03, 2019 8:39 pm
Re: the position control on roboclaw 2X30A

Post by gc967 »

Basicmicro Support wrote: Mon Nov 04, 2019 9:53 am You will need to be more specific about your application. What do you mean by one circle range?

As for Lab View, check the variable ranges allowed. For the position commands it appears the position variable is being limited to a byte. This need to be changed to a long.
Meanwhile, could you show me how to change the variable into long type since I cannot find it in the examples offered.

thanks
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: the position control on roboclaw 2X30A

Post by Basicmicro Support »

1. Make sure you update to Basicmicro Motion Studio. If you are still using Ion Motion you have old firmware.

2. The byte to long change was found by another customer while I was working with him on the phone so I have no screen shots but you should be able to bring up properties for the Position value edit box. In there you can change the variable type. It should be a 32bit value, not an 8 bit. If that is your problem that should get you running.

I do recommend that unless you are very familiar with LabView or have absolutely no other choice, that you use Python instead of LabView. LabView is very difficult to support because it is all GUI and a lot of its GUI is pretty horrible in my experience.
gc967
Posts: 9
Joined: Sun Nov 03, 2019 8:39 pm
Re: the position control on roboclaw 2X30A

Post by gc967 »

Basicmicro Support wrote: Thu Nov 14, 2019 9:23 am 1. Make sure you update to Basicmicro Motion Studio. If you are still using Ion Motion you have old firmware.

2. The byte to long change was found by another customer while I was working with him on the phone so I have no screen shots but you should be able to bring up properties for the Position value edit box. In there you can change the variable type. It should be a 32bit value, not an 8 bit. If that is your problem that should get you running.

I do recommend that unless you are very familiar with LabView or have absolutely no other choice, that you use Python instead of LabView. LabView is very difficult to support because it is all GUI and a lot of its GUI is pretty horrible in my experience.
I change the data type of the address, it is always valid currently but the program still cannot control the motor position. Could you show me whether these all values are in the correct data type?
Image
Attachments
position data tyep.PNG
position data tyep.PNG (33.6 KiB) Viewed 8165 times
address data type.PNG
address data type.PNG (51.55 KiB) Viewed 8165 times
program.PNG
program.PNG (17.33 KiB) Viewed 8165 times
gc967
Posts: 9
Joined: Sun Nov 03, 2019 8:39 pm
Re: the position control on roboclaw 2X30A

Post by gc967 »

Image
Attachments
Accel data type.PNG
Accel data type.PNG (33.44 KiB) Viewed 8164 times
speed data type.PNG
speed data type.PNG (34.02 KiB) Viewed 8164 times
immediate data type.PNG
immediate data type.PNG (32.36 KiB) Viewed 8164 times
gc967
Posts: 9
Joined: Sun Nov 03, 2019 8:39 pm
Re: the position control on roboclaw 2X30A

Post by gc967 »

Image
Attachments
deccel data type.PNG
deccel data type.PNG (34.65 KiB) Viewed 8163 times
gc967
Posts: 9
Joined: Sun Nov 03, 2019 8:39 pm
Re: the position control on roboclaw 2X30A

Post by gc967 »

Hi,

Thanks again for the support. Here is the LabVIEW program in case it helps you diagnose the problem.
Untitled 6.zip
(10.44 KiB) Downloaded 305 times
We have spent some weeks now troubleshooting and still cannot work out why this control-mode is not working. Unlucky for us, this is the specific mode we need for our project. If we can get this to work in LabVIEW, we can buy some more drivers to run in parallel to control 6 motors for our walking robot.

Thanks.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: the position control on roboclaw 2X30A

Post by Basicmicro Support »

Only the Position setting needed to be changed. Changing the other types may have broken something else. I recommend you download the labview driver again and modify JUST the Position value type. U32 or I32 is fine.

Post Reply