Results 1 to 10 of 10
  1. #1
    300+ Forum Addict Tom_G_2010's Avatar
    Join Date
    Mar 2011
    Location
    Central Mass
    Posts
    437
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

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

  2. #2
    500+ This must be a daytime job



    Join Date
    Oct 2009
    Location
    Juneau, AK
    Posts
    619
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: FS2P and Rotary Encoders

    Quote Originally Posted by Tom_G_2010 View Post

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


    Reid
    http://juneaucessnasim.blogspot.com
    N58243 (virtual)- Low and Slow...

  3. #3
    300+ Forum Addict Tom_G_2010's Avatar
    Join Date
    Mar 2011
    Location
    Central Mass
    Posts
    437
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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!

  4. #4
    300+ Forum Addict Tom_G_2010's Avatar
    Join Date
    Mar 2011
    Location
    Central Mass
    Posts
    437
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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.

  5. #5
    500+ This must be a daytime job



    Join Date
    Oct 2009
    Location
    Juneau, AK
    Posts
    619
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

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

  6. #6
    300+ Forum Addict Tom_G_2010's Avatar
    Join Date
    Mar 2011
    Location
    Central Mass
    Posts
    437
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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.

  7. Thanks AK Mongo thanked for this post
  8. #7
    500+ This must be a daytime job



    Join Date
    Oct 2009
    Location
    Juneau, AK
    Posts
    619
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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.

    Reid
    http://juneaucessnasim.blogspot.com
    N58243 (virtual)- Low and Slow...

  9. #8
    300+ Forum Addict Tom_G_2010's Avatar
    Join Date
    Mar 2011
    Location
    Central Mass
    Posts
    437
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: FS2P and Rotary Encoders

    Quote Originally Posted by AK Mongo View Post
    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.

    Reid
    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. #9
    500+ This must be a daytime job



    Join Date
    Oct 2009
    Location
    Juneau, AK
    Posts
    619
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: FS2P and Rotary Encoders

    Thanks Tom! Could I trouble you to PM me the "completed" Lua text to look at?

    Reid
    http://juneaucessnasim.blogspot.com
    N58243 (virtual)- Low and Slow...

  11. #10
    300+ Forum Addict Tom_G_2010's Avatar
    Join Date
    Mar 2011
    Location
    Central Mass
    Posts
    437
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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.