Zeroing Subroutine For Relative Position Script

9 years 5 months ago #29528654 by xrl
We have a pan and tilt mechanism that needs to support on-boot zeroing. We are looking to write that procedure in microbasic so we can move the pan and tilt until they no longer move then move back 1000 ticks and declare that position as "zero".

We can move the motors with SET commands but how do we declare "zero"? Is there a reset command we should use?

Please Log in or Create an account to join the conversation.

9 years 5 months ago #29528655 by Griffin Baker
Replied by Griffin Baker on topic Zeroing Subroutine For Relative Position Script
What are you using for feedback? Analog or encoder?

Please Log in or Create an account to join the conversation.

9 years 5 months ago - 9 years 5 months ago #29528656 by xrl
We are using an encoder and considering switching between open loop for zeroing then closed loop relative for the application. Here's our plan of attack:

' 1. Set motor controller to open loop
' 2. Reduce torque/reduce amperage limit
‘ 3. Set a velocity
‘ 4. Wait XX seconds
‘ 5. Issue ‘home count’ to minimum limit

Please Log in or Create an account to join the conversation.

9 years 5 months ago #29528657 by Griffin Baker
Replied by Griffin Baker on topic Zeroing Subroutine For Relative Position Script
You can change the configuration parameters in your script by using the setconfig syntax.

Please Log in or Create an account to join the conversation.

9 years 5 months ago #29528658 by Griffin Baker
Replied by Griffin Baker on topic Zeroing Subroutine For Relative Position Script
You can also look at our sample script codes we wrote tfor reference.

microbasic sample script
dev.roboteq.com/dev1/index.php/support/downloads

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds