PDA

View Full Version : Simulating Encoders



ian@737ng.co.uk
07-06-2008, 01:35 PM
gentlemen...g'day
there is a requirement to not only have a rotary switch operate directionally, but to also do that to predetermined positions (accurate # of steps up and down). e.g. OFF -1 - 2 - 3 etc. examples are (on the 737NG) the Autobrake, Wiper Controls, Panel Lights, Pressurisation Auto/Man/Alt and even the Starter Switches.
so i'm sat here wondering how i can operate these switches exactly. hmmm, has to be an answer. and there is. rotary encoders were the easy answer for directional control, but they did not give me the exact switch 'Click Position'.
2 bit gray encoders are basically two continuity circuits made to contact with a 'common' in a predetermined arrangement as they rotate. it's this arrangement or pattern that the control (either hardware or software) sees and acts upon. it doesn't matter what your control is, it is looking for this 'switch change state' to act upon.
so i decided to replicate the switching behaviour of a 2 bit gray encoder with a 2 pole 6 way rotary switch. result is excellent. it works, it works well and i thought it was worth sharing. see http://www.737ng.co.uk/help.htm for how i did it.
i'll upload this later in the week when i get my head round how to do it. hope this gives lots of you things to think about.
have a good one tomorrow, i will (me and my soldering iron)
best regards as always ... ian

AndyT
07-07-2008, 04:16 AM
That is great Ian. But why not just use a multi-position switch? You can get one for a dollar or two at any Radio Shack or equilivent.

Westozy
07-07-2008, 06:33 AM
That's a great news Ian, Simboards support encoders too. I have all my radio's going. Andy I think that is the cheap rotary switch but it is now capable of 'indexing' which is the only way into some of PMDG's switch functions.
I have a big issue with FSUIPC 3.81, when I install the .dll in the modules folder, all my Open GL gauges disappear. Any ideas Ian? I'm wondering if I need to re-install everything. I'm keen to get into 'mousetrapping'!

Gwyn

Padraig
07-07-2008, 12:30 PM
Outstanding news Ian, Very clever indeed :D

Prof Bill
07-07-2008, 09:54 PM
That's a great news Ian, Simboards support encoders too. I have all my radio's going. Andy I think that is the cheap rotary switch but it is now capable of 'indexing' which is the only way into some of PMDG's switch functions.
I have a big issue with FSUIPC 3.81, when I install the .dll in the modules folder, all my Open GL gauges disappear. Any ideas Ian? I'm wondering if I need to re-install everything. I'm keen to get into 'mousetrapping'!

Gwyn

I wonder if we are now getting into a situation where some of the representative config functions in the .INI files are global rather than FS/FSX specific and are affecting Windows/Vista calls. This may well appear to be a rather ambigous response to the above question but I am now begining to see lots of applications where I have assigned complex sets of keys (permissable) to rotary encoding interpretation only to find that the OS has also been directly/indirectly affected.
In my case it has not been an FSUICP problem. The question that needs to be asked is are the application writers validating their products to ensure that they do not conflict with OS Global calls!

Bill.