Jump to content

Using Push Buttons instead of Rotary Encoder on IOCards


Recommended Posts

Guest Raafie75
Posted

Hi guys,I would like to know if I can wire my IOCards to have 2 Push Button Switches instead of Rotaries. One to select up and one to select down? The switches I'm using also might be always on (on=1), so I'll have to setup IOCards to switch when they are off (off=0).Look forward to some information.Kind Regards,Brad HellerNewcastle, Australia

Posted

Hi Brad,rotaries are basically like 2 pushbuttons (Kitter principle) Of course you can do as you proposed. However you will probably need to make sure that the contacts are open when not depressed and only be on when depressed. Depending on the I/O card it could happen that as long as 1 contact is permanently closed (on) the card would stop scanning the matrix (ITRA / keyboard encoders) and hence not recognize if another pushbutton is depressed. FSBus could handle this with no problem.Hope this helpsBRPeter

Guest Raafie75
Posted

Thanks for the info Pete.From what I can understand within IOCards under "SW-NORMAL" you can tell it the state (whatever it is), which is on. Eg. "0" or "1" can be on. Can anyone tell me if I'm wrong, I'm only new to IOcards.Can you enter 2 different lines in IOCards under "SW-NORMAL", one to cycle up and the other to cycle down?I've already built FSBUS boards but have changed to IOCards because of their ON737 Software soon to be released and the support provided.Regards,Brad Heller.

Posted

You'll like the idea and functionality for about 5 minutes. Depending on what you plan on using the pushbuttons for, you might be sitting there a long time pressing these buttons to change a heading bug, select a new altitude, etc... it's a lot of pushbutton events to go from a heading of 080 to 260.

Ray S.

 

Check out my aviation portfolio:

http://scottshangar.net

Guest Raafie75
Posted

The actual reason for asking the question was to find out if I could get a Knitter type output to work with IOCards. The way I asked the intital question was the easiest way I could put it without confusing someone. My intention is to use a Rotary Encoder through REDec but attach the 2 outputs to a input on IOCards. REDec basically gives an output like a knitter switch but both outputs of REDec are always on, so I had to make sure it could handle the "always on" function aswell.I've recieved an answer from IOCards that their software "SIOC" will be able to handle that problem. I'm yet to read up on the program just as yet. If I can use REDec isntead of their Encoder board, then that will save me alot of money!Everything is twice as expensive to most of you guys because we have to order in U.S. dollars and the Aussie dollar isn't that strong. I'm dreading the day I may have to order Project Magenta, the package is going to cost me around $1,000.00 Australian.Regards,Brad Heller.

Guest Ferdie
Posted

If you use SIOC system, this is very easy.You only need to define a timer with value of your repeat action ( in sec/100 ).You define a condition in this timer when you have push the buttom and launch action. For example, increment or decrement value of course. It Is easy...A example of use for those operations, is EFIS of a 737-NG in MINS and BARO functions !

Guest Raafie75
Posted

I was thinking more of tuning radio's?Brad.

Posted

Brad,You cannot connect a "Knitter" type rotary to IOCards and have it treat like a Rotary. You only can define a function for each of the separate inputs, but not the nice build in feature of the IOCards with respect to rotarie support (such as increment specification, increased increments when you turn faster, ...) like you need for radio's.You better use grey type encoders, you can connect them directly to IOCards and they work great. You can order them from FlightDeckSolutions for just 4.50 Dollor each. No encoder cards needed.I have spent some text on experiments with diffrent types of rotaries and IOCards on my web site, www.nicokaan.nl mcp page, section Rotary encoders and IOCards, at the very bottom.Best Regards, Nicowww.nicokaan.nlfc.php?vatsim=814584&indicator=OD1&a=pic767.jpg

Guest CaptnKebec
Posted

