Jump to content

Recommended Posts

Hello everyone
,
I have the Open cockpits USB stepper motor card, a stepper motor, an optical switch and a slide potentiometer. However i was wondering if you could help me in generating a SIOC script for the motion platform i have created as shown below (the stepper motor connected at the end of the ballscrrew is not shown).

sml_gallery_1739_52_389498.jpg


I have the linear slide potentiometer  to ensure that when i restart FSX, the ballscrew goes back to its starting point. A general description of how I want it to work is given below:

1) If the airspeed is <or equal to 160 knots, no change in the stepper motor.
2) If the airspeed is >160 but less than 230, the stepper should turn 180 degrees x6 times.
3) If airspeed is >230 but less than 400, the stepper should turn (270degrees more than the previous one)
4) While taxiing and just before landing, the stepper motor should turn (180degrees x 12times)
5) When Fsx restrats, rotate the stepper motor (anti-clockwise), so that potentiometer value goes back to zero.

I know there is a conflict between statement 1 and 4, but my stepper motor is attached to a linear platform with springs. The more the number of turns, the longer the spring expands and harder it becomes to move the rudder pedals. I hope you understand what I require to simulate. I m new to sioc, so any help whatsoever would be greatly appreciated. Thank you.

Sincerely,
Akhil

Link to post
Share on other sites

First, please do not double-post here.

I probably know less about SIOC than you and can't help much with that, but I think more information is needed. Jack (aircraft aviation) is probably your man.

Is the slide pot to be used as a feedback/position indicator for the motor/ballscrew position? If not, whoever does this will need to know how many degrees per step the motor turns. If so then you'll need to table out the resistance values at that various positions you desire the ballscrew nut to come to rest at.

It may not be necessary to use a feedback resistor with a stepper-motor driven mechanism. If you know the various locations you want the mechanism to assume the script can do that simply by counting steps, unless there is reason to think the motor will slip at times.

If you are using the slide pot as a position feedback, I recommend not using a zero value at one end, adjusting it instead so that the at-rest value the circuit and script code uses is not at the mechanical limit of the pot. In other words, stay about 5-10% into the operating range of the pot for the at-rest position.

Are the motor movements in steps 2, 3 and 4 all in the same direction?

I hope you can find someone to help with the script.

John

Link to post
Share on other sites

First, please do not double-post here.

I probably know less about SIOC than you and can't help much with that, but I think more information is needed. Jack (aircraft aviation) is probably your man.

Is the slide pot to be used as a feedback/position indicator for the motor/ballscrew position? If not, whoever does this will need to know how many degrees per step the motor turns. If so then you'll need to table out the resistance values at that various positions you desire the ballscrew nut to come to rest at.

It may not be necessary to use a feedback resistor with a stepper-motor driven mechanism. If you know the various locations you want the mechanism to assume the script can do that simply by counting steps, unless there is reason to think the motor will slip at times.

If you are using the slide pot as a position feedback, I recommend not using a zero value at one end, adjusting it instead so that the at-rest value the circuit and script code uses is not at the mechanical limit of the pot. In other words, stay about 5-10% into the operating range of the pot for the at-rest position.

Are the motor movements in steps 2, 3 and 4 all in the same direction?

I hope you can find someone to help with the script.

John

Hi John,

 

Sorry for posting the topic twice. I was in urgent need of help to finish the project so was hoping to get all the help necessary. The slide pot is connected to the linear rail and not to give position feedback for the motor.  The slide pot is rather connected to the linear slide mechanism and not the ball screw. The only reason i did this is because whenevr i restart FSX, SIOC should be able to read the position of the slide and rotate the ballscrew anticlockwise to bring it back to its original position.  To calibrate the number of steps of stepper motor i already have the optical sensor installed. 

 

And ya...steps 2,3,4 all should be running (turning the motor in one direction) when flight is in motion. The idea is just to adjust the turns of the motor so that it elongates the spring and makes it harder for the rudder pedals to move at different altitudes. And thanks again for your advice on the slide pot.

 

I am hoping that someone will come by and help me sequence the order of the script because i am kind of running short on deadlines to make the project work. Anyway thanks a lot for your time John.

 

Regards,

Akhil

Link to post
Share on other sites

If the slide pot is only to give an indication of the at rest position of the mechanism you could just as easily use a limit switch that is actuated when the mechanism goes to that position. Slide pots are more commonly used to give position feedback along the whole range of motion of the mechanism.

I'll delete your other post.

John

Link to post
Share on other sites

To calibrate the number of steps of stepper motor i already have the optical sensor installed. 

 

All well and good, but if that's a typical circular optical target, it will only tell the rotational position of the screw, not how far along the screw the nut is unless your script is counting turns (or steps, if the angular increment of each step is known - same thing, really).

 

Also, without position feedback, if the program using your script program is shut down, it will not know the position of the mechanism when the script restarts.  The only ways I know to do that are continuous position feedback as with a slide pot, or by having the script keep track of the position by writing to a file that can be referenced when the script re-starts.

 

I guess you could assume that the mechanism is in the at-rest position anytime the script initiates, but if, for instance there was a power interruption or some other situation that left the mechanism in a different position, that assumption of at-rest starting position in the script will be erroneous.

 

Not trying to give you a hard time here, just trying to understand your control scheme and think of things you may not have.

 

John

 

EDIT:

These...

 

 

 

I have the linear slide potentiometer  to ensure that when i restart FSX, the ballscrew goes back to its starting point.

 

The only reason i did this is because whenevr i restart FSX, SIOC should be able to read the position of the slide and rotate the ballscrew anticlockwise to bring it back to its original position.

 

...seem to be at odds with this...

 

 

 

The slide pot is connected to the linear rail and not to give position feedback for the motor.

 

What you describe in the first two should work.  The rotational position of the motor/ballscrew is not as important as the linear position of the nut on the screw.  The latter defines the state/position of the mechanism to an accuracy of 1 thread pitch on the ballscrew.

 

JDA

 

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...