Results 1 to 10 of 10
Thread: FS2P and Rotary Encoders
-
09-29-2011, 01:29 AM #1
FS2P and Rotary Encoders
I've been reading a bunch of posts about various I/O cards that can read rotary encoders. I know Phidgets makes a single encoder, but it's a bit pricey and I don't believe it can talk to FS2P. While I did find a few references to encoders, phidgets and FS2P none directly answered if it was possible to use a digital I/O phidget and configure FS2P 4 or 5 to read an encoder properly.
I have a Leo Bodnar card and it can read the encoder but not if I spin it fast and the number or rotations needed to swing the OBS is a bit much. And, of course there aren't any scripting or coding options if I use Leo's card, that I know of.
Has anyone ever built a circuit in FS2P 4 or 5 that can correctly interpret an encoder? If that can be done it will save me some much needed cash for other pieces of the project as I already have phidgets cards either purchased or in the budget to handle other things so inputs are available to use for a couple encoders at no added cost.
-
09-29-2011, 11:20 PM #2
- Join Date
- Oct 2009
- Location
- Juneau, AK
- Posts
- 547
Re: FS2P and Rotary Encoders
Tom,
Pete has helped me with a LUA program for FSUIPC that allows for speed differentiation of encoders via Leo's card. I have dropped the ball on beta testing it, because I have had a major career change, but the basics are out there.
Please check out this thread, and maybe you can help to develop the script. Read the whole thing, as the sewcond iteration of the script is probably the best once fully tested. http://forum.simflight.com/topic/682...r-input-speed/
Reidhttp://juneaucessnasim.blogspot.com
N58243 (virtual)- Low and Slow...
-
09-30-2011, 12:43 AM #3
Re: FS2P and Rotary Encoders
Reid, thanks! I've printed out the thread. I know, not very green of me but when I write scratch notes on the monitor my wife gets upset.
I've never touched LUA before, but it sounds like you hadn't either. I have a wedding to go to this weekend so I don't know what kind of time I'll have, but I'll be reading up on it as much as I can. I'm between build steps at the moment (actually between cash resources for parts) so I'm using the time to sim retrofit Cessna hardware that I already have and test/configure software. Good time to tackle another coding project. Unless of course I scrape up some cash and then it's off to the supply house to buy parts for my yoke and rudder linkages
Again, Thanks!
-
10-04-2011, 10:32 PM #4
Re: FS2P and Rotary Encoders
Reid,
Have you had a chance to work on this? I have a couple hours into it and a few exchanges with Pete, but I've only been able to ge it partially working. I can get rotation in one direction but not the other.
Tom G.
-
10-04-2011, 10:52 PM #5
- Join Date
- Oct 2009
- Location
- Juneau, AK
- Posts
- 547
Re: FS2P and Rotary Encoders
Tom,
Sadly I have not. I got a little overwhelmed by the enormity of the programming task, and am "taking a break" from it. Was hoping you would get it figured out, so I could stand on the shoulders of giants! LOL.http://juneaucessnasim.blogspot.com
N58243 (virtual)- Low and Slow...
-
10-05-2011, 01:15 AM #6
Re: FS2P and Rotary Encoders
No problem. I'm ok at picking up on scripting language, but this one is a bit involved as starter projects go. I'll keep hacking at it, and asking Pete's assistance as long as he is willing to offer it. Hope I don't wear out my welcome with him. In the grand scheme though I can't allow it to let me loose focus on the bigger tasks in my build. So this may take a while, but I'll be glad to keep you posted and share my results.
-
Post Thanks / Like - 1 Thanks, 0 Likes, 0 DislikesAK Mongo thanked for this post
-
10-05-2011, 08:47 PM #7
- Join Date
- Oct 2009
- Location
- Juneau, AK
- Posts
- 547
Re: FS2P and Rotary Encoders
Thanks Tom.
I have been following the thread at Pete's forum, but that is about it lately. Between a new job, serving as a den leader for the cub scouts and coaching youth football, my sim time has been nil.
Wish I could help more, but have not had the time to learn the scripting process yet.
Reidhttp://juneaucessnasim.blogspot.com
N58243 (virtual)- Low and Slow...
-
10-11-2011, 09:56 PM #8
Re: FS2P and Rotary Encoders
Reid,
I now have it all working! Pete found one last typo in the posted code and with that correction it's all good. Timing for fast rotation is for sure a season to taste kind of thing, but after dialing it in and testing it all works.
Let me know when you're ready to set it up and I'll be glad to assist if you'd like. That was quite an education.
-
10-13-2011, 12:17 AM #9
- Join Date
- Oct 2009
- Location
- Juneau, AK
- Posts
- 547
Re: FS2P and Rotary Encoders
Thanks Tom! Could I trouble you to PM me the "completed" Lua text to look at?
Reidhttp://juneaucessnasim.blogspot.com
N58243 (virtual)- Low and Slow...
-
10-13-2011, 07:36 AM #10
Re: FS2P and Rotary Encoders
Reid,
PM has been sent.
I rechecked the bodnar site and for the particular model card I have he does state that diodes are needed if more than 3 continuous on switches might be used at the same time. That happens to be the case for mine so I have the diodes installed.
If you have any trouble with the lua script let me know and I'll be glad to help.
Find Prettys Girls in your city for night
JH startup on Client PC