View Full Version : Interfacing real radios with SIOC

I have some Gables kit that I would like to interface to MSFS. It is of early design with digital displays mechanically connected to rotary switches.

The transponder should not be too difficult as it is basically 4 x 8 way switches, but I would require some help from someone experienced in SIOC programming to suggest a script for this, as the only ones I can find are for single or double encoders or switches wired as such, not 4!

The NAV/COMM stack is different, having double rotary switches for tens, units, tenths and hundredths of Mhz. The hundreds digit is fixed at 1, tens shows 1,2 or 3, and the remainder uses a 2 of 5 truth table to give 0-9.

I would obviously have to make some sort of logic circuit to provide the inputs (which I am working on) after which I suppose it's just a dual rotary!

These things look so nice it would be a shame to pull the faceplates off and install LEDS and rotaries!

LH784

12-08-2008, 05:20 AM

Hi sja,

I am (or better: will be) facing the same problem. I have got 2 gables radios and I defiinitely will try to get them working with SIOC. Of course a digital version with encoders would be easier - but it's not the same. And it wouldn't look cool in a 727.

However I consider the radios as one of the most difficut parts of the whole project, so I will take care of easier parts for now. When I looked through posts dealing with getting those old radios to work I could not find any post of someone who really managed to do that...

If you get a solution - please let me know :)

Greetings, Florian

The transponder should not be too difficult as it is basically 4 x 8 way switches, but I would require some help from someone experienced in SIOC programming to suggest a script for this

// Assumptions:

// There are four 1x8 rotary switches, making up the XPDR.

//

// Digit3 - Digit2 - Digit 1 - Digit 0

//

// Approach:

// Connect each terminal of each rotary switch to a OC master card input.

//

// So we need 32 inputs (here numbered 1 to 32, but this has to be adjusted to

// reflect your own hardware)

//

// Every time a new possition is selected the corresponding input(-s) will be high

// and a Digitn variable gets the corrsponding value.

//

// The Digitn variables will call the subroutine Calculate

// in order to compute the new XPDR code.

//

// This XPDR code has to be sent to your panel

//

// 21st January 2009 Nico Kaan www.lekseecon.nl (http://www.lekseecon.nl)

//

// Note: I have not compiled this script yet (no sioc here where I'm now), so

// there may be syntactical errors, but it shows a possible approach.

//

// Note also, although this is a long script, it's working is very simple,

// don't be scared by its size ;-)

//

Var 1 Link IOCARD_SW Input 1 Type I

{

IF v1 = 1

{

&Digit0 = 0

}

}

Var 2 Link IOCARD_SW Input 2 Type I

{

IF v2 = 1

{

&Digit0 = 1

}

}

Var 3 Link IOCARD_SW Input 3 Type I

{

IF v3 = 1

{

&Digit0 = 2

}

}

Var 4 Link IOCARD_SW Input 4 Type I

{

IF v4 = 1

{

&Digit0 = 3

}

}

Var 5 Link IOCARD_SW Input 5 Type I

{

IF v5 = 1

{

&Digit0 = 4

}

}

Var 6 Link IOCARD_SW Input 6 Type I

{

IF v6 = 1

{

&Digit0 = 5

}

}

Var 7 Link IOCARD_SW Input 7 Type I

{

IF v7 = 1

{

&Digit0 = 6

}

}

Var 8 Link IOCARD_SW Input 8 Type I

{

IF v8 = 1

{

&Digit0 = 7

}

}

Var 10 name Digit0

{

CALL &Calculate

}

Var 11 Link IOCARD_SW Input 9 Type I

{

IF v11 = 1

{

&Digit1 = 0

}

}

Var 12 Link IOCARD_SW Input 10 Type I

{

IF v12 = 1

{

&Digit1 = 1

}

}

Var 13 Link IOCARD_SW Input 11 Type I

{

IF v13 = 1

{

&Digit1 = 2

}

}

Var 14 Link IOCARD_SW Input 12 Type I

{

IF v14 = 1

{

&Digit1 = 3

}

}

Var 15 Link IOCARD_SW Input 13 Type I

{

IF v15 = 1

{

&Digit1 = 4

}

}

