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

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

Servo choice clockwise or counterclockwise

Post by sundgau »

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

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

Re: Servo choice clockwise or counterclockwise

Post by Benj »

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: 78
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: Servo choice clockwise or counterclockwise

Post by sundgau »

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: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Servo choice clockwise or counterclockwise

Post by Benj »

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 280 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.

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

Re: Servo choice clockwise or counterclockwise

Post by sundgau »

Many thanks . My simulation is now perfect!

Bruno

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

Re: Servo choice clockwise or counterclockwise

Post by sundgau »

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: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Servo choice clockwise or counterclockwise

Post by Benj »

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 7610 times

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

Re: Servo choice clockwise or counterclockwise

Post by sundgau »

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: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Servo choice clockwise or counterclockwise

Post by Benj »

Hi Bruno,

Aha ok here you go.
micro_servo.fcpx
(23.03 KiB) Downloaded 251 times

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

Re: Servo choice clockwise or counterclockwise

Post by sundgau »

Thank you very much!

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

Re: Servo choice clockwise or counterclockwise

Post by AbuBakar505 »

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: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Servo choice clockwise or counterclockwise

Post by Benj »

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

Post Reply