PDA

View Full Version : OC-EFIS Modul Inputs/Outputs numbers



Georg Schneider
04-25-2008, 01:12 PM
Hello to all Flightsimmers :)

Right now i`m trying to connect the OC-EFIS with sioc.

I managed to connect the OC-MCP with FS2004.

I`m using OGS-1.20 for Glass Cockpit.
They provided a sioc script with it but you need to change
th input and output numbers.

Does anybody know the used inputs/outputs for the OC-EFIS modul?

I know there is a testprogramm to find em but i have 2 EFIS modules
and everytime i test one efis i get the same input/outputnumbers for both efis modules.

I`l appreshiate all help i can get.
Also i must say i`m a beginner in sioc programming:oops:

My 737-800NG sim is located near Stuttgart/Germany
my HP for some pics http://www.flusifan-bw.de
sorry the page isn`t in English:sad:

Just click on the left side of my HP on "Mein 738Ng homec....."
then you come to my picture gallery.

Hope anybody can help me.....

Greetings and happy flying

George

nricky
04-26-2008, 04:00 AM
Hi George

The trick is that you have to tell each EFIS Panel to have a different Device index, and the rest you will have to program with SIOC. Maybe there is a code that is already finished and you only have to change it to make it work.

There is a code which I have changed from Ferdie to make the MCP from OC work with PM. There is also a section in the code for the EFIS. Don't have a EFIS Panel yet, want to get one myself.

SIOC code is not hard to learn. Just start and the rest comes together as you go along.

Where are you in Germany, I am over here in Bornheim close to Bonn.

Für weitere Fragen bitte bei mail oder über dieses Forum. rick@nrick.net

Cheers Norbert
.

Georg Schneider
04-26-2008, 05:10 AM
Hy Norbert !

Thanks for your reply!:smile:

I`m living in Schorndorf thats 25km east of Stuttgart.

Comes the OC-MCP-PM script from Ferdi with SIOC or do ya have it direkt from Ferdi?