Var 16 Link IOCARD_SW Input 14 Type I

{

IF v16 = 1

{

&Digit1 = 5

}

}

Var 17 Link IOCARD_SW Input 15 Type I

{

IF v17 = 1

{

&Digit1 = 6

}

}

Var 18 Link IOCARD_SW Input 16 Type I

{

IF v18 = 1

{

&Digit1 = 7

}

}

Var 20 name Digit1

{

CALL &Calculate

}

Var 21 Link IOCARD_SW Input 17 Type I

{

IF v21 = 1

{

&Digit2 = 0

}

}

Var 22 Link IOCARD_SW Input 18 Type I

{

IF v22 = 1

{

&Digit2 = 1

}

}

Var 23 Link IOCARD_SW Input 19 Type I

{

IF v23 = 1

{

&Digit2 = 2

}

}

Var 24 Link IOCARD_SW Input 20 Type I

{

IF v24 = 1

{

&Digit2 = 3

}

}

Var 25 Link IOCARD_SW Input 21 Type I

{

IF v25 = 1

{

&Digit2 = 4

}

}

Var 26 Link IOCARD_SW Input 22 Type I

{

IF v26 = 1

{

&Digit2 = 5

}

}

Var 27 Link IOCARD_SW Input 23 Type I

{

IF v27 = 1

{

&Digit2 = 6

}

}

Var 28 Link IOCARD_SW Input 24 Type I

{

IF v28 = 1

{

&Digit2 = 7

}

}

Var 20 name Digit2

{

CALL &Calculate

}

Var 31 Link IOCARD_SW Input 25 Type I

{

IF v21 = 1

{

&Digit3 = 0

}

}

Var 32 Link IOCARD_SW Input 26 Type I

{

IF v22 = 1

{

&Digit3 = 1

}

}

Var 33 Link IOCARD_SW Input 27 Type I

{

IF v23 = 1

{

&Digit3 = 2

}

}

Var 34 Link IOCARD_SW Input 28 Type I

{

IF v24 = 1

{

&Digit3 = 3

}

}

Var 35 Link IOCARD_SW Input 29 Type I

{

IF v25 = 1

{

&Digit3 = 4

}

}

Var 36 Link IOCARD_SW Input 30 Type I

{

IF v26 = 1

{

&Digit3 = 5

}

}

Var 37 Link IOCARD_SW Input 31 Type I

{

IF v27 = 1

{

&Digit3 = 6

}

}

Var 38 Link IOCARD_SW Input 32 Type I

{

IF v28 = 1

{

&Digit3 = 7

}

}

Var 30 name Digit3

{

CALL &Calculate

}

Var 40 name Calculate Link SUBRUTINE

{

L0 = &Digit1 * 10

L1 = &Digit2 * 100

L2 = L0 + L1

L0 = L2 + &Digit0

L1 = &Digit3 * 1000

&XPDRCode = L0 + L1

}

Var 50 XPDRcode

{

// send it to FSUIPC/your panel here...

}

Thank you, Nico.

Now I have another version of interfacing the transponder. With your work I can send the complete value to XPNDR, I had also thought of using 4 x 8 way switch as encoder to send each value to increment/decrement 1000s, 100s, 10s and units.

I understand the COMM/NAV sets are more complicated, using a 2 from 5 table to represent the digits 0 to 9 on the units, tenths and hundredths. The hundreds digit is obviously fixed at 1, the tens represent 1, 2 or 3 by simple switching.

Using examples from your code, it should be possible to decode the COMM/NAV also.

Many thanks,

Stuart.

MrRoper

02-07-2009, 09:56 AM

it might be easier to turn the 8 way rotaries into Encoders so that you are only dealing with 1 set o f inputs for each switch,

see Ians excellent tutorial here

http://www.737ng.co.uk/simple%20encoder.pdf

Hope you dont mind me linking this Ian :)

Michael Carter

02-07-2009, 10:18 AM

You still have to have the mechanics to rotate the transponder number dials.

These aren't digital radios.

LH784

02-12-2009, 10:32 AM

Hi Nico,

thanks, your script is a good starting point. And I guess, a transponder will be better for a first project than a Nav/Com radio.

Greetings, Florian