Servo choice clockwise or counterclockwise

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

sundgau
Posts: 63
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Servo choice clockwise or counterclockwise

Postby sundgau » Tue Jan 29, 2019 5:33 pm

I am currently working with servo motors and it turns out that there are, for identical PWM controls, servos that react to the opposite of others depending on the brand (https://www.servocity.com/servo-direction-information). Would it be possible to include for the simulation model a possibility of choice (clockwise or counterclockwise)?
Best regards
Bruno
These users thanked the author sundgau for the post:
Benj (Tue Jan 29, 2019 6:43 pm)
Rating: 5.26%
 

User avatar
Benj
Matrix Staff
Posts: 14453
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4515 times
Been thanked: 4192 times
Contact:

Re: Servo choice clockwise or counterclockwise

Postby Benj » Tue Jan 29, 2019 6:43 pm

Hi Bronu,

Yes this should be simple enough, I'll see if I can add this functionality into the servo components in v8.

sundgau
Posts: 63
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: Servo choice clockwise or counterclockwise

Postby sundgau » Tue Jan 29, 2019 8:44 pm

Super! But I'm not yet the proud owner of the Flowcode V8 version ... it will be for a little bit later.
Servo motors are very widely used in the world of programming and simulation in the system panel (by integrating position sensors, for example), can simulate the final result provided that the servo parameterization can be adapted to all types of manufacturers.
It would be great if the owners of the Flowcode V7 version could also benefit ...
Thank you in advance.

Bruno

User avatar
Benj
Matrix Staff
Posts: 14453
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4515 times
Been thanked: 4192 times
Contact:

Re: Servo choice clockwise or counterclockwise

Postby Benj » Wed Jan 30, 2019 5:30 pm

Hi Bruno,

It was a very quick addition to add so I have added it to all the servo motor components in v8 and also added a "Reverse Output" property to the "Standard Servo" component in v7.

Simply copy the updated component to your "Flowcode 7/components" directory and restart Flowcode.
standard_servo.fcpx
(12.5 KiB) Downloaded 72 times


The servo controller component may also need a way of reversing the output for a specific channel so I will look into this too.
These users thanked the author Benj for the post:
jgu1 (Sat Mar 02, 2019 6:38 am)
Rating: 5.26%
 

sundgau
Posts: 63
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: Servo choice clockwise or counterclockwise

Postby sundgau » Thu Jan 31, 2019 6:50 am

Many thanks . My simulation is now perfect!

Bruno
These users thanked the author sundgau for the post:
Benj (Thu Jan 31, 2019 10:35 am)
Rating: 5.26%
 

sundgau
Posts: 63
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: Servo choice clockwise or counterclockwise

Postby sundgau » Fri Mar 01, 2019 10:44 am

Hi Benj,

I still have a small request; can we also have the "invert" function for the Micro Servo component (Tower Pro 9g)?
Thank you in advance.
Bruno

User avatar
Benj
Matrix Staff
Posts: 14453
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4515 times
Been thanked: 4192 times
Contact:

Re: Servo choice clockwise or counterclockwise

Postby Benj » Mon Mar 04, 2019 12:50 pm

Hi Bruno,

I think this should already have it, maybe check the update system to make sure you are using the latest version of the component.

ss2.jpg
ss2.jpg (55.81 KiB) Viewed 2461 times

sundgau
Posts: 63
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: Servo choice clockwise or counterclockwise

Postby sundgau » Tue Mar 05, 2019 6:25 pm

Hello Benj,

Not for version 7 of flowcode !!! Can we have the .fcpx file for this "Tower Pro 9g" servo for flowcode V7?

Thank you in advance.
Bruno

User avatar
Benj
Matrix Staff
Posts: 14453
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4515 times
Been thanked: 4192 times
Contact:

Re: Servo choice clockwise or counterclockwise

Postby Benj » Wed Mar 06, 2019 11:56 am

Hi Bruno,

Aha ok here you go.

micro_servo.fcpx
(23.03 KiB) Downloaded 61 times

sundgau
Posts: 63
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: Servo choice clockwise or counterclockwise

Postby sundgau » Wed Mar 06, 2019 8:46 pm

Thank you very much!

AbuBakar505
Posts: 1
Joined: Tue Oct 01, 2019 2:40 pm
Contact:

Re: Servo choice clockwise or counterclockwise

Postby AbuBakar505 » Tue Oct 01, 2019 2:57 pm

Hi.
Hope you all fine...
I have a servo mg945(360° rotation)...
I want to make a program to control this motor...
Is there any chance in flowcode?
Thanking you in advance..

User avatar
Benj
Matrix Staff
Posts: 14453
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4515 times
Been thanked: 4192 times
Contact:

Re: Servo choice clockwise or counterclockwise

Postby Benj » Tue Oct 01, 2019 5:23 pm

Hello,

Constant rotation servo motors are usually fairly easy.

If you set the servo motor controller component to output a min of 1ms and a max of 2ms then the mid point value of 128 should give you 1.5ms which should result in a stopped motor. Moving the control value a bit either way should allow rotation in either direction.

You can also mod a normal servo motor so it will constantly rotate.
https://www.youtube.com/watch?v=zV_5wUo7Kxs
These users thanked the author Benj for the post:
jgu1 (Sun Oct 06, 2019 6:44 pm)
Rating: 5.26%