Hi,I'm using the IOcard with special knobs I made. Those knobs are actually two pushbuttons operated by a knob (see attachment)I'm using the new SIOC software from IOcard and it works well.I used my specials knobs for all rotary like control and to increment or decrement faster, I'v installed a "multiplier" switch on my yoke, so when I'm holding the switch on the yoke while using the knobs, it increase or decrease a lot faster.Just take a look at my site for details.And here's the code for the SIOC software (not complete yet) but you could use it as example.Bye

Guest CaptnKebec
Posted

Forgot the code, here it is,#2000 *SUBRUTINE* -Extract Digits- V4000 = FROMBCD( V4002 ) L0 = V4000 / 10000 V4023 = TRUNC( L0 ) L1 = L0 - V4023 V4001 = L1 x 10000 L0 = V4001 / 1000 V4003 = TRUNC( L0 ) L1 = L0 - V4003 V4001 = L1 x 1000 L0 = V4001 / 100 V4004 = TRUNC( L0 ) L1 = L0 - V4004 V4001 = L1 x 100 L0 = V4001 / 10 V4005 = TRUNC( L0 ) L1 = L0 - V4005 V4006 = L1 x 10 V5000 = V4006 #2001 *SUBRUTINE* -COM Adder factor- IF V4006 = 0 THEN... V4007 = 2 IF V4006 = 2 THEN... V4007 = 3 IF V4006 = 5 THEN... V4007 = 2 IF V4006 = 7 THEN... V4007 = 3 #2003 *SUBRUTINE* -COM Substact factor- IF V4006 = 7 THEN... V4007 = -2 IF V4006 = 5 THEN... V4007 = -3 IF V4006 = 2 THEN... V4007 = -2 IF V4006 = 0 THEN... V4007 = -3 #2004 *SUBRUTINE* -COM1 increase- IF V4011 = 1 THEN... V4002 = V3000 CALL V2000 ( ) CALL V2001 ( ) IF V6002 = 1 THEN... V4009 = 100 ELSE ... V4009 = V4007 ROTATE( V4000 ) = ( 1800 ,3697 ,V4009 ) V3001 = TOBCD( V4000 ) #2005 *SUBRUTINE* -COM1 Decrease- IF V4012 = 1 THEN... V4002 = V3000 CALL V2000 ( ) CALL V2003 ( ) IF V6002 = 1 THEN... V4009 = -100 ELSE ... V4009 = V4007 x -1 ROTATE( V4000 ) = ( 1800 ,3697 ,V4009 ) V3001 = TOBCD( V4000 ) #2006 *SUBRUTINE* -COM2 Increase- IF V4013 = 1 THEN... V4002 = V3002 CALL V2000 ( ) CALL V2001 ( ) IF V6003 = 1 THEN... V4009 = 100 ELSE ... V4009 = V4007 ROTATE( V4000 ) = ( 1800 ,3697 ,V4009 ) V3003 = TOBCD( V4000 ) #2007 *SUBRUTINE* -COM2 Decrease- IF V4014 = 1 THEN... V4002 = V3002 CALL V2000 ( ) CALL V2003 ( ) IF V6002 = 1 THEN... V4009 = -100 ELSE ... V4009 = V4007 x -1 ROTATE( V4000 ) = ( 1800 ,3697 ,V4009 ) V3003 = TOBCD( V4000 ) #2008 *SUBRUTINE* -NAV1 increase- IF V4015 = 1 THEN... IF V6002 = 1 THEN... V4009 = 100 ELSE ... V4009 = 5 V4017 = FROMBCD( V3004 ) ROTATE( V4017 ) = ( 1800 ,3697 ,V4009 ) V3003 = TOBCD( V4017 ) #2009 *SUBRUTINE* -NAV1 decrease- IF V4016 = 1 THEN... IF V6002 = 1 THEN... V4009 = -100 ELSE ... V4009 = -5 V4017 = FROMBCD( V3004 ) ROTATE( V4017 ) = ( 1800 ,3697 ,V4009 ) V3005 = TOBCD( V4017 ) #2010 *SUBRUTINE* -NAV2 increase- IF V4018 = 1 THEN... IF V6002 = 1 THEN... V4009 = 100 ELSE ... V4009 = 5 V4017 = FROMBCD( V3006 ) ROTATE( V4017 ) = ( 1800 ,3697 ,V4009 ) V3006 = TOBCD( V4017 ) #2011 *SUBRUTINE* -NAV2 decrease- IF V4019 = 1 THEN... IF V6002 = 1 THEN... V4009 = -100 ELSE ... V4009 = -5 V4017 = FROMBCD( V3006 ) ROTATE( V4017 ) = ( 1800 ,3697 ,V4009 ) V3006 = TOBCD( V4017 ) #2012 *SUBRUTINE* -ADF increase- IF V4021 = 1 THEN... V4002 = V3010 CALL V2000 ( ) L0 = V4002 x 1000 V4020 = TOBCD( V3008 ) V4020 = V4020 + L0 L0 = V4020 x 10 V4020 = L0 + V4006 IF V6002 = 1 THEN... V4009 = 100 ELSE ... V4009 = 5 V4020 = V4020 + V4009 V4002 = V4020 CALL V2000 ( ) L0 = V4023 x 10000 L1 = V4020 - L0 L0 = L1 / 10 L1 = TRUNC( L0 ) V3009 = FROMBCD( L1 ) L0 = V4023 x 100 L1 = L0 + V4006 V3011 = FROMBCD( L1 ) #2013 *SUBRUTINE* -ADF decrease- IF V4022 = 1 THEN... V4002 = V3010 CALL V2000 ( ) L0 = V4002 x 1000 V4020 = TOBCD( V3008 ) V4020 = V4020 + L0 L0 = V4020 x 10 V4020 = L0 + V4006 IF V6002 = 1 THEN... V4009 = -100 ELSE ... V4009 = -5 V4020 = V4020 + V4009 V4002 = V4020 CALL V2000 ( ) L0 = V4023 x 10000 L1 = V4020 - L0 L0 = L1 / 10 L1 = TRUNC( L0 ) V3009 = FROMBCD( L1 ) L0 = V4023 x 100 L1 = L0 + V4006 V3011 = FROMBCD( L1 ) #3000 *FSUIPC->* -COM1 INPUT- Offset: $034E,2#3001 *->FSUIPC* -COM1 OUTPUT- Offset: $034E,2#3002 *FSUIPC->* -COM2 INPUT- Offset: $3118,2#3003 *->FSUIPC* -COM2 OUTPUT- Offset: $3118,2#3004 *FSUIPC->* -NAV1 INPUT- Offset: $0350,2#3005 *->FSUIPC* -NAV1 OUTPUT- Offset: $0350,2 - Value=0#3006 *FSUIPC->* -NAV2 INPUT- Offset: $0352,2#3007 *->FSUIPC* -NAV2 OUTPUT- Offset: $0352,2#3008 *FSUIPC->* -ADF INPUT- Offset: $034C,2#3009 *->FSUIPC* -ADF OUTPUT- Offset: $034C,2#3010 *FSUIPC->* -ADF2 INPUT- Offset: $0356,2#3011 *->FSUIPC* -ADF2 OUTPUT- Offset: $0356,2#4000 *VAR* -COM BCD- Value=0#4001 *VAR* -Buffer- Value=0#4002 *VAR* -I/O SUB2000-#4023 *VAR* -DIGIT 0- Value=0#4003 *VAR* -DIGIT 1- Value=0#4004 *VAR* -DIGIT 2- Value=0#4005 *VAR* -DIGIT 3- Value=0#4006 *VAR* -DIGIT 4- Value=0#4007 *VAR* -Adding factor-#4008 *VAR* -Multiplier-#4009 *VAR* -Increase factor-#4010 *VAR* -Init timer- Value=0 TIMER( V2004 ) = ( 999 ,0 ,1 ) TIMER( V2005 ) = ( 999 ,0 ,1 ) TIMER( V2006 ) = ( 999 ,0 ,1 ) TIMER( V2007 ) = ( 999 ,0 ,1 ) TIMER( V2008 ) = ( 999 ,0 ,1 ) TIMER( V2009 ) = ( 999 ,0 ,1 ) TIMER( V2010 ) = ( 999 ,0 ,1 ) TIMER( V2011 ) = ( 999 ,0 ,1 )#4011 *VAR* -COM1 UP indicator- Value=0#4012 *VAR* -COM1 DN indicator- Value=0#4013 *VAR* -COM2 UP indicator- Value=0#4014 *VAR* -COM2 DN indicator- Value=0#4015 *VAR* -NAV1 UP indicator- Value=0#4016 *VAR* -NAV1 DN indicator- Value=0#4018 *VAR* -NAV2 UP indicator- Value=0#4019 *VAR* -NAV2 DN indicator- Value=0#4021 *VAR* -ADF UP indicator-#4022 *VAR* -ADF DN indicator-#4020 *VAR* -ADF frequency-#4017 *VAR* -NAV BCD- Value=0#5000 *IOCP_VAR* =#999 - - Value=0#6002 *IOCARD_SW* -Muliplier- INPUT#=0 - Tipo=#6000 *IOCARD_SW* -COM1 UP- INPUT#=1 - Tipo= IF V6000 = 1 THEN... V4011 = 1 ELSE ... V4011 = 0 #6001 *IOCARD_SW* -COM1 DN- INPUT#=2 - Tipo= IF V6001 = 1 THEN... V4012 = 1 ELSE ... V4012 = 0 #6003 *IOCARD_SW* -COM2 UP- INPUT#=3 - Tipo= IF V6003 = 1 THEN... V4013 = 1 ELSE ... V4013 = 0 #6004 *IOCARD_SW* -COM2 DN- INPUT#=4 - Tipo= IF V6004 = 1 THEN... V4014 = 1 ELSE ... V4014 = 0 #6005 *IOCARD_SW* -NAV1 UP- INPUT#=5 - Tipo= IF V6005 = 1 THEN... V4015 = 1 ELSE ... V4015 = 0 #6006 *IOCARD_SW* -NAV1 DN- INPUT#=6 - Tipo= IF V6006 = 1 THEN... V4016 = 1 ELSE ... V4016 = 0 #6007 *IOCARD_SW* -NAV2 UP- INPUT#=7 - Tipo= IF V6007 = 1 THEN... V4018 = 1 ELSE ... V4018 = 0 #6008 *IOCARD_SW* -NAV2 DN- INPUT#=8 - Tipo= IF V6008 = 1 THEN... V4019 = 1 ELSE ... V4019 = 0 #6009 *IOCARD_SW* -ADF UP- INPUT#=9 - Tipo=#6010 *IOCARD_SW* -ADF DN- INPUT#=10 - Tipo=