I have a script too that comes with the new sioc 3.52b.
I`m not using PM right now because i have not enough money for it:(

I try to manage all the systems with ON737 and for the glass Cockpit
i will use OGS120.

The problem with the EFIS is that the input numbers for push switches and rotarys are not dokumented.
But i need em to write the script.
With the EFIS controll program you only get input descriptions like
When you press the "DATA" button it say "S4" or for rotary Barro it says
"Barro-p"

As i know ther must be numbers like Input"34" to program a script.

This weekend i try some more programming:rolleyes:

Maybe i get the glimps the next weeks trying.

Greetings George

kiek
04-26-2008, 05:40 PM
Hi George,

The definitions for the EFIS can be found in the sioc352b.exe package, here they are:


// SWITCHES
Var 500, name I_5, Link IOCARD_SW, Input 0, Device 1
Var 502, name I_10, Link IOCARD_SW, Input 1, Device 1
Var 504, name I_20, Link IOCARD_SW, Input 2, Device 1
Var 506, name I_40, Link IOCARD_SW, Input 3, Device 1
Var 508, name I_80, Link IOCARD_SW, Input 4, Device 1
Var 510, name I_160, Link IOCARD_SW, Input 5, Device 1
Var 512, name I_320, Link IOCARD_SW, Input 6, Device 1
Var 514, name I_640, Link IOCARD_SW, Input 7, Device 1
Var 516, name I_APP, Link IOCARD_SW, Input 9, Device 1
Var 518, name I_VOR, Link IOCARD_SW, Input 10, Device 1
Var 520, name I_MAP, Link IOCARD_SW, Input 11, Device 1
Var 522, name I_PLN, Link IOCARD_SW, Input 12, Device 1
Var 524, name I_S1, Link IOCARD_SW, Input 27, Device 1
Var 526, name I_S2, Link IOCARD_SW, Input 28, Device 1
Var 528, name I_S3, Link IOCARD_SW, Input 29, Device 1
Var 530, name I_S4, Link IOCARD_SW, Input 30, Device 1
Var 532, name I_S5, Link IOCARD_SW, Input 31, Device 1
Var 534, name I_S6, Link IOCARD_SW, Input 32, Device 1
Var 536, name I_S7, Link IOCARD_SW, Input 33, Device 1
Var 538, name I_SR1, Link IOCARD_SW, Input 34, Device 1
Var 540, name I_SR2, Link IOCARD_SW, Input 38, Device 1
Var 542, name I_BARONSW, Link IOCARD_SW, Input 22, Device 1
Var 544, name I_MINSW, Link IOCARD_SW, Input 25, Device 1
Var 546, name I_VOR1, Link IOCARD_SW, Input 36, Device 1
Var 548, name I_ADF1, Link IOCARD_SW, Input 37, Device 1
Var 550, name I_VOR2, Link IOCARD_SW, Input 18, Device 1
Var 552, name I_ADF2, Link IOCARD_SW, Input 19, Device 1
// ROTARY ENCODERS
Var 600, name E_BARO, Link IOCARD_ENCODER, Input 20, Aceleration 1, Type 2, Device 1
Var 602, name E_MIN, Link IOCARD_ENCODER, Input 23, Aceleration 1, Type 2, Device 1


regards,
Nico Kaan

Georg Schneider
04-27-2008, 04:46 AM
Hi Nico!

Thanks very much for your help!

With sioc there is so much to discover that sometimes i oversee thomething:rolleyes:

I must say that you did a very good job with your website and for the community:smile:

I have a problem with how i connect everything.

My setup:

PC1 : FS2004,fsuipc(registered),iocp-server.dll IP:192.168.0.1

PC2 :OGS120,widefs-client IP:192.168.0.2

PC3 :OC-MCP,2x OC-EFIS,1x OC-USBexpCard,1x OC-Mastercard,widefs-client , SIOC IP:192.168.0.3

with this setup i managed to run OC-MCP without problems.
but i cant get the 2xEfis running same time....:-(

Maybe i have a mistake in Sioc.ini ?

Here my Sioc.ini:

[ fichero de configuracion para el SIOC ver. 3.52 ]
IOCP_port=8092
IOCP_timeout=4000
Minimized=No
toggle_delay=20
CONFIG_FILE=.\sioc.ssi
[************** IOCARDS MODULE ***************]
IOCard_disable=No
IOCard_LPT=No
[ MASTER=(Device index),(Type),(Number of cards),(Device number) ]
[ Device index : Index used in SIOC variable like device, this is the card used for SIOC sentence ]
[ Use 0 for only one card, for this value you not need specify Device number. If you not use DEVICE parameter in a definition in SIOC script, the default index used is 0]
[ type = 0 : Master Card Emulator ]
[ type = 1 : Master Card connected directly to parallel port ]
[ type = 2 : Master Card connected throught compatibility cable to parallel port ]
[ type = 3 : Expansion Card connected throught parallel port ]
[ type = 4 : USBExpansion Card used ]
[ type = 5 : Opencockpits MCP module ]
[ type = 6 : USBOutputs Card used ]
[ type = 7 : Opencockpits EFIS module ]
[ Number of Cards = Master cards connecteds, 1 to 4 for expansion cards, 1 for a Master card directly connected or Emulator ]
[ Number of device = 0 for Emulator or first USB card detected, parallel port address, device number for specifies USBexpansion card ]

MASTER=0,5,1,0 -------------->OC-MCP
MASTER=1,7,1,7 -------------->EFIS 1 detected as device7
MASTER=2,7,1,9 -------------->EFIS 2 detected as device9


[ Others Cards / Otras tarjetas ]
USBStepper=0,0
USBKeys=0,0
USBServos=0,0
USBRelays=0,0
USBDCmotor=0,0
USBAnalogic=0,0

[************** FSUIPC MODULE ***************]
FSUipcdisable=No
FSUipcRefresh=50

[************** IOCP CLIENTS MODULES ***************]
IOCPini_delay=3000
IOCPclient0_disable=no
IOCPclient0_host=192.168.0.1 ----------------->ip FS2004pc
IOCPclient0_port=8090
IOCPclient1_disable=Yes
IOCPclient1_host=localhost
IOCPclient1_port=8099
[************** SOUND MODULE ***************]
Sound_disable=yes
Volume=100
[ #1 ]
Sound=APDis.wav,-1,-1,-1
[************** KEYBOARD EMULATOR MODULE ***************]
[ Nombre exacto de la ventana donde se enviarán las teclas ]
[ Name of window for key send ]
[window = "Project Magenta Glass Cockpit - Build 396" ]
window =a.txt - Bloc de notas
[ Asignación de teclas ]
[ assign youe keys ]
#1=\B\A
#2=B
#3=C
#4=D
#5=E
#6=F
#7=G
#8=H
#9=I
#10=J
#11=K
#12=L
#13=M
#14=N
#15=O
#16=P
#17=Q
#18=R
#19=S
#20=T
#21=U
#22=V
#23=W
#24=X
#25=Y
#26=Z
#27=1
#28=2
#29=3
#30=4
#31=5
#32=6
#33=7
#34=8
#35=9
#36=0
#37=<
#38=,
#39=.
#40=-
#41=*
#42=+
#43=//
#44=/0
#45=/1
#46=/A
#47=
#48=
#49=
#50=
#51=
#52=
#53=
#54=
#55=
#56=
#57=
#58=
#59=
#60=
#61=
#62=
#63=
#64=
#65=
#66=
#67=
#68=
#69=
#70=
#71=
#72=
#73=
#74=
#75=
#76=
#77=
#78=
#79=
#80=
#81=
#82=
#83=
#84=
#85=
#86=
#87=
#88=<a
#200=<b
[ End of File ]


And here is my sioc script for MCP/EFIS

// ***************************************************
// DEFINICION DE VARIABLES // DEFINITION OF VARIABLES
// ***************************************************
// IOCARD MCP Default Flight Simulator 2004 ver 1.0


// *******************************
// INICIALIZATION / INICIALIZACION
// *******************************
Var 0000, Value 0 // Inicializa / Inicialization
{
&CONTADOR = 0
&CHECK = TIMER 999,0,25
&CMD = 1
&D_COURSE1 = 360
&D_COURSE2 = 360
&D_HDG = 360
&D_ALT = 4000
&D_VS = 0
&T_IAS = 140
&AP_IAS = 1
&AP_IAS = DELAY 0,10
&CBaroRot = 1
&CMinsROT = 1
&FBaroRot = 1
&FMinsROT = 1
&BaroSetting = 16211
&GenFlags = 3 // Power ON
&swCWXR = 1
&swCSTA = 1
&swCWPT = 1
&swCARPT = 1
&swCDATA = 1
&swCPOS = 1
&swCTERR = 1
&swCMTRS = 1
&swCFPV = 1
&swFWXR = 1
&swFSTA = 1
&swFWPT = 1
&swFARPT = 1
&swFDATA = 1
&swFPOS = 1
&swFTERR = 1
&swFMTRS = 1
&swFFPV = 1
}

Var 0001, name AP_MASTER_SW Link FSUIPC_INOUT, Offset $07BC, Length 4
{
IF &CMD = 1
{
IF &AP_MASTER_SW = 1
{
&O_CMDA = 1
&O_CMDB = 0
}
ELSE
{
&O_CMDA = 0
&O_CMDB = 0
}
}
ELSE
{
IF &AP_MASTER_SW = 1
{
&O_CMDA = 0
&O_CMDB = 1
}
ELSE
{
&O_CMDA = 0
&O_CMDB = 0
}
}
}
Var 0002, Link FSUIPC_INOUT, Offset $07C0, Length 4 // AP_LVL
{
// &O_LVLCHG = TESTBIT V0002 ,0 // LED_LVL
}
Var 0003, Link FSUIPC_INOUT, Offset $07C4, Length 4 // AP_NAV1
{
IF V0003 = 1
{
&O_LNAV = 1
}
ELSE
{
&O_LNAV = 0
}
}
Var 0004, Link FSUIPC_INOUT, Offset $07C8, Length 4 // AP_HDG_SEL
{
IF V0004 = 1
{
&O_HDGSEL = 1
}
ELSE
{
&O_HDGSEL = 0
}
}
Var 0005, name APD_HDG, Link FSUIPC_INOUT, Offset $07CC, Length 2 // APD_HDG
Var 0006, name AP_ALT, Link FSUIPC_INOUT, Offset $07D0, Length 4 // AP_ALT
{
IF &AP_ALT = 1
{
&O_VS = 1
}
ELSE
{
&O_VS = 0
}
}
Var 0007, name AP_IAS, Link FSUIPC_INOUT, Offset $07DC, Length 4 // AP_IAS
{
IF &AP_IAS = 1
{
&SPEED = 1
&O_SPEED = 1
&F_IAS = &T_IAS
}
ELSE
{
IF &AP_MACH = 0
{
&O_SPEED = 0
}
}
}
Var 0008, name APD_IAS, Link FSUIPC_INOUT, Offset $07E2, Length 2 // D_IAS
Var 0009, name APD_ALT, Link FSUIPC_INOUT, Offset $07D4, Length 4 // APD_ALT
// Var 0010, Link FSUIPC_INOUT, Offset $0764, Length 4 // AP_DISPONIBLE
Var 0011, name AP_MACH, Link FSUIPC_INOUT, Offset $07E4, Length 4 // AP_MACH
{
IF &AP_MACH = 1
{
&SPEED = 2
&O_SPEED = 1
}
ELSE
{
IF &AP_IAS = 0
{
&O_SPEED = 0
}
}
}
Var 0012, name APD_MACH, Link FSUIPC_INOUT, Offset $07E8, Length 4 // APD_MACH
Var 0013, Link FSUIPC_INOUT, Offset $3210, Length 2 // LOCALV_IAS/M
Var 0014, name APD_VS, Link FSUIPC_INOUT, Offset $07F2, Length 2, type 1 // D_V/S
Var 0015, Link FSUIPC_INOUT, Offset $0810, Length 4 // AP_AT
{
IF V0015 = 1
{
&O_AT = 1
}
ELSE
{
&O_AT = 0
}
}
Var 0016, Link FSUIPC_INOUT, Offset $2EE0, Length 4 // AP_FD
Var 0017, Link FSUIPC_INOUT, Offset $07C4, Length 4 // AP_NAV
Var 0018, Link FSUIPC_INOUT, Offset $0800, Length 4 // AP_APP
{
IF V0018 = 1
{
&O_APP = 1
}
ELSE
{
&O_APP = 0
}
}
Var 0019, Link FSUIPC_INOUT, Offset $0804, Length 4 // AP_BC
Var 0020, Link FSUIPC_INOUT, Offset $0808, Length 4 // AP_YD
Var 0021, name APD_COURSE1, Link FSUIPC_INOUT, Offset $0C4E, Length 2 // APD_COURSE1
Var 0022, name APD_COURSE2, Link FSUIPC_INOUT, Offset $0C5E, Length 2 // APD_COURSE2
Var 0023, name FS_IAS, Link FSUIPC_IN, Offset $02BC, Length 4 // IAS FS
Var 0024, name FS_MACH, Link FSUIPC_IN, Offset $11C6, Length 2 // IAS FS
Var 0025, Link FSUIPC_INOUT, Offset $07FC, Length 4 // AP_APP2

// **********************
// FUNCTIONS / FUNCIONES
// **********************
Var 50, name CMD
{
IF &CMD = 1
{
&O_CMDA = TESTBIT &AP_MASTER_SW ,0 // LED_AP_SW
}
ELSE
{
&O_CMDB = TESTBIT &AP_MASTER_SW ,0 // LED_AP_SW
}
}
Var 51, name SPEED
{
IF &SPEED <> 2
{
&O_DECIMAL = 0
&F_IAS = &T_IAS
}
ELSE
{
&O_DECIMAL = 1
&F_IAS = &T_MACH
}
}
var 52, name T_IAS
var 53, name T_MACH
var 54, name F_IAS
{
IF &SPEED <> 2
{
&O_DECIMAL = 0
&D_IAS = &F_IAS
&APD_IAS = DELAY &F_IAS,10
}
ELSE
{
&O_DECIMAL = 1
&D_IAS = &F_IAS
L0 = &F_IAS * 655.36
&APD_MACH = DELAY L0, 10
}
}
Var 56, name CHECK, Link SUBRUTINE
{
&CONTADOR = &CONTADOR + 1
IF &CONTADOR > 10000
{
&CONTADOR = 1000
}
ELSE
{
IF &CONTADOR > 4
{
IF &APD_VS <> &D_VS
{
&D_VS = &APD_VS
}
}
}
}
Var 57, name CONTADOR
// *************
// DISPLAYS 7-S
// *************
Var 100, name D_COURSE1, Link IOCARD_DISPLAY, Digit 0, Numbers 3
{
&APD_COURSE1 = &D_COURSE1
}
Var 102, name D_IAS, Link IOCARD_DISPLAY, Digit 3, Numbers 3
Var 104, name D_HDG, Link IOCARD_DISPLAY, Digit 6, Numbers 3
{
L1 = &D_HDG * 182.04444
L0 = L1 + 1
&APD_HDG = L0
}
Var 106, name D_ALT, Link IOCARD_DISPLAY, Digit 9, Numbers 5
{
L0 = &D_ALT * 19975.37
&APD_ALT = L0
}
Var 108, name D_VS, Link IOCARD_DISPLAY, Digit 14, Numbers 5
Var 110, name D_COURSE2, Link IOCARD_DISPLAY, Digit 19, Numbers 3
{
&APD_COURSE2 = &D_COURSE2
}
// *******************
// SALIDAS // OUTPUTS
// *******************
Var 200, name O_DECIMAL, Link IOCARD_OUT, Output 20
Var 202, name O_N1, Link IOCARD_OUT, Output 21
Var 204, name O_AT, Link IOCARD_OUT, Output 22
Var 206, name O_SPEED, Link IOCARD_OUT, Output 23
Var 208, name O_LVLCHG, Link IOCARD_OUT, Output 24
Var 210, name O_VNAV, Link IOCARD_OUT, Output 25
Var 212, name O_HDGSEL, Link IOCARD_OUT, Output 26
Var 214, name O_APP, Link IOCARD_OUT, Output 27
Var 216, name O_VORLOC, Link IOCARD_OUT, Output 28
Var 218, name O_LNAV, Link IOCARD_OUT, Output 29
Var 220, name O_ALTHLD, Link IOCARD_OUT, Output 30
Var 222, name O_VS, Link IOCARD_OUT, Output 31
Var 224, name O_CWSA, Link IOCARD_OUT, Output 32
Var 226, name O_CMDA, Link IOCARD_OUT, Output 33
Var 228, name O_CWSB, Link IOCARD_OUT, Output 34
Var 230, name O_CMDB, Link IOCARD_OUT, Output 35
// **********************************
// ROTARY-SWITCHES // ROTARY-ENCODERS
// **********************************
Var 300, name E_IAS, Link IOCARD_ENCODER, Input 0, Aceleration 4, Type 2
{
IF &SPEED <> 2
{
L0 = &E_IAS * -1
&T_IAS = LIMIT 0, 360, L0
&F_IAS = &T_IAS
}
ELSE
{
L0 = &E_IAS * -1
&T_MACH = LIMIT 0, 99, L0
&F_IAS = &T_MACH
}
}
Var 302, name E_ALT, Link IOCARD_ENCODER, Input 2, Aceleration 4, Type 2
{
L0 = &E_ALT * -100
&D_ALT = LIMIT 0, 50000, L0
}
Var 304, name E_COURSE1, Link IOCARD_ENCODER, Input 4, Aceleration 4, Type 2
{
L0 = &E_COURSE1 * -1
&D_COURSE1 = ROTATE 1, 360, L0
}
Var 306, name E_HDG, Link IOCARD_ENCODER, Input 6, Aceleration 4, Type 2
{
L0 = &E_HDG * -1
&D_HDG = ROTATE 1, 360, L0
}
Var 308, name E_COURSE2, Link IOCARD_ENCODER, Input 9, Aceleration 4, Type 2
{
L0 = &E_COURSE2 * -1
&D_COURSE2 = ROTATE 1, 360, L0
}
Var 310, name E_VS, Link IOCARD_ENCODER, Input 11, Aceleration 4, Type 2
{
L0 = &E_VS * -100
&D_VS = LIMIT -9000, 9000, L0
&CONTADOR = 0
&APD_VS = &D_VS
}
// *********
// SWITCHES
// *********
Var 400, name I_CO, Link IOCARD_SW, Input 13, type P
{
IF &O_SPEED = 1
{
IF &SPEED <> 0
{
IF &SPEED = 1
{
L0 = &FS_MACH / 204.80
&T_MACH = L0
&AP_MACH = 1
}
ELSE
{
L0 = &FS_IAS / 128
&T_IAS = L0
&AP_IAS = 1
}
}
}
}
Var 402, name I_FD2, Link IOCARD_SW, Input 14
Var 404, name I_DISENGAGE, Link IOCARD_SW, Input 15
Var 406, name I_FD1, Link IOCARD_SW, Input 16
{
IF &I_FD1 = 1
{
V0016 = 1
}
ELSE
{
V0016 = 0
}
}
Var 408, name I_CWSB, Link IOCARD_SW, Input 18
Var 410, name I_CMDB, Link IOCARD_SW, Input 19
{
IF &I_CMDB = 1
{
&CMD = 2
IF &AP_MASTER_SW = 1
{
&AP_MASTER_SW = 0
}
ELSE
{
&AP_MASTER_SW = 1
}
}
}
Var 412, name I_CWSA, Link IOCARD_SW, Input 20
Var 414, name I_CMDA, Link IOCARD_SW, Input 21
{
IF &I_CMDA = 1
{
&CMD = 1
IF &AP_MASTER_SW = 1
{
&AP_MASTER_SW = 0
}
ELSE
{
&AP_MASTER_SW = 1
}
}
}
Var 416, name I_VS, Link IOCARD_SW, Input 22
{
IF &I_VS = 1
{
IF &AP_ALT <> 1
{
&AP_ALT = 1
}
ELSE
{
&AP_ALT = 0
}
}
}
Var 418, name I_ALTHLD, Link IOCARD_SW, Input 23
Var 420, name I_APP, Link IOCARD_SW, Input 24
{
IF &I_APP = 1
{
IF V0018 <> 1
{
V0018 = 1
V0025 = 1
}
ELSE
{
V0018 = 0
V0025 = 0
}
}
}
Var 422, name I_VORLOC, Link IOCARD_SW, Input 25
Var 424, name I_LNAV, Link IOCARD_SW, Input 27
{
IF &I_LNAV = 1
{
IF V0017 <> 1
{
V0017 = 1
}
ELSE
{
V0017 = 0
}
}
}
Var 426, name I_HDGSEL, Link IOCARD_SW, Input 28
{
IF &I_HDGSEL = 1
{
IF V0004 <> 1
{
V0004 = 1
}
ELSE
{
V0004 = 0
}
}
}
Var 428, name I_LVLCHG, Link IOCARD_SW, Input 29
Var 430, name I_VNAV, Link IOCARD_SW, Input 30
Var 432, name I_SPEED, Link IOCARD_SW, Input 31
{
IF &I_SPEED = 1
{
IF &SPEED = 0
{
&AP_IAS = 1
}
ELSE
{
&AP_IAS = 0
&AP_MACH = 0
&SPEED = 0
}
}
}
Var 434, name I_N1, Link IOCARD_SW, Input 32
Var 436, name I_AT, Link IOCARD_SW, Input 33
{
IF &I_AT = 1
{
V0015 = 1
}
ELSE
{
V0015 = 0
}
}
// Define the SIOC variables used by OGS
Var 500, name CPTflags // Flags for CPT EFIS switches
Var 501, name FOflags // Flags for F/O EFIS switches
Var 502, name GenFlags // Flags for General use
Var 503, name CPTMins // Value for Minimums from CPT EFIS rotary
Var 504, name FOMins // Value for Minimums from F/0 EFIS rotary
Var 505, name V1speed // V1 value
Var 506, name V2speed // V2 value
Var 507, name VRspeed // VR value
Var 508, name dummy1 // reserved
Var 509, name dummy2 // reserved

//---------EFIS SECTION------------------------------------------------



//---------Captain Efis-------------------------------


// CAPT RANGE
Var 437, Link IOCARD_SW, Input 0 , name swCRng5 , DEVICE 7
{
IF &swCRng5 = 1
{
&CPTflags = SETBIT 0
}

ELSE
{
&CPTflags = CLEARBIT 0
}
}
// CAPT RANGE 10 NM
Var 438, Link IOCARD_SW, Input 1, name swCRng10 , DEVICE 7
{
IF &swCRng10 = 1
{
&CPTflags = SETBIT 1
}

ELSE
{
&CPTflags = CLEARBIT 1
}
}
// CAPT RANGE 20 NM
Var 439, Link IOCARD_SW, Input 2, name swCRng20 , DEVICE 7
{
IF &swCRng20 = 1
{
&CPTflags = SETBIT 2
}

ELSE
{
&CPTflags = CLEARBIT 2
}
}
// CAPT RANGE 40 NM
Var 440, Link IOCARD_SW, Input 3, name swCRng40 , DEVICE 7
{
IF &swCRng40 = 1
{
&CPTflags = SETBIT 3
}

ELSE
{
&CPTflags = CLEARBIT 3
}
}
// CAPT RANGE 80 NM
Var 441, Link IOCARD_SW, Input 4, name swCRng80 , DEVICE 7
{
IF &swCRng80 = 1
{
&CPTflags = SETBIT 4
}

ELSE
{
&CPTflags = CLEARBIT 4
}
}
// CAPT RANGE 160 NM
Var 442, Link IOCARD_SW, Input 5, name swCRng160 , DEVICE 7
{
IF &swCRng160 = 1
{
&CPTflags = SETBIT 5
}

ELSE
{
&CPTflags = CLEARBIT 5
}
}
// CAPT RANGE 320 NM
Var 443, Link IOCARD_SW, Input 6, name swCRng320 , DEVICE 7
{
IF &swCRng320 = 1
{
&CPTflags = SETBIT 6
}

ELSE
{
&CPTflags = CLEARBIT 6
}
}
// CAPT RANGE 640 NM
Var 444, Link IOCARD_SW, Input 7, name swCRng640 , DEVICE 7
{
IF &swCRng640 = 1
{
&CPTflags = SETBIT 7
}

ELSE
{
&CPTflags = CLEARBIT 7
}
}
//------------------------------- ND MODE ------------------------------------
Var 445, Link IOCARD_SW, Input 11, name swCNDMAP , DEVICE 7
{
IF &swCNDMAP = 1
{
&CPTflags = CLEARBIT 8
&CPTflags = CLEARBIT 9
}
}
Var 446, Link IOCARD_SW, Input 10, name swCNDVOR , DEVICE 7
{
IF &swCNDVOR = 1
{
&CPTflags = SETBIT 8
&CPTflags = CLEARBIT 9
}
}
Var 447, Link IOCARD_SW, Input 9, name swCNDAPP , DEVICE 7
{
IF &swCNDAPP = 1
{
&CPTflags = CLEARBIT 8
&CPTflags = SETBIT 9
}
}
Var 448, Link IOCARD_SW, Input 12, name swCNDPLN , DEVICE 7
{
IF &swCNDAPP = 1
{
&CPTflags = SETBIT 8
&CPTflags = SETBIT 9
}
}

//---------------------------- DISPLAYED DATA SWITCHES --------------------------
// CAPT WXR
Var 449, Link IOCARD_SW, Input 27, name swCWXR, type P , DEVICE 7
{
IF &swCWXR = 1
{

&CPTflags = CLEARBIT 10
}
ELSE
{

&CPTflags = SETBIT 10
}
}
// CAPT STA
Var 450, Link IOCARD_SW, Input 28, name swCSTA, type P , DEVICE 7
{
IF &swCSTA = 1
{

&CPTflags = CLEARBIT 11
}
ELSE
{

&CPTflags = SETBIT 11
}
}
// CAPT WPT
Var 451, Link IOCARD_SW, Input 29, name swCWPT, type P , DEVICE 7
{
IF &swCWPT = 1
{

&CPTflags = CLEARBIT 12
}
ELSE
{

&CPTflags = SETBIT 12
}
}
// CAPT ARPT
Var 452, Link IOCARD_SW, Input 30, , name swCARPT, type P , DEVICE 7
{
IF &swCARPT = 1
{

&CPTflags = CLEARBIT 13
}
ELSE
{

&CPTflags = SETBIT 13
}
}
// CAPT DATA
Var 453, Link IOCARD_SW, Input 31, name swCDATA, type P , DEVICE 7
{
IF &swCDATA = 1
{

&CPTflags = CLEARBIT 14
}
ELSE
{

&CPTflags = SETBIT 14
}
}
// CAPT POS
Var 454, Link IOCARD_SW, Input 32, name swCPOS, type P , DEVICE 7
{
IF &swCPOS = 1
{

&CPTflags = CLEARBIT 15
}
ELSE
{

&CPTflags = SETBIT 15
}
}
// CAPT TERR
Var 455, Link IOCARD_SW, Input 33, name swCTERR, type P , DEVICE 7
{
IF &swCTERR = 1
{

&CPTflags = CLEARBIT 16
}
ELSE
{

&CPTflags = SETBIT 16
}
}
//---------------------- CAPT ADF1 VOR1 ADF2 VOR2 ------------------------
Var 456, Link IOCARD_SW, Input 37, name swCADF1 , DEVICE 7
{
IF &swCADF1 = 1
{
&CPTflags = SETBIT 17
}

ELSE
{
&CPTflags = CLEARBIT 17
}
}
Var 457, Link IOCARD_SW, Input 36, name swCVOR1 , DEVICE 7
{
IF &swCVOR1 = 1
{
&CPTflags = SETBIT 18
}

ELSE
{
&CPTflags = CLEARBIT 18
}
}
Var 458, Link IOCARD_SW, Input 19, name swCADF2 , DEVICE 7
{
IF &swCADF2 = 1
{
&CPTflags = SETBIT 19
}

ELSE
{
&CPTflags = CLEARBIT 19
}
}
Var 459, Link IOCARD_SW, Input 18, name swCVOR2 , DEVICE 7
{
IF &swCVOR2 = 1
{
&CPTflags = SETBIT 20
}

ELSE
{
&CPTflags = CLEARBIT 20
}
}
//---------------------- CAPT inches/mbar AND radio/baro switches ------------------------
Var 460, Link IOCARD_SW, Input 25, name swCMinBR , DEVICE 7
{
IF &swCMinBR = 1
{
&CPTflags = SETBIT 21
}

ELSE
{
&CPTflags = CLEARBIT 21
}
}
Var 461, Link IOCARD_SW, Input 22, name swCINMB , DEVICE 7
{
IF &swCINMB = 1
{
&CPTflags = SETBIT 22
}

ELSE
{
&CPTflags = CLEARBIT 22
}
}
//---------------------- CAPT FPV push ------------------------
Var 462, Link IOCARD_SW, Input 34, name swCFPV, type P , DEVICE 7
{
IF &swCFPV = 1
{
&CPTflags = CLEARBIT 23
}
ELSE
{
&CPTflags = SETBIT 23
}
}

//---------------------- CAPT MTRS push ------------------------
Var 463, Link IOCARD_SW, Input 38, name swCMTRS, type P , DEVICE 7
{
IF &swCMTRS = 1
{
&CPTflags = CLEARBIT 24
}
ELSE
{
&CPTflags = SETBIT 24
}
}



//--------------------- CAPT Baro setting -------------------------
Var 464, Link IOCARD_ENCODER, input 20, Aceleration 1, name CBaroROT, Type 2 , DEVICE 7
{
L0 = &CBaroRot * 1
&BaroSetting = LIMIT 15168,17344,L0
}
Var 465, link IOCP, offset 73, name BaroSetting
//--------------------- CAPT Mins setting -------------------------
Var 466, Link IOCARD_ENCODER, input 23, Aceleration 1, name CMinsROT, Type 2 , DEVICE 7
{
L0 = &CMinsRot * 1
&CPTMins = LIMIT 0,10000,L0
}
// ------------------------------------------------------------------------------------------
//---FO EFIS---------------------------
// FO RANGE
Var 467, Link IOCARD_SW, Input 0 , name swFRng5 , DEVICE 9
{
IF &swFRng5 = 1
{
&FOflags = SETBIT 0
}

ELSE
{
&FOflags = CLEARBIT 0
}
}
// FO RANGE 10 NM
Var 468, Link IOCARD_SW, Input 1, name swFRng10 , DEVICE 9
{
IF &swFRng10 = 1
{
&FOflags = SETBIT 1
}

ELSE
{
&FOflags = CLEARBIT 1
}
}
// FO RANGE 20 NM
Var 469, Link IOCARD_SW, Input 2, name swFRng20 , DEVICE 9
{
IF &swFRng20 = 1
{
&FOflags = SETBIT 2
}

ELSE
{
&FOflags = CLEARBIT 2
}
}
// FO RANGE 40 NM
Var 470, Link IOCARD_SW, Input 3, name swFRng40 , DEVICE 9
{
IF &swFRng40 = 1
{
&FOflags = SETBIT 3
}

ELSE
{
&FOflags = CLEARBIT 3
}
}
// FO RANGE 80 NM
Var 471, Link IOCARD_SW, Input 4, name swFRng80 , DEVICE 9
{
IF &swFRng80 = 1
{
&FOflags = SETBIT 4
}

ELSE
{
&FOflags = CLEARBIT 4
}
}
// FO RANGE 160 NM
Var 472, Link IOCARD_SW, Input 5, name swFRng160 , DEVICE 9
{
IF &swFRng160 = 1
{
&FOflags = SETBIT 5
}

ELSE
{
&FOflags = CLEARBIT 5
}
}
// FO RANGE 320 NM
Var 473, Link IOCARD_SW, Input 6, name swFRng320 , DEVICE 9
{
IF &swFRng320 = 1
{
&FOflags = SETBIT 6
}

ELSE
{
&FOflags = CLEARBIT 6
}
}
// FO RANGE 640 NM
Var 474, Link IOCARD_SW, Input 7, name swFRng640 , DEVICE 9
{
IF &swFRng640 = 1
{
&FOflags = SETBIT 7
}

ELSE
{
&FOflags = CLEARBIT 7
}
}
//------------------------------- ND MODE ------------------------------------
Var 475, Link IOCARD_SW, Input 11, name swFNDMAP , DEVICE 9
{
IF &swFNDMAP = 1
{
&FOflags = CLEARBIT 8
&FOflags = CLEARBIT 9
}
}
Var 476, Link IOCARD_SW, Input 10, name swFNDVOR , DEVICE 9
{
IF &swFNDVOR = 1
{
&FOflags = SETBIT 8
&FOflags = CLEARBIT 9
}
}
Var 477, Link IOCARD_SW, Input 9, name swFNDAPP , DEVICE 9
{
IF &swFNDAPP = 1
{
&FOflags = CLEARBIT 8
&FOflags = SETBIT 9
}
}
Var 478, Link IOCARD_SW, Input 12, name swFNDPLN , DEVICE 9
{
IF &swFNDAPP = 1
{
&FOflags = SETBIT 8
&FOflags = SETBIT 9
}
}

//---------------------------- DISPLAYED DATA SWITCHES --------------------------
// FO WXR
Var 479, Link IOCARD_SW, Input 27, name swFWXR, type P , DEVICE 9
{
IF &swFWXR = 1
{

&FOflags = CLEARBIT 10
}
ELSE
{

&FOflags = SETBIT 10
}
}
// FO STA
Var 480, Link IOCARD_SW, Input 28, name swFSTA, type P , DEVICE 9
{
IF &swFSTA = 1
{

&FOflags = CLEARBIT 11
}
ELSE
{

&FOflags = SETBIT 11
}
}
// FO WPT
Var 481, Link IOCARD_SW, Input 29, name swFWPT, type P , DEVICE 9
{
IF &swFWPT = 1
{

&FOflags = CLEARBIT 12
}
ELSE
{

&FOflags = SETBIT 12
}
}
// FO ARPT
Var 482, Link IOCARD_SW, Input 30, , name swFARPT, type P , DEVICE 9
{
IF &swFARPT = 1
{

&FOflags = CLEARBIT 13
}
ELSE
{

&FOflags = SETBIT 13
}
}
// FO DATA
Var 483, Link IOCARD_SW, Input 31, name swFDATA, type P , DEVICE 9
{
IF &swFDATA = 1
{

&FOflags = CLEARBIT 14
}
ELSE
{

&FOflags = SETBIT 14
}
}
// FO POS
Var 484, Link IOCARD_SW, Input 32, name swFPOS, type P , DEVICE 9
{
IF &swFPOS = 1
{

&FOflags = CLEARBIT 15
}
ELSE
{

&FOflags = SETBIT 15
}
}
// FO TERR
Var 485, Link IOCARD_SW, Input 33, name swFTERR, type P , DEVICE 9
{
IF &swFTERR = 1
{

&FOflags = CLEARBIT 16
}
ELSE
{

&FOflags = SETBIT 16
}
}
//---------------------- FO ADF1 VOR1 ADF2 VOR2 ------------------------
Var 486, Link IOCARD_SW, Input 37, name swFADF1 , DEVICE 9
{
IF &swFADF1 = 1
{
&FOflags = SETBIT 17
}

ELSE
{
&FOflags = CLEARBIT 17
}
}
Var 487, Link IOCARD_SW, Input 36, name swFVOR1 , DEVICE 9
{
IF &swFVOR1 = 1
{
&FOflags = SETBIT 18
}

ELSE
{
&FOflags = CLEARBIT 18
}
}
Var 488, Link IOCARD_SW, Input 19, name swFADF2 , DEVICE 9
{
IF &swFADF2 = 1
{
&FOflags = SETBIT 19
}

ELSE
{
&FOflags = CLEARBIT 19
}
}
Var 489, Link IOCARD_SW, Input 18, name swFVOR2 , DEVICE 9
{
IF &swFVOR2 = 1
{
&FOflags = SETBIT 20
}

ELSE
{
&FOflags = CLEARBIT 20
}
}
//---------------------- FO inches/mbar AND radio/baro switches ------------------------
Var 490, Link IOCARD_SW, Input 25, name swFMinBR , DEVICE 9
{
IF &swFMinBR = 1
{
&FOflags = SETBIT 21
}

ELSE
{
&FOflags = CLEARBIT 21
}
}
Var 491, Link IOCARD_SW, Input 22, name swFINMB , DEVICE 9
{
IF &swFINMB = 1
{
&FOflags = SETBIT 22
}

ELSE
{
&FOflags = CLEARBIT 22
}
}
//---------------------- FO FPV push ------------------------
Var 492, Link IOCARD_SW, Input 34, name swFFPV, type P , DEVICE 9
{
IF &swFFPV = 1
{
&FOflags = CLEARBIT 23
}
ELSE
{
&FOflags = SETBIT 23
}
}

//---------------------- FO MTRS push ------------------------
Var 493, Link IOCARD_SW, Input 38, name swFMTRS, type P , DEVICE 9
{
IF &swFMTRS = 1
{
&FOflags = CLEARBIT 24
}
ELSE
{
&FOflags = SETBIT 24
}
}

//--------------------- FO Baro setting -------------------------
Var 494, Link IOCARD_ENCODER, input 20, Aceleration 1, name FBaroROT, Type 2 , DEVICE 9
{
L0 = &FBaroRot * 1
&BaroSetting = LIMIT 15168,17344,L0
}

//--------------------- FO Mins setting -------------------------
Var 495, Link IOCARD_ENCODER, input 23, Aceleration 1, name FMinsROT, Type 2 , DEVICE 9
{
L0 = &FMinsRot * 1
&FOMins = LIMIT 0,10000,L0
}
// ------------------------------------------------------------------------------------------


I really appreshiate any suggestions:roll:

I`m getting used to programm sioc scripts but some things are very unclear!