Guest Raafie75
Posted

Thanks Michel, just what I needed to know!Looks like alot of programming with SIOC !Is it hard to learn, do you have to know a programming language or is the manual self explanitory ?Regards,Brad Heller.

Posted

Hi Michael,Nice solution! I have to study the details of SIOC as well. However, don't forget that you are now putting software 'on top of' software (which is prone to erros) while there is a simple hardware solution: use gray type rotaries and connect them directly to the Master Card (of IOCards) and each rotarie individually can be defined a separate increment and speed...Remember the KISS principle: Keep It Simple (Stupid) ;-)Regards,Nicowww.nicokaan.nlfc.php?vatsim=814584&indicator=OD1&a=pic767.jpg

Guest Raafie75
Posted

Nico, its a little hard when you've already ordered Aus$207 of encoders.Brad.

Guest CaptnKebec
Posted

No it's not really hard, the better way to do it is step by step.I did it control by control and with trial and error.The manual is not very explicit, I had to learn by trying.I'ts not like a programming language, you just hook switch event to actions.I began with just one knob and continue to ad code until all the knobs were done.I know it's easier with encoders, but my goal is to build my sim with things I already got or at a minimum cost. I prefer building my controls instead of buying it.Of course I am a programmer so it's probably easier for me to use the SIOC software.If you want I can send you the actual code file, so you can play with it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...