The Var numbers in all scripts must they in order like var 100 var 102 ->var 9999 ?

must i compile all scripts in one script like above?
I`ve seen an option with sioc.lst where you write the names of all scripts

and write in sioc.ini where you write the name of the script -->sioc.lst

Is this right? all sripts should then compiled in real time?

So much things to ask......

without the help of you cracks out there i guess i`m totaly lost right now:-(

Greetings and happy flying

George

nricky
04-27-2008, 05:28 AM
Hi George

I guess it it time that you an I will talk on the phone, this way it will be much easier to explain a few thinks how everything works. Writing everything you want to know will take a few pages to explain.

Please give me you phone number an I will give you a call later. Here my E-Mail norbert@nrick.net and also tell me if you have time today.

Cheers Norbert

kiek
04-27-2008, 05:29 AM
Hi George,

Your sioc.ini is ok

MASTER=1,7,1,7 -------------->EFIS 1 detected as device7
MASTER=2,7,1,9 -------------->EFIS 2 detected as device9


but you are using the wrong (logical) device numbers in your SIOC script:
replace DEVICE 7 by DEVICE 1 and DEVICE 9 by DEVICE 2

Explanation: In the MASTER statements in SIOC.INI you link a logical device number, it is the first number after the equal sign, (to be used in your SIOC script) to the physical device number of your USB card or MCP or EFIS or whatever...

If you change this, it will work, I'd say...

About your other questions:

>must they in order like var 100 var 102 ->var 9999 ?
No, they only have to be unique (in your application, so also if you are using more then 1 file)


>must i compile all scripts in one script like above?
No, but why should you not? It's easier to keep overview and compilation is very very fast. My complete cockpitfile (3500 lines, 693 SIOC Vars compiles in config_sioc.exe in 0.7 seconds ...)

BTW: I'd recommend to use a real name for your application, and to use that name for as well your sioc script (.txt file) as the compiled file (.ssi) file. I see you are working with the default sioc.ssi, this approach is prone to errors...

I'm glad to be of help. SIOC is such a powerful (and free) tool for cockpit builders.

Regards,
Nico

Georg Schneider
04-27-2008, 05:48 PM
Hi Nico!

Thanks a lot for helping me out!

I tryed your tips and get the EFIS to work with iopc-console.
t least now i know it works.

But the sad thing is that it only works in iocpconsole.

With the script i posted last post it seams no data is sent to the pc where
OGS120 runs on.

When you look at the end of the script there is an iopc offset 73 for barro
setting.
This is the only thing works right. I can change the rotary in evey direktion and i can see the change on the OGS120 PFD screen.

The other switches and rotarys do not work.

But in the iopc console everything works well.:evil:

Thats a big :?: for me.

Maybe i write to Oliver in the OGS forum if he knows why i have
no visible changes in OGS

Greetings

George

Georg Schneider
04-28-2008, 03:45 PM
Hey Nico !:smile::rolleyes::cool::D

Guess what !?

With your help and the help from Norbert by phone i managed

to get both OC-EFIS and the OC-AP to work flawlessly with OGS120 and
FS2004:rolleyes:

After whole night reading rewriting scripts and testing i found out the problem:!:

I had a mistake in the var order and forgot to activate the "useiocards" in
OGS120 .ini !
I had an # in front to deactivate it because i thought you need this function only when you work with mastercard/USBexp.

By the way Nick ! Thanks for the very nice informative new sioc tutorial
on your HP:D

It is very usefull for me and i guess for whole community !
Thanks so much for that;)

Now i`m perfecting my script for OC-EFIS/AP/OGS120 because some function do not work like in the real thing(baro/std)

When it is working perfectly i will post the script here and on OC-Site
for the Community!

Thats all for right now!
Writing news on the script pretty soon next days!

Greetings and as allways happy flying

George