View Full Version : Efis and mcp together on pmdg
barkay
08-03-2008, 01:44 AM
Dear cockpit builders,
I have purchased OpenCockpits MCP and EFIS module. I know this might be the millionth time you read such questions wich all of you have been through but I probably have the same problem with all of you when you have started this.
My MCP works perfect, no problems at all, However the EFIS only works on the baro setting and nothing else. Even though the sioc does whatever it programmed to do when I looked at the code I found out some parameters defined with unknown offsets for FSUIPC like 04F8.
I have downloaded the code from opencockpits site. I am suspecting that this is for Project Magenta as the offset does not show on FSUIPC SDK.
I have also tried to send key presses thorugh the emulator exactly as the MCP module does but that seems to not to work even though I have cheked the key config from PMDG comand set and entered manually from the keyboard.
Please help,
Thank you in advance,
You might want to check this thread.
http://www.mycockpit.org/forums/showthread.php?t=12908
He shows the programming for a B-737. Maybe you can get some ideas?
Good luck. Opencockpiots is great stuff. But it can be **** getting it to work.
Trevor Hale
08-03-2008, 10:01 PM
Someone just reported this same issue. Update the firmware on your cpflight stuff, and you will be all set.
Trev
Dear cockpit builders,
I have purchased OpenCockpits MCP and EFIS module. I know this might be the millionth time you read such questions wich all of you have been through but I probably have the same problem with all of you when you have started this.
My MCP works perfect, no problems at all, However the EFIS only works on the baro setting and nothing else. Even though the sioc does whatever it programmed to do when I looked at the code I found out some parameters defined with unknown offsets for FSUIPC like 04F8.
I have downloaded the code from opencockpits site. I am suspecting that this is for Project Magenta as the offset does not show on FSUIPC SDK.
I have also tried to send key presses thorugh the emulator exactly as the MCP module does but that seems to not to work even though I have cheked the key config from PMDG comand set and entered manually from the keyboard.
Please help,
Thank you in advance,
barkay
08-04-2008, 12:27 PM
Thanks for the answers, after struggling for 3 days I have finally get it to work. It turns out to be that I am right.PMDG does not support the FSUIPS offsets given in the programming text of EFIS by Opencockpits. Those offsets are for PM software. So I ended up using the good old keyboard emulator and get most functions to work. The last bit is the rotary switches. It will always bother me but since there is no FSUIPC offset I am gonna have to reset all the rotary switches before I run the simulator to PMDG Cold and Dark alues. In other words EFIS ND mode should be in APP and the range should be in 5 miles.
The only problem left now is the RADIOand BARO rotary switch. I am gonna have to find a good way to make it work but it will take some more days I guess.
Nevertheless any ideas will be appreciated.
Thanks again
Barkay
P.S. What do you exactly mean by upgrade your firmware. I did not come across such a thing in Opencockpits web site. Can you please explain?
Michael Carter
08-04-2008, 12:51 PM
You can set up the radio encoder pots the same way, but you will have to return to the default FS frequencies before shutting down the sim (if you have a frequency display on the radios).
You can edit the default frequencies if you wish. I have mine set up for Innsbruck since I depart a lot from that airport.
Thanks for the answers, after struggling for 3 days I have finally get it to work. It turns out to be that I am right.PMDG does not support the FSUIPS offsets given in the programming text of EFIS by Opencockpits. Those offsets are for PM software. So I ended up using the good old keyboard emulator and get most functions to work. The last bit is the rotary switches. It will always bother me but since there is no FSUIPC offset I am gonna have to reset all the rotary switches before I run the simulator to PMDG Cold and Dark alues. In other words EFIS ND mode should be in APP and the range should be in 5 miles.
The only problem left now is the RADIOand BARO rotary switch. I am gonna have to find a good way to make it work but it will take some more days I guess.
Nevertheless any ideas will be appreciated.
Thanks again
Barkay
ffice:office" /><O:p></O:p>
P.S. What do you exactly mean by upgrade your firmware. I did not come across such a thing in Opencockpits web site. Can you please explain?
Hi Barkey, I have the same OC setup as you... and the same issues of course. I have asked OC about this (and some other issues) and got this reply:
Hi Conny<O:p></O:p>
We have found that some differences between FS2004 and FSX concerning the MCP inputs and outputs. <O:p></O:p>
In FSX
Var 216, name O_VORLOC, Link IOCARD_OUT, Output 29 (instead of 28)
Var 218, name O_LNAV, Link IOCARD_OUT, Output 28 (instead of 29)
Var 422, name I_VORLOC, Link IOCARD_SW, Input 27 (instead of 25)
Var 424, name I_LNAV, Link IOCARD_SW, Input 25 (instead of 27)<O:p></O:p>
<O:p></O:p>
This solves the VORLOC/LNAV and Alt HELD/VS problem<O:p></O:p>
<O:p></O:p>
As FS2004 did not have the C/O and N1 functions in his MCP, there are no variables allocated.<O:p></O:p>
We are actually working in a complete solution for FSX default airplanes MCP and EFIS, that will not need FSUIPC. We expect this to be a matter of one or two weeks.
So it seems like there are some fixes that will be done soon :p
However I would appreciate if you could share your SIOC fixes so far.
Right now I only got Baro settings to work.
This is what it looks like.
Var 0000, Value 0
{
&SUB_BAR = 1023
Var 0204, name I_BARONSW, Link IOCARD_SW, Device 1, Input 22
{
IF &I_BARONSW = 1
{
&SUB_BAR = 1013
L0 = 1013 * 16
L0 = L0 + 1
&FS_QNH = L0
Var 0216, name E_BARO, Link IOCARD_ENCODER, Device 1, Input 20, Aceleration 1, Type 2
{
L0 = &E_BARO * -1
&SUB_BAR = &SUB_BAR + L0
Someone just reported this same issue. Update the firmware on your cpflight stuff, and you will be all set.
Trev
Think it's s slight missunderstanding as he is using OC not CPFlight.
There is no firmware on OC to be updated.
barkay
08-05-2008, 11:05 AM
CoNa,
Thanks for the effort. I am on a business trip right now but I will post my files on firday. Right now I got all the function buttons working (FPV, MTRS, WXR,STA etc.) Baro is working no problem however as there is no push button down there for MB and InHG I willassign one of the unusued buttons maybe like TERR to it.
Problem still continues in the ND range and the ND mode switches.
I could not come up with a logic to send keys yet. I know how to send keys but the sequence is bad
For example, PMDG opens ND mode in MAP mode by default.
If I want to get it forward to pln mode all I have to do is to tell sioc that if PLN variable is 1 the send the key pres to increase ND mode one notch. When I want to come back from that and I say If MAP mode equals 1 then I can again take it one notch back, but since I can not read via offsets I can not initialize the value so if I start on MAP mode as default SIOC sees the MAP value as 1 and tries to decrease the mode and vice versa. So I am still trying to come up to a solution. One of the posts was mentioning an additional software called OGS. I think somethign similar to PM in a very basic way but reserves its offsets. So If I can initialize the condition than it is down hill from there.
Best Regards,
barkay
08-10-2008, 06:05 AM
Dear Friends,
Finally everything works perfect except one little initialization problem. I could not solve it yet.
Before giving the files let me talk about this problem. Since there no specific offset for the EFIS switches in PMDG my problem is I can not initialize the position of the ND Mode and ND Range. If I have left them in values other than ND Mode=MAP and ND Range=5 (which are the default PMDG loading) system does not recognise the position of the button. So ıave to make one full ound to initialize it manually. Except this everthing with the below sioc.ini, and sioc.txt works perfect.
NOTE: I have changed a lot of button settings in PMDG key settings for EFIS and MCP. They are in Sioc.ini file. If you do ot understand them I can also send you the keys I have set
*********FIRST THE 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,32
MASTER=1,7,1,33
[ 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=localhost
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 =Microsoft Flight Simulator 2004 - A Century of flight with WideServer.waiting for clients
[ Asignación de teclas ]
[ assign youe keys ]
#1=
#2=
#3=
#4=
#5=
#6=
#7=
#8=
#9=
#10=
#11=
#12=
#13=
#14=
#15=
#16=
#17=
#18=
#19=
#20=
#21=
#22=
#23=
#24=
#25=
#26=\3\1Y\2\4
#27=
#28=
#29=
#30=
#31=
#32=
#33=
#34=
#35=
#36=
#37=
#38=
#39=
#40=
#41=
#42=
#43=
#44=\1R\2
#45=\3\I\4
#46=\1\G\2
#47=\3\L\4
#48=\3\1H\2\4
#49=\1\O\2
#50=\3\1V\2\4
#51=\3M\4
#52=\3\1Z\2\4
#53=\3\F\4
#54=\3\1\O\2\4
#55=\3\1P\2\4
#56=\3F\4
#57=\3V\4
#58=\3P\4
#59=\3I\4
#60=\1I\2
#61=\3\1N\2\4
#62=\3H\4
#63=\3A|4
#64=\3Z\4
#65=\3\H\4
#66=\3\1A\2\4
#67=\1\H\2
#68=\3\1\H\2\4
#69=\3N\4
#70=\3O\4
#71=\3\I\4
#72=\1\G\2
#73=\3\1\G\2\4
#74=
#75=\1\BM\2
#76=\3\1M\2\4
#77=\1\P\2
#78=\3,\4
#79=
#80=\3\1R\2\4
#81=\3\1Q\2\4
#82=\3\1X\2\4
#83=\3\1E\2\4
#84=\3\1T\2\4
#85=\3\1,\2\4
#86=\3\1O\2\4
#87=\3\1C\2\4
#88=\3\1K\2\4
#89=\3\11\2\4
#90=\3\13\2\4
#91=\3\12\2\4
#92=\3\14\2\4
#93=\3\1S\2\4
#94=\3\1L\2\4
#95=\3K\4
#96=\3J\4
#200=
[ End of File ]
*********NOW THE SIOC.TXT*************
// *****************************************************************************
// * Config_SIOC ver 3.5 - By Manolo Vélez - www.opencockpits.com
// *****************************************************************************
// * FileName : sioc.txt
// * Date : 09.08.2008
Var 0001, name keys, Link KEYS // variable transfert emulateur clavier ( S
Var 0002, name MEMHDG, Value 0
Var 0003, name IAS, Link FSUIPC_IN, Offset $02BC, Length 4
Var 0004, name MACH, Link FSUIPC_IN, Offset $11C6, Length 2
Var 0005, name MEMALT, Value 10000
Var 0006, Value 0
{
&SUB_BAR = 1023
}
Var 0007, name CPTflags // Flags for CPT EFIS ND MODE switches
Var 0008, name Rngflags, Value 1 // range changer
Var 0010, name FDLEFTled, Link IOCARD_OUT, Output 39
Var 0011, name ATled, Link IOCARD_OUT, Output 22
Var 0012, name N1led, Link IOCARD_OUT, Output 21
Var 0013, name SPEEDled, Link IOCARD_OUT, Output 23
Var 0014, name LVLCHGled, Link IOCARD_OUT, Output 24
Var 0015, name HDGled, Link IOCARD_OUT, Output 26
Var 0016, name VNAVled, Link IOCARD_OUT, Output 25
Var 0017, name LNAVled, Link IOCARD_OUT, Output 29
Var 0018, name VORLOCled, Link IOCARD_OUT, Output 28
Var 0019, name APPled, Link IOCARD_OUT, Output 27
Var 0020, name ALTHOLDled, Link IOCARD_OUT, Output 30
Var 0021, name VSled, Link IOCARD_OUT, Output 31
Var 0022, name CMDAled, Link IOCARD_OUT, Output 33
Var 0023, name CMDBled, Link IOCARD_OUT, Output 35
Var 0024, name CWSAled, Link IOCARD_OUT, Output 32
Var 0025, name CWSBled, Link IOCARD_OUT, Output 34
Var 0026, name VSminus, Link IOCARD_OUT, Output 45
Var 0027, name IASpoint, Link IOCARD_OUT, Output 20
Var 0030, name CRSLEFTdisplay, Link IOCARD_DISPLAY, Digit 0, Numbers 3
Var 0031, name IASdisplay, Link IOCARD_DISPLAY, Digit 3, Numbers 3
Var 0032, name HDGdisplay, Link IOCARD_DISPLAY, Digit 6, Numbers 3
Var 0033, name ALTdisplay, Link IOCARD_DISPLAY, Digit 9, Numbers 5
Var 0034, name VSdisplay, Link IOCARD_DISPLAY, Digit 14, Numbers 5
Var 0035, name CRSRdisplay, Link IOCARD_DISPLAY, Digit 19, Numbers 3
Var 0040, name MCPstatus, Link FSUIPC_IN, Offset $62BC, Length 4
{
&FDLEFTled = TESTBIT &MCPstatus ,12
&ATled = TESTBIT &MCPstatus ,14
&N1led = TESTBIT &MCPstatus ,15
&SPEEDled = TESTBIT &MCPstatus ,16
&VNAVled = TESTBIT &MCPstatus ,18
&LVLCHGled = TESTBIT &MCPstatus ,17
&HDGled = TESTBIT &MCPstatus ,22
&LNAVled = TESTBIT &MCPstatus ,19
&VORLOCled = TESTBIT &MCPstatus ,20
&APPled = TESTBIT &MCPstatus ,21
&ALTHOLDled = TESTBIT &MCPstatus ,23
&VSled = TESTBIT &MCPstatus ,24
&CMDAled = TESTBIT &MCPstatus ,8
&CMDBled = TESTBIT &MCPstatus ,9
&CWSAled = TESTBIT &MCPstatus ,25
&CWSBled = TESTBIT &MCPstatus ,26
CALL &HDGaff
CALL &IASaff
CALL &ALTaff
CALL &VSaff
}
Var 0041, name SPDINTV, Link FSUIPC_IN, Offset $62C0, Length 1
{
CALL &IASaff
}
Var 0042, name COstatus, Link FSUIPC_IN, Offset $621E, Length 2
{
CALL &IASaff
}
Var 0050, name CRSpmdg, Link FSUIPC_IN, Offset $0C4E, Length 2
{
IF &CRSpmdg = 360
{
&CRSLEFTdisplay = 0
}
ELSE
{
&CRSLEFTdisplay = &CRSpmdg
}
}
Var 0051, name IASpmdg, Link FSUIPC_IN, Offset $6220, Length 2
{
CALL &IASaff
}
Var 0052, name hdgpmdg, Link FSUIPC_IN, Offset $622C, Length 2
{
CALL &HDGaff
}
Var 0053, name ALTpmdg, Link FSUIPC_IN, Offset $622E, Length 2
{
CALL &ALTaff
}
Var 0054, name VSpmdg, Link FSUIPC_IN, Offset $6230, Length 2
{
CALL &VSaff
}
Var 0055, name CRS2pmdg, Link FSUIPC_IN, Offset $0C4E, Length 2
{
IF &CRS2pmdg = 360
{
&CRSRdisplay = 0
}
ELSE
{
&CRSRdisplay = &CRS2pmdg
}
}
Var 0060, name FDswitch, Link IOCARD_SW, Input 16
{
IF &FDswitch = 1
{
IF &FDLEFTled = 0
{
&keys = 56
&keys = 0
}
}
ELSE
{
IF &FDswitch = 0
{
IF &FDLEFTled = 1
{
&keys = 56
&keys = 0
}
}
}
}
Var 0061, name ATswitch, Link IOCARD_SW, Input 33
{
IF &ATswitch = 1
{
IF &ATled = 0
{
&keys = 44
&keys = 0
}
}
ELSE
{
IF &ATswitch = 0
{
IF &ATled = 1
{
&keys = 44
&keys = 0
}
}
}
}
Var 0062, name N1bp, Link IOCARD_SW, Input 32
{
IF &N1bp = 1
{
&keys = 61
&keys = 0
}
}
Var 0063, name SPEEDbp, Link IOCARD_SW, Input 31
{
IF &SPEEDbp = 1
{
&keys = 51
&keys = 0
}
}
Var 0064, name VNAVbp, Link IOCARD_SW, Input 30
{
IF &VNAVbp = 1
{
&keys = 57
&keys = 0
}
}
Var 0065, name LVLCHGbp, Link IOCARD_SW, Input 29
{
IF &LVLCHGbp = 1
{
&keys = 59
&keys = 0
}
}
Var 0066, name HDGbp, Link IOCARD_SW, Input 28
{
IF &HDGbp = 1
{
&keys = 62
&keys = 0
}
}
Var 0067, name LNAVbp, Link IOCARD_SW, Input 27
{
IF &LNAVbp = 1
{
&keys = 69
&keys = 0
}
}
Var 0068, name VORLOCbp, Link IOCARD_SW, Input 25
{
IF &VORLOCbp = 1
{
&keys = 70
&keys = 0
}
}
Var 0069, name APPbp, Link IOCARD_SW, Input 24
{
IF &APPbp = 1
{
&keys = 63
&keys = 0
}
}
Var 0070, name ALTHOLDbp, Link IOCARD_SW, Input 23
{
IF &ALTHOLDbp = 1
{
&keys = 64
&keys = 0
}
}
Var 0071, name VSbp, Link IOCARD_SW, Input 22
{
IF &VSbp = 1
{
&keys = 58
&keys = 0
}
}
Var 0072, name CMDAbp, Link IOCARD_SW, Input 21
{
IF &CMDAbp = 1
{
&keys = 66
&keys = 0
}
}
Var 0073, name CMDBbp, Link IOCARD_SW, Input 19
{
IF &CMDBbp = 1
{
&keys = 67
&keys = 0
}
}
Var 0074, name CWSAbp, Link IOCARD_SW, Input 20
{
IF &CWSAbp = 1
{
&keys = 65
&keys = 0
}
}
Var 0075, name CWSBbp, Link IOCARD_SW, Input 18
{
IF &CWSBbp = 1
{
&keys = 68
&keys = 0
}
}
Var 0076, name APDISCObp, Link IOCARD_SW, Input 15
{
IF &APDISCObp = 1
{
&keys = 26
&keys = 0
}
ELSE
{
&keys = 26
&keys = 0
}
}
Var 0077, name CObp, Link IOCARD_SW, Input 13
{
IF &CObp = 1
{
&keys = 60
&keys = 0
}
}
Var 0078, name FDRswitch, Link IOCARD_SW, Input 14
{
IF &FDRswitch = 1
{
&keys = 73
&keys = 0
}
ELSE
{
&keys = 73
&keys = 0
}
}
Var 0080, name CRSLEFTrot, Link IOCARD_ENCODER, Input 4, Aceleration 1, Type 2
{
IF &CRSLEFTrot = 1
{
&keys = 45
&keys = 0
}
ELSE
{
&keys = 46
&keys = 0
}
}
Var 0081, name IASrot, Link IOCARD_ENCODER, Input 0, Aceleration 1, Type 2
{
IF &IASrot = 1
{
&keys = 49
&keys = 0
}
ELSE
{
&keys = 50
&keys = 0
}
}
Var 0082, name HDGrot, Link IOCARD_ENCODER, Input 6, Aceleration 1, Type 2
{
IF &HDGrot = 1
{
&keys = 47
&keys = 0
}
ELSE
{
&keys = 48
&keys = 0
}
IF &HDGled = 0
{
L0 = &HDGrot * -1
&MEMHDG = ROTATE 0 ,359 ,L0
}
CALL &HDGaff
}
Var 0083, name ALTrot, Link IOCARD_ENCODER, Input 2, Aceleration 1, Type 2
{
IF &ALTrot = 1
{
&keys = 53
&keys = 0
}
ELSE
{
&keys = 52
&keys = 0
}
IF &VNAVled = 1
{
L0 = &ALTrot * -100
&MEMALT = LIMIT 0 ,50000 ,L0
CALL &ALTaff
}
}
Var 0084, name VSrot, Link IOCARD_ENCODER, Input 11, Aceleration 1, Type 2
{
IF &VSrot = 1
{
&keys = 54
&keys = 0
}
ELSE
{
&keys = 55
&keys = 0
}
}
Var 0085, name CRSRIGHTrot, Link IOCARD_ENCODER, Input 9, Aceleration 1, Type 2
{
IF &CRSRIGHTrot = 1
{
&keys = 45
&keys = 0
}
ELSE
{
&keys = 46
&keys = 0
}
}
Var 9999, name VSaff, Link SUBRUTINE
{
IF &VSled = 1
{
IF &VSpmdg < 60000
{
&VSdisplay = &VSpmdg
&VSminus = 0
}
ELSE
{
L0 = &VSpmdg - 65536
&VSdisplay = L0
&VSminus = 1
}
}
ELSE
{
&VSdisplay = -999999
&VSminus = 0
}
}
Var 9998, name IASaff, Link SUBRUTINE
{
C0 = &SPDINTV = 21
C0 = C0 AND &VNAVled
IF C0
{
&IASdisplay = -999999
}
ELSE
{
IF &COstatus < 4
{
&IASdisplay = &IASpmdg
&IASpoint = 0
}
ELSE
{
L0 = &IASpmdg / &IAS
L0 = L0 * 12800
L0 = L0 * &MACH
&IASdisplay = L0 / 20480
&IASpoint = 1
}
}
}
Var 9997, name HDGaff, Link SUBRUTINE
{
IF &LNAVled = 0
{
IF &hdgpmdg = 360
{
&MEMHDG = 0
}
ELSE
{
&MEMHDG = &hdgpmdg
}
}
&HDGdisplay = &MEMHDG
}
Var 9996, name ALTaff, Link SUBRUTINE
{
IF &VNAVled = 0
{
&MEMALT = &ALTpmdg
}
&ALTdisplay = &MEMALT
}
Var 0500, name I_S2, Link IOCARD_SW, Device 1, Input 28 // EFIS STA
{
IF &I_S2 = 1
{
&keys = 81
&keys = 0
}
}
Var 0501, name I_S1, Link IOCARD_SW, Device 1, Input 27 // EFIS WXR
{
IF &I_S1 = 1
{
&keys = 80
&keys = 0
}
}
Var 0502, name I_S3, Link IOCARD_SW, Device 1, Input 29 // EFIS WPT
{
IF &I_S3 = 1
{
&keys = 82
&keys = 0
}
}
Var 0503, name I_S4, Link IOCARD_SW, Device 1, Input 30 // EFIS ARPT
{
IF &I_S4 = 1
{
&keys = 83
&keys = 0
}
}
Var 0504, name I_S5, Link IOCARD_SW, Device 1, Input 31 // EFIS DATA
{
IF &I_S5 = 1
{
&keys = 84
&keys = 0
}
}
Var 0505, name I_S6, Link IOCARD_SW, Device 1, Input 32 // EFIS POS
{
IF &I_S6 = 1
{
&keys = 85
&keys = 0
}
}
Var 0506, name I_S7, Link IOCARD_SW, Device 1, Input 33 // EFIS TERR
{
IF &I_S7 = 1
{
&keys = 86
&keys = 0
}
}
Var 0507, name I_FPV, Link IOCARD_SW, Device 1, Input 34 // EFIS FPV
{
IF &I_FPV = 1
{
&keys = 87
&keys = 0
}
}
Var 0508, name I_MTRS, Link IOCARD_SW, Device 1, Input 38 // EFIS MTRS
{
IF &I_MTRS = 1
{
&keys = 88
&keys = 0
}
}
Var 0509, name I_BARONSW, Link IOCARD_SW, Device 1, Input 22
{
IF &I_BARONSW = 1
{
&SUB_BAR = 1013
L0 = 1013 * 16
L0 = L0 + 1
&FS_QNH = L0
}
}
Var 0510, name E_BARO, Link IOCARD_ENCODER, Device 1, Input 20, Aceleration 1, Type 2
{
L0 = &E_BARO * -1
&SUB_BAR = &SUB_BAR + L0
}
Var 1002, name SUB_BAR, Link SUBRUTINE
{
L0 = &SUB_BAR * 16
&FS_QNH = L0
}
Var 1204, name FS_QNH, Link FSUIPC_OUT, Offset $0330, Length 2 // FS_QNH_MB
Var 0511, name I_VOR1, Link IOCARD_SW, Device 1, Input 36
{
CALL &VOR1
}
Var 0512, name I_ADF1, Link IOCARD_SW, Device 1, Input 37
{
CALL &ADF1
}
Var 0513, name I_VOR2, Link IOCARD_SW, Device 1, Input 18
{
CALL &VOR2
}
Var 0514, name I_ADF2, Link IOCARD_SW, Device 1, Input 19
{
CALL &ADF2
}
Var 9000, name VOR1, Link SUBRUTINE // VOR1 SET MACRO
{
IF &I_VOR1 = 1
{
IF &I_ADF1 = 0
{
&keys = 89
&keys = 0
}
}
IF &I_VOR1 = 0
{
IF &I_ADF1 = 0
{
&keys = 90
&keys = 0
}
}
}
Var 9001, name ADF1, Link SUBRUTINE // ADF1 SETMACRO
{
IF &I_ADF1 = 1
{
IF &I_VOR1 = 0
{
&keys = 89
&keys = 0
&keys = 89
&keys = 0
}
}
IF &I_VOR1 = 0
{
IF &I_ADF1 = 0
{
&keys = 90
&keys = 0
&keys = 90
&keys = 0
}
}
}
Var 9002, name VOR2, Link SUBRUTINE // VOR2 SET MACRO
{
IF &I_VOR2 = 1
{
IF &I_ADF2 = 0
{
&keys = 91
&keys = 0
}
}
IF &I_VOR2 = 0
{
IF &I_ADF2 = 0
{
&keys = 92
&keys = 0
}
}
}
Var 9003, name ADF2, Link SUBRUTINE // ADF2 SETMACRO
{
IF &I_ADF2 = 1
{
IF &I_VOR2 = 0
{
&keys = 91
&keys = 0
&keys = 91
&keys = 0
}
}
IF &I_VOR2 = 0
{
IF &I_ADF2 = 0
{
&keys = 92
&keys = 0
&keys = 92
&keys = 0
}
}
}
Var 0516, name I_5, Link IOCARD_SW, Device 1, Input 0
{
IF &I_5 = 1
{
IF &Rngflags = 2
{
&keys = 96
&keys = 0
&Rngflags = 1
}
}
}
Var 0518, name I_10, Link IOCARD_SW, Device 1, Input 1
{
IF &I_10 = 1
{
IF &Rngflags = 1
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 0
&Rngflags = SETBIT 1
}
IF &Rngflags = 3
{
&keys = 96
&keys = 0
&Rngflags = 2
}
}
}
Var 0520, name I_20, Link IOCARD_SW, Device 1, Input 2
{
IF &I_20 = 1
{
IF &Rngflags = 2
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 1
&Rngflags = SETBIT 0
&Rngflags = SETBIT 1
}
IF &Rngflags = 4
{
&keys = 96
&keys = 0
&Rngflags = 3
}
}
}
Var 0522, name I_40, Link IOCARD_SW, Device 1, Input 3
{
IF &I_40 = 1
{
IF &Rngflags = 3
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 0
&Rngflags = CLEARBIT 1
&Rngflags = SETBIT 2
}
IF &Rngflags = 5
{
&keys = 96
&keys = 0
&Rngflags = 4
}
}
}
Var 0524, name I_80, Link IOCARD_SW, Device 1, Input 4
{
IF &I_80 = 1
{
IF &Rngflags = 4
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 2
&Rngflags = SETBIT 0
&Rngflags = SETBIT 2
}
IF &Rngflags = 6
{
&keys = 96
&keys = 0
&Rngflags = 5
}
}
}
Var 0526, name I_160, Link IOCARD_SW, Device 1, Input 5
{
IF &I_160 = 1
{
IF &Rngflags = 5
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 0
&Rngflags = CLEARBIT 2
&Rngflags = SETBIT 1
&Rngflags = SETBIT 2
}
IF &Rngflags = 7
{
&keys = 96
&keys = 0
&Rngflags = 6
}
}
}
Var 0528, name I_320, Link IOCARD_SW, Device 1, Input 6
{
IF &I_320 = 1
{
IF &Rngflags = 6
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 1
&Rngflags = CLEARBIT 2
&Rngflags = SETBIT 0
&Rngflags = SETBIT 1
&Rngflags = SETBIT 2
}
IF &Rngflags = 8
{
&keys = 96
&keys = 0
&Rngflags = CLEARBIT 3
&Rngflags = SETBIT 0
&Rngflags = SETBIT 1
&Rngflags = SETBIT 2
}
}
}
Var 0530, name I_640, Link IOCARD_SW, Device 1, Input 7
{
IF &I_640 = 1
{
IF &Rngflags = 7
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 0
&Rngflags = CLEARBIT 1
&Rngflags = CLEARBIT 2
&Rngflags = SETBIT 3
}
}
}
Var 0555, name FOflags // Flags for F/O EFIS switches
Var 0532, name I_APP, Link IOCARD_SW, Device 1, Input 9
{
IF &I_APP = 1
{
IF &CPTflags = 128
{
&keys = 93
&keys = 0
&CPTflags = CLEARBIT 7
&CPTflags = SETBIT 8
}
}
}
Var 0536, name I_MAP, Link IOCARD_SW, Device 1, Input 11
{
IF &I_MAP = 1
{
IF &CPTflags = 512
{
&keys = 93
&keys = 0
&CPTflags = CLEARBIT 9
}
IF &CPTflags = 128
{
&keys = 94
&keys = 0
&CPTflags = CLEARBIT 7
}
}
}
Var 0538, name I_PLN, Link IOCARD_SW, Device 1, Input 12
{
IF &I_PLN = 1
{
IF &CPTflags = 0
{
&keys = 94
&keys = 0
&CPTflags = SETBIT 9
}
}
}
Var 0539, name I_VOR, Link IOCARD_SW, Device 1, Input 10
{
IF &I_VOR = 1
{
IF &CPTflags = 0
{
&keys = 93
&keys = 0
&CPTflags = SETBIT 7
}
IF &CPTflags = 256
{
&keys = 94
&keys = 0
&CPTflags = CLEARBIT 8
&CPTflags = SETBIT 7
}
}
}
Var 0541, name E_MIN, Link IOCARD_ENCODER, Device 1, Input 23, Aceleration 1, Type 2
{
IF &E_MIN = 1
{
&keys = 77
&keys = 0
}
ELSE
{
&keys = 76
&keys = 0
}
}
Var 543, name I_MINSW, Link IOCARD_SW, Input 25, Device 1
{
IF &I_MINSW = 1
{
&keys = 78
&keys = 0
}
}
***********************
Hi.
barkay, many thanks for sending me your kb assignments.
Having followed your guide above, I still seem to have a little trouble getting this to work. After loading up fs2004 with the pmdg 737 I then load the sioc script file. There is an initial movement of the altimeter from 29.92 to 30.21 which indicates some sort of connection between sioc and pmdg. However, any commands sent via the efis are not communicated to pmdg and so I have no control via efis.
Many thanks for your time and help in advance
barkay
08-20-2008, 03:07 PM
Kalz,
There are three and a half things to do
1 - Your sioc.ini file should be exactly the same as I posted
1.5 - MASTER=0,5,1,32
MASTER=1,7,1,33 definitions is based on the device number that my computer recognizes. Once you load the sioc it shows on the right hand side what does it recognize your mcp and efis with device number. mine is 32 and 33 respectively.
2 - Your sioc.ssi file should be compiled based on my postings in the forum. Just to make sure you have to copy all that text to a .txt file and import this into sioc and save it as sioc.ssi. Since sioc.ini is looking for sioc.ssi if your sioc.ssi is not the one I posted it will not read it.
3 - Make sure no key assignments in the sim is the same with the key assignments for pmdg
Please send me your e-mail address so I can send you the original files I use in case you had trouble in copying. I can also send you my sioc.ssi as file
Best Regards,
barkay
barkay,
Once again many thanks for your help.
The problem turned out to be the device number and is all sorted now.
It's great to have a working efis.
Much appreciated
Kalz
drayton_k
09-07-2008, 03:19 PM
Hi Barkay,
Can you please send me your keyboard file for the PMDG 737. I have sent you an email just in case you dont get to read this.
many thanks
Keith
barkay
09-08-2008, 04:19 AM
Keith,
Below you will find the keys settings for my PMDG. Make sure that these assignments do not interfere with the ones on SIM. If same delete the sim side as they really do not mean so much on routine usage. Besides make sure to not to use these when on virtual cockpit since these assignments changes the view angle on EFIS button pushes. I designed them in such a way that the main screen will be in 2d cockpit mode. Anything without any assignment is actually not assigned yet.
*********PMDG KEYS***********
PMDG 737NG - Keyboard Assignment
Num Command Key Combination
3 MCP Press APDISCON Ctrl+Shft+Y
4 MCP Press AT Shft+R
5 MCP Press N1 Ctrl+Shft+N
6 MCP Press SPD Ctrl+M
7 MCP Press CO Shft+I
8 MCP Press LVLCHG Ctrl+I
9 MCP Press VNAV Ctrl+V
10 MCP Press LNAV Ctrl+N
11 MCP Press VORLOC Ctrl+O
12 MCP Press APP Ctrl+A
13 MCP Press HDGSEL Ctrl+H
14 MCP Press ALTHLD Ctrl+Z
15 MCP Press VS Ctrl+P
23 MCP Press CMD L Ctrl+Shft+A
24 MCP Press CMD R Shft+F4
25 MCP Press CWS L Ctrl+F4
26 MCP Press CWS R Ctrl+Shft+F4
27 MCP Press FD L Ctrl+F
28 MCP Press FD R Ctrl+Shft+F3
31 MCP Increase Bank Limiter
32 MCP Decrease Bank Limiter
33 MCP Increase Course Shft+F3
34 MCP Decrease Course Ctrl+F5
35 MCP Increase Altitude Ctrl+Shft+Z
36 MCP Decrease Altitude Ctrl+F2
37 MCP Increase Speed Ctrl+Shft+V
38 MCP Decrease Speed Shft+F11
39 MCP Increase Heading Ctrl+Shft+H
40 MCP Decrease Heading Ctrl+F8
41 MCP Increase VS Ctrl+Shft+P
42 MCP Decrease VS Ctrl+Shft+F11
43 MCP Increase Course Fast
44 MCP Decrease Course Fast
45 MCP Increase Altitude Fast
46 MCP Decrease Altitude Fast
47 MCP Increase Speed Fast Page 2 of 6
48 MCP Decrease Speed Fast
49 MCP Increase Hdg Fast
50 MCP Decrease Hdg Fast
51 MCP Increase VS Fast
52 MCP Decrease VS Fast
53 MCP Set TOGA Ctrl+Shft+G
54 MCP Reset TOGA Ctrl+Tab +G
55 MCP Press SPD INTV
56 MCP Press ALT INTV
57 EFIS Press Mins Shft+Tab +M
58 EFIS Increase Mins Ctrl+Shft+M
59 EFIS Decrease Mins Shft+F12
61 EFIS Reset Mins Ctrl+,
62 EFIS Press Baro Ctrl+Shft+O
63 EFIS Increase Baro Ctrl+Shft+B
64 EFIS Decrease Baro Shft+B
66 EFIS Press Baro STD Ctrl+Shft+Tab +B
67 EFIS Press FPV Ctrl+Shft+C
68 EFIS Press MTRS Ctrl+Shft+K
69 EFIS Increase NavL Ctrl+Shft+1
70 EFIS Decrease NavL Ctrl+Shft+3
72 EFIS Increase NavR Ctrl+Shft+2
73 EFIS Decrease NavR Ctrl+Shft+4
75 EFIS Increase ND Mode Ctrl+Shft+L
76 EFIS Decrease ND Mode Ctrl+Shft+S
78 EFIS Press ND Mode CTR
79 EFIS Increase ND Range Ctrl+K
80 EFIS Decrease ND Range Ctrl+J
82 EFIS Press ND Range TFC Ctrl+Shft+,
83 EFIS Press WXR Ctrl+Shft+R
84 EFIS Press STA Ctrl+Shft+Q
85 EFIS Press WPT Ctrl+Shft+X
86 EFIS Press ARPT Ctrl+Shft+E
87 EFIS Press DATA Ctrl+Shft+T
88 EFIS Press POS Ctrl+Shft+U
89 EFIS Press TERR
90 Panel Switcher Press M
91 Panel Switcher Press Z
92 Panel Switcher Press A
93 Panel Switcher Press L
94 Panel Switcher Press F
95 Panel Switcher Press O Ctrl+Shft+Tab +8
96 Panel Switcher Press T Ctrl+Shft+Tab +9
97 Panel Switcher Press R U
98 Panel Switcher Press C Tab +U
99 Autobrakes Increase Pos
100 Autobrakes Decrease Pos
102 Doors - Open Front Pax
103 Doors - Open Other
104 Pushback - Backwards
105 Pushback - Left
106 Pushback - Right
107 Toggle VC Yoke
108 Toggle Dome Light
109 CDU - INIT REF
110 CDU - RTE
111 CDU - CLB
112 CDU - CRZ
113 CDU - DES
114 CDU - MENU
115 CDU - LEGS
116 CDU - DEP ARR
117 CDU - HOLD
118 CDU - PROG
119 CDU - N1 LIMIT
120 CDU - FIX
121 CDU - PREV PAGE
122 CDU - NEXT PAGE
123 CDU - EXEC
****************************
Best Regards,
barkay
Barkay ,
Please let me know what happens when you use the EFIStest.zip from Opencockpits , mainly VORs and ADFs.
thanks and regards
Alberto
drayton_k
09-08-2008, 01:16 PM
Barkay,
Many many thanks for your PMDG keys ...all working fine now.
The only thing I need to change are the buttons on the EFIS. They are pyhsically in the wrong place, do you know how I can change these? I have been supplied with two extra keys but no documentation on how to change them at all and I dont want to mess anything up..
Regards
Keith
barkay
09-08-2008, 04:40 PM
Dear Keith,
My config is from left to right WXR,STA,WPT,ARPT,DATA,POS,TERR
Since my airplane does not use TERR or POS function I have programmed TERR as a toggle between altitude indicator mb vs hPA and POS is actually makes the altimeter to default 1013 mb
All you need to do is to unscrew four screws in the front, take the front cover and change the buttons to your convenience and close it. It is very easy.
Dear Alberto,
EFIS test is actually a confirmation of if the module is working correctly, I just used it to make sure every single button works. Once confirmed I have forgotten about it and concentrated on SIOC.
Best regards,
barkay
drayton_k
09-08-2008, 05:41 PM
Barkay,
I have taken the screws off, but the two middle switch knobs are very tight and dont appear to want to budge!!
Never mind I will stick with what I have now rather than damage the front cover.
Thanks very much for your help, I have just flown a test flight with your settings and all is great now.
Best Regards
Keith
barkay
09-09-2008, 06:12 AM
Keith,
I forgot to tell you that. Your are rght they are very tight and you have to take them out with a screwdriver balancing it with your hand on the other side. You will not damage them as they will fit back exactly the same way. Nevertheless, enjoy:))
Barkay ,
Thanks for your reply.
When using the EFIStest everything appears to be working very well , I have indication from all buttons , encoders and switches but when I use the FSUIPC, "Key Press label" I do not have any indication that VORs,ADFs , Data and POS switches are sending something , while the other buttons I have indication of combination keys, for those above mentioned buttons I have nothing , this way my VORs,ADFs ,POS and DATA do not work.
Let me know your thoughts.
Regards
Alberto
barkay
09-09-2008, 08:04 AM
Alberto,
It seems to me that you are really stuck with this EFIS test thing. As I said before it is only to make sure that eveything is working hardwarewise.
If you use all the codes I have posted in this thread as explained everyhting must work. We had two friends that confirmed this.
So step by step
1 - Please copy sioc.ini file to a txt file and save it under c:\programfiles\iocards\sioc directory
2 - Please copy the sioc.txt part of it and save it to the same directory
IMPORTANT: Do not forget to change the device numbers at the en od lines that starts with MASTER. I have explained this in this thread again.
3 - Run SIOC, choose config, from file menu select IMPORT FROM TXT, in the opening dilaog box choose sioc.txt, import it and save it as sioc.ssi
4 - Run your simulator, make sure the key commands of the sim do not interfere with the given key commands
5 - LOAD PMDG and fly safely.
Lets do this and talk if you still have any problems. Remeber your fsuipc should be registered and the version should be higher than 3.7
Best regards
barkay
bsv118
02-01-2009, 07:49 AM
Hi barkay
I want to thank you for precious help, with your file I have all efis and mcp working very well.
But I have a little troubles:
- when I rotate expedite hdg, course and alt rotary knob on pmdg mcp panel there is a disagree in the value of the digits
- in efis panel there is no baro standard command; clicking rotary knob of baro setting the value return on 1013 or 29.92, but on pmdg efis not appear green STD message
If you have just a solution please can you post it?
Thank you again for your help
barkay
02-02-2009, 01:40 PM
Hi,
Unfortunately you are right. This hdg and altitude or course setting disagreement happens only on the air and not on the ground. I am guessing that this is due to load on the simulator is much higher when flying. The only idea (which I have not tried yet) is to try to tweak fsuipc callout times in the sioc.ini file. So if I can reduce the time for polling this might help. I will let you know.
For the second question I could not find the reason why as well. I mean whenever you push the button it actually goes to STD value of 1013 so the altimeter is right however either it is programmed in a different way or the knob itself does not support it the STD indication refuses to come. Anyway I keep on trying and will post once I find anything.
Regards,
barkay
bsv118
02-03-2009, 10:18 AM
Hi barkay
yesterday two fellow cockpit builder from Sicily have helped me with sioc problems, the new script is very good, baro standard is fully functional and disagree not appear.
I have tested on ground and in flight and all working very well.
These are sioc.txt and sioc.ini
// *****************************************************************************
// * Config_SIOC ver 3.41 - By Manolo Vélez - www.opencockpits.com
// *****************************************************************************
// * FileName : sioc.txt Versión 1.1
// * Date : 29/06/2007
// * COnfiguración para MCP opencockpits para 738 PMDG por
// * Xavier Baca VAE403 y Vicente Barrón VAE401 (airexplorer.aeria.org)
// * Se debe modificar sioc.ini en el KEYBOARD EMULATOR MODULE
// * y configurar la assignación de teclas en el PMDG
// * Adaptación del original de DeMadagascar
// __________________________________________________________________
// Inicialización variables
//____________________________________________________________________
Var 0001, name keys, Link KEYS // variable transfert emulateur clavier ( SIOC.INI)
Var 0002, name MEMHDG, Value 0
Var 0003, name IAS, Link FSUIPC_IN, Offset $02BC, Length 4
Var 0004, name MACH, Link FSUIPC_IN, Offset $11C6, Length 2
Var 0005, name MEMALT, Value 10000
Var 0006, Value 0
{
&SUB_BAR = 1023
}
Var 0007, name CPTflags // Flags for CPT EFIS ND MODE switches
Var 0008, name Rngflags, Value 1 // range changer
// __________________________________________________________________
// Salidas IOCARD Leds
//____________________________________________________________________
Var 0010, name FDLEFTled, Link IOCARD_OUT, Output 39
Var 0011, name ATled, Link IOCARD_OUT, Output 22
Var 0012, name N1led, Link IOCARD_OUT, Output 21
Var 0013, name SPEEDled, Link IOCARD_OUT, Output 23
Var 0014, name LVLCHGled, Link IOCARD_OUT, Output 24
Var 0015, name HDGled, Link IOCARD_OUT, Output 26
Var 0016, name VNAVled, Link IOCARD_OUT, Output 25
Var 0017, name LNAVled, Link IOCARD_OUT, Output 29
Var 0018, name VORLOCled, Link IOCARD_OUT, Output 28
Var 0019, name APPled, Link IOCARD_OUT, Output 27
Var 0020, name ALTHOLDled, Link IOCARD_OUT, Output 30
Var 0021, name VSled, Link IOCARD_OUT, Output 31
Var 0022, name CMDAled, Link IOCARD_OUT, Output 33
Var 0023, name CMDBled, Link IOCARD_OUT, Output 35
Var 0024, name CWSAled, Link IOCARD_OUT, Output 32
Var 0025, name CWSBled, Link IOCARD_OUT, Output 34
Var 0026, name VSminus, Link IOCARD_OUT, Output 45
Var 0027, name IASpoint, Link IOCARD_OUT, Output 20
// __________________________________________________________________
// Salidas IOCARD Displays
//___________________________________________________________________
Var 0030, name CRSLEFTdisplay, Link IOCARD_DISPLAY, Digit 0, Numbers 3
Var 0031, name IASdisplay, Link IOCARD_DISPLAY, Digit 3, Numbers 3
Var 0032, name HDGdisplay, Link IOCARD_DISPLAY, Digit 6, Numbers 3
Var 0033, name ALTdisplay, Link IOCARD_DISPLAY, Digit 9, Numbers 5
Var 0034, name VSdisplay, Link IOCARD_DISPLAY, Digit 14, Numbers 5
Var 0035, name CRSRdisplay, Link IOCARD_DISPLAY, Digit 19, Numbers 3
// __________________________________________________________________
// Entradas FSUIPC del MCP B737-800 PMDG ( Infos Leds )
//___________________________________________________________________
Var 0040, name MCPstatus, Link FSUIPC_IN, Offset $62BC, Length 4
{
&FDLEFTled = TESTBIT &MCPstatus ,12
&ATled = TESTBIT &MCPstatus ,14
&N1led = TESTBIT &MCPstatus ,15
&SPEEDled = TESTBIT &MCPstatus ,16
&VNAVled = TESTBIT &MCPstatus ,18
&LVLCHGled = TESTBIT &MCPstatus ,17
&HDGled = TESTBIT &MCPstatus ,22
&LNAVled = TESTBIT &MCPstatus ,19
&VORLOCled = TESTBIT &MCPstatus ,20
&APPled = TESTBIT &MCPstatus ,21
&ALTHOLDled = TESTBIT &MCPstatus ,23
&VSled = TESTBIT &MCPstatus ,24
&CMDAled = TESTBIT &MCPstatus ,8
&CMDBled = TESTBIT &MCPstatus ,9
&CWSAled = TESTBIT &MCPstatus ,25
&CWSBled = TESTBIT &MCPstatus ,26
CALL &HDGaff
CALL &IASaff
CALL &ALTaff
CALL &VSaff
}
Var 0041, name SPDINTV, Link FSUIPC_IN, offset $62C0, Length 1
{
CALL &IASaff
}
Var 0042, name COstatus, Link FSUIPC_IN, offset $621e, Length 2
{
CALL &IASaff
}
// __________________________________________________________________
// Entradas FSUIPC del MCP B737-800 PMDG ( Infos Displays )
//___________________________________________________________________
Var 0050, name CRSpmdg, Link FSUIPC_IN, Offset $0C4E, Length 2
{
IF &CRSpmdg = 360
{
&CRSLEFTdisplay = 0
}
ELSE
{
&CRSLEFTdisplay = &CRSpmdg
}
}
Var 0051, name IASpmdg, Link FSUIPC_IN, Offset $6220, Length 2
{
CALL &IASaff
}
Var 0052, name hdgpmdg, Link FSUIPC_IN, Offset $622C, Length 2
{
CALL &HDGaff
}
Var 0053, name ALTpmdg, Link FSUIPC_IN, Offset $622E, Length 2
{
CALL &ALTaff
}
Var 0054, name VSpmdg, Link FSUIPC_IN, Offset $6230, Length 2
{
CALL &VSaff
}
Var 0055, name CRS2pmdg, Link FSUIPC_IN, Offset $0C4E, Length 2
{
IF &CRS2pmdg = 360
{
&CRSRdisplay = 0
}
ELSE
{
&CRSRdisplay = &CRS2pmdg
}
}
// __________________________________________________________________
// Entradas IOCARD Interruptores & bp (button press)
//___________________________________________________________________
Var 0060, name FDswitch, Link IOCARD_SW, Input 16
{
IF &FDswitch = 1
{
IF &FDLEFTled = 0
{
&keys = 56
&keys = 0
}
}
ELSE
{
IF &FDswitch = 0
{
IF &FDLEFTled = 1
{
&keys = 56
&keys = 0
}
}
}
}
Var 0061, name ATswitch, Link IOCARD_SW, Input 33
{
IF &ATswitch = 1
{
IF &ATled = 0
{
&keys = 44
&keys = 0
}
}
ELSE
{
IF &ATswitch = 0
{
IF &ATled = 1
{
&keys = 44
&keys = 0
}
}
}
}
Var 0062, name N1bp, Link IOCARD_SW, Input 32
{
IF &N1bp = 1
{
&keys = 61
&keys = 0
}
}
Var 0063, name SPEEDbp, Link IOCARD_SW, Input 31
{
IF &SPEEDbp = 1
{
&keys = 51
&keys = 0
}
}
Var 0064, name VNAVbp, Link IOCARD_SW, Input 30
{
IF &VNAVbp = 1
{
&keys = 57
&keys = 0
}
}
Var 0065, name LVLCHGbp, Link IOCARD_SW, Input 29
{
IF &LVLCHGbp = 1
{
&keys = 59
&keys = 0
}
}
Var 0066, name HDGbp, Link IOCARD_SW, Input 28
{
IF &HDGbp = 1
{
&keys = 62
&keys = 0
}
}
Var 0067, name LNAVbp, Link IOCARD_SW, Input 27
{
IF &LNAVbp = 1
{
&keys = 69
&keys = 0
}
}
Var 0068, name VORLOCbp, Link IOCARD_SW, Input 25
{
IF &VORLOCbp = 1
{
&keys = 70
&keys = 0
}
}
Var 0069, name APPbp, Link IOCARD_SW, Input 24
{
IF &APPbp = 1
{
&keys = 63
&keys = 0
}
}
Var 0070, name ALTHOLDbp, Link IOCARD_SW, Input 23
{
IF &ALTHOLDbp = 1
{
&keys = 64
&keys = 0
}
}
Var 0071, name VSbp, Link IOCARD_SW, Input 22
{
IF &VSbp = 1
{
&keys = 58
&keys = 0
}
}
Var 0072, name CMDAbp, Link IOCARD_SW, Input 21
{
IF &CMDAbp = 1
{
&keys = 66
&keys = 0
}
}
Var 0073, name CMDBbp, Link IOCARD_SW, Input 19
{
IF &CMDBbp = 1
{
&keys = 67
&keys = 0
}
}
Var 0074, name CWSAbp, Link IOCARD_SW, Input 20
{
IF &CWSAbp = 1
{
&keys = 65
&keys = 0
}
}
Var 0075, name CWSBbp, Link IOCARD_SW, Input 18
{
IF &CWSBbp = 1
{
&keys = 68
&keys = 0
}
}
Var 0076, name APDISCObp, Link IOCARD_SW, Input 15
{
IF &APDISCObp = 1
{
&keys = 26
&keys = 0
}
ELSE
{
&keys = 26
&keys = 0
}
}
Var 0077, name CObp, Link IOCARD_SW, Input 13
{
IF &CObp = 1
{
&keys = 60
&keys = 0
}
}
Var 0078, name FDRswitch, Link IOCARD_SW, Input 14
{
IF &FDRswitch = 1
{
&keys = 73
&keys = 0
}
ELSE
{
&keys = 73
&keys = 0
}
}
// __________________________________________________________________
// Entradas IOCARD Encoders
//___________________________________________________________________
Var 0080, name CRSLEFTrot, Link IOCARD_ENCODER, Input 4, Aceleration 1, Type 2
{
IF &CRSLEFTrot = 1
{
&keys = 45
&keys = 0
}
ELSE
{
&keys = 46
&keys = 0
}
}
Var 0081, name IASrot, Link IOCARD_ENCODER, Input 0, Aceleration 1, Type 2
{
IF &IASrot = 1
{
&keys = 49
&keys = 0
}
ELSE
{
&keys = 50
&keys = 0
}
}
Var 0082, name HDGrot, Link IOCARD_ENCODER, Input 6, Aceleration 1, Type 2
{
IF &HDGrot = 1
{
&keys = 47
&keys = 0
}
ELSE
{
&keys = 48
&keys = 0
}
IF &HDGled = 0
{
L0 = &HDGrot * -1
&MEMHDG = ROTATE 0 ,359 ,L0
}
CALL &HDGaff
}
Var 0083, name ALTrot, Link IOCARD_ENCODER, Input 2, Aceleration 1, Type 2
{
IF &ALTrot = 1
{
&keys = 53
&keys = 0
}
ELSE
{
&keys = 52
&keys = 0
}
IF &VNAVled = 1
{
L0 = &ALTROT * -100
&MEMALT = LIMIT 0 ,50000 ,L0
CALL &ALTaff
}
}
Var 0084, name VSrot, Link IOCARD_ENCODER, Input 11, Aceleration 1, Type 2
{
IF &VSrot = 1
{
&keys = 54
&keys = 0
}
ELSE
{
&keys = 55
&keys = 0
}
}
Var 0085, name CRSRIGHTrot, Link IOCARD_ENCODER, Input 9, Aceleration 1, Type 2
{
IF &CRSRIGHTrot = 1
{
&keys = 45
&keys = 0
}
ELSE
{
&keys = 46
&keys = 0
}
}
Var 0100 // ESTADO RANGO ND
Var 0101 // ESTADO MODO
Var 0200, name TECLAS, Link KEYS
Var 0999, Link SUBRUTINE
{
IF V0100 > V0999
{
&TECLAS = 168
&TECLAS = 0
V0100 = V0999
}
ELSE
{
&TECLAS = 167
&TECLAS = 0
V0100 = V0999
}
}
Var 0998, Link SUBRUTINE
{
IF V0101 > V0998
{
&TECLAS = 165
&TECLAS = 0
V0101 = V0998
}
ELSE
{
&TECLAS = 164
&TECLAS = 0
V0101 = V0998
}
}
Var 0500, name I_S2, Link IOCARD_SW, Device 1, Input 28 // EFIS STA
{
IF &I_S2 = 1
{
&keys = 81
&keys = 0
}
}
Var 0501, name I_S1, Link IOCARD_SW, Device 1, Input 27 // EFIS WXR
{
IF &I_S1 = 1
{
&keys = 80
&keys = 0
}
}
Var 0502, name I_S3, Link IOCARD_SW, Device 1, Input 29 // EFIS WPT
{
IF &I_S3 = 1
{
&keys = 82
&keys = 0
}
}
Var 0503, name I_S4, Link IOCARD_SW, Device 1, Input 30 // EFIS ARPT
{
IF &I_S4 = 1
{
&keys = 83
&keys = 0
}
}
Var 0504, name I_S5, Link IOCARD_SW, Device 1, Input 31 // EFIS DATA
{
IF &I_S5 = 1
{
&keys = 84
&keys = 0
}
}
Var 0505, name I_S6, Link IOCARD_SW, Device 1, Input 32 // EFIS POS
{
IF &I_S6 = 1
{
&keys = 85
&keys = 0
}
}
Var 0506, name I_S7, Link IOCARD_SW, Device 1, Input 33 // EFIS TERR
{
IF &I_S7 = 1
{
&keys = 86
&keys = 0
}
}
Var 0507, name I_FPV, Link IOCARD_SW, Device 1, Input 34 // EFIS FPV
{
IF &I_FPV = 1
{
&keys = 87
&keys = 0
}
}
Var 0508, name I_MTRS, Link IOCARD_SW, Device 1, Input 38 // EFIS MTRS
{
IF &I_MTRS = 1
{
&keys = 88
&keys = 0
}
}
Var 0509, name I_BARONSW, Link IOCARD_SW, Device 1, Input 22
{
IF &I_BARONSW = 1
{
&keys = 43
&keys = 0
}
}
Var 0510, name E_BARO, Link IOCARD_ENCODER, Device 1, Input 20, Aceleration 1, Type 2
{
L0 = &E_BARO * -1
&SUB_BAR = &SUB_BAR + L0
}
Var 1002, name SUB_BAR, Link SUBRUTINE
{
L0 = &SUB_BAR * 16
&FS_QNH = L0
}
Var 1204, name FS_QNH, Link FSUIPC_OUT, Offset $0330, Length 2 // FS_QNH_MB
Var 0511, name I_VOR1, Link IOCARD_SW, Device 1, Input 36
{
CALL &VOR1
}
Var 0512, name I_ADF1, Link IOCARD_SW, Device 1, Input 37
{
CALL &ADF1
}
Var 0513, name I_VOR2, Link IOCARD_SW, Device 1, Input 18
{
CALL &VOR2
}
Var 0514, name I_ADF2, Link IOCARD_SW, Device 1, Input 19
{
CALL &ADF2
}
Var 9000, name VOR1, Link SUBRUTINE // VOR1 SET MACRO
{
IF &I_VOR1 = 1
{
IF &I_ADF1 = 0
{
&keys = 89
&keys = 0
}
}
IF &I_VOR1 = 0
{
IF &I_ADF1 = 0
{
&keys = 90
&keys = 0
}
}
}
Var 9001, name ADF1, Link SUBRUTINE // ADF1 SETMACRO
{
IF &I_ADF1 = 1
{
IF &I_VOR1 = 0
{
&keys = 89
&keys = 0
&keys = 89
&keys = 0
}
}
IF &I_VOR1 = 0
{
IF &I_ADF1 = 0
{
&keys = 90
&keys = 0
&keys = 90
&keys = 0
}
}
}
Var 9002, name VOR2, Link SUBRUTINE // VOR2 SET MACRO
{
IF &I_VOR2 = 1
{
IF &I_ADF2 = 0
{
&keys = 91
&keys = 0
}
}
IF &I_VOR2 = 0
{
IF &I_ADF2 = 0
{
&keys = 92
&keys = 0
}
}
}
Var 9003, name ADF2, Link SUBRUTINE // ADF2 SETMACRO
{
IF &I_ADF2 = 1
{
IF &I_VOR2 = 0
{
&keys = 91
&keys = 0
&keys = 91
&keys = 0
}
}
IF &I_VOR2 = 0
{
IF &I_ADF2 = 0
{
&keys = 92
&keys = 0
&keys = 92
&keys = 0
}
}
}
Var 0516, name I_5, Link IOCARD_SW, Device 1, Input 0
{
IF &I_5 = 1
{
IF &Rngflags = 2
{
&keys = 96
&keys = 0
&Rngflags = 1
}
}
}
Var 0518, name I_10, Link IOCARD_SW, Device 1, Input 1
{
IF &I_10 = 1
{
IF &Rngflags = 1
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 0
&Rngflags = SETBIT 1
}
IF &Rngflags = 3
{
&keys = 96
&keys = 0
&Rngflags = 2
}
}
}
Var 0520, name I_20, Link IOCARD_SW, Device 1, Input 2
{
IF &I_20 = 1
{
IF &Rngflags = 2
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 1
&Rngflags = SETBIT 0
&Rngflags = SETBIT 1
}
IF &Rngflags = 4
{
&keys = 96
&keys = 0
&Rngflags = 3
}
}
}
Var 0522, name I_40, Link IOCARD_SW, Device 1, Input 3
{
IF &I_40 = 1
{
IF &Rngflags = 3
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 0
&Rngflags = CLEARBIT 1
&Rngflags = SETBIT 2
}
IF &Rngflags = 5
{
&keys = 96
&keys = 0
&Rngflags = 4
}
}
}
Var 0524, name I_80, Link IOCARD_SW, Device 1, Input 4
{
IF &I_80 = 1
{
IF &Rngflags = 4
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 2
&Rngflags = SETBIT 0
&Rngflags = SETBIT 2
}
IF &Rngflags = 6
{
&keys = 96
&keys = 0
&Rngflags = 5
}
}
}
Var 0526, name I_160, Link IOCARD_SW, Device 1, Input 5
{
IF &I_160 = 1
{
IF &Rngflags = 5
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 0
&Rngflags = CLEARBIT 2
&Rngflags = SETBIT 1
&Rngflags = SETBIT 2
}
IF &Rngflags = 7
{
&keys = 96
&keys = 0
&Rngflags = 6
}
}
}
Var 0528, name I_320, Link IOCARD_SW, Device 1, Input 6
{
IF &I_320 = 1
{
IF &Rngflags = 6
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 1
&Rngflags = CLEARBIT 2
&Rngflags = SETBIT 0
&Rngflags = SETBIT 1
&Rngflags = SETBIT 2
}
IF &Rngflags = 8
{
&keys = 96
&keys = 0
&Rngflags = CLEARBIT 3
&Rngflags = SETBIT 0
&Rngflags = SETBIT 1
&Rngflags = SETBIT 2
}
}
}
Var 0530, name I_640, Link IOCARD_SW, Device 1, Input 7
{
IF &I_640 = 1
{
IF &Rngflags = 7
{
&keys = 95
&keys = 0
&Rngflags = CLEARBIT 0
&Rngflags = CLEARBIT 1
&Rngflags = CLEARBIT 2
&Rngflags = SETBIT 3
}
}
}
Var 0555, name FOflags // Flags for F/O EFIS switches
Var 0532, name I_APP, Link IOCARD_SW, Device 1, Input 9
{
IF &I_APP = 1
{
IF &CPTflags = 128
{
&keys = 93
&keys = 0
&CPTflags = CLEARBIT 7
&CPTflags = SETBIT 8
}
}
}
Var 0536, name I_MAP, Link IOCARD_SW, Device 1, Input 11
{
IF &I_MAP = 1
{
IF &CPTflags = 512
{
&keys = 93
&keys = 0
&CPTflags = CLEARBIT 9
}
IF &CPTflags = 128
{
&keys = 94
&keys = 0
&CPTflags = CLEARBIT 7
}
}
}
Var 0538, name I_PLN, Link IOCARD_SW, Device 1, Input 12
{
IF &I_PLN = 1
{
IF &CPTflags = 0
{
&keys = 94
&keys = 0
&CPTflags = SETBIT 9
}
}
}
Var 0539, name I_VOR, Link IOCARD_SW, Device 1, Input 10
{
IF &I_VOR = 1
{
IF &CPTflags = 0
{
&keys = 93
&keys = 0
&CPTflags = SETBIT 7
}
IF &CPTflags = 256
{
&keys = 94
&keys = 0
&CPTflags = CLEARBIT 8
&CPTflags = SETBIT 7
}
}
}
Var 0541, name E_MIN, Link IOCARD_ENCODER, Device 1, Input 23, Aceleration 1, Type 2
{
IF &E_MIN = 1
{
&keys = 77
&keys = 0
}
ELSE
{
&keys = 76
&keys = 0
}
}
Var 543, name I_MINSW, Link IOCARD_SW, Input 25, Device 1
{
IF &I_MINSW = 1
{
&keys = 78
&keys = 0
}
}
//__________________________________________________________________
// Rutinas de visulaización
//__________________________________________________________________
Var 9999, name VSaff, Link SUBRUTINE
{
IF &VSled = 1
{
IF &VSpmdg < 60000
{
&VSdisplay = &VSpmdg
&VSminus = 0
}
ELSE
{
L0 = &VSpmdg - 65536
&VSdisplay = L0
&VSminus = 1
}
}
ELSE
{
&VSdisplay = -999999
&VSminus = 0
}
}
Var 9998, name IASaff, Link SUBRUTINE
{
C0 = &SPDINTV = 21
C0 = C0 AND &VNAVled
IF C0
{
&IASdisplay = -999999
}
ELSE
{
IF &COstatus < 4
{
&IASdisplay = &IASpmdg
&IASpoint = 0
}
ELSE
{
L0 = &IASpmdg / &IAS
L0 = L0 * 12800
L0 = L0 * &MACH
&IASdisplay = L0 / 20480
&IASpoint = 1
}
}
}
Var 9997, name HDGaff, Link SUBRUTINE
{
IF &LNAVled = 0
{
IF &HDGpmdg = 360
{
&MEMHDG = 0
}
ELSE
{
&MEMHDG = &HDGpmdg
}
}
&HDGdisplay = &MEMHDG
}
Var 9996, name ALTaff, Link SUBRUTINE
{
IF &VNAVled = 0
{
&MEMALT = &ALTpmdg
}
&ALTdisplay = &MEMALT
}
[ fichero de configuracion para el SIOC ver. 3.52 ]
IOCP_port=8092
IOCP_timeout=4000
Minimized=No
toggle_delay=20
CONFIG_FILE=.\sioc.txt
[************** 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,29
MASTER=1,7,1,31
[ 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=localhost
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 =Microsoft Flight Simulator 2004 - A Century of flight with WideServer.waiting for clients
[ Asignación de teclas ]
[ assign youe keys ]
#1=
#2=
#3=
#4=
#5=
#6=
#7=
#8=
#9=
#10=
#11=
#12=
#13=
#14=
#15=
#16=
#17=
#18=
#19=
#20=
#21=
#22=
#23=
#24=
#25=
#26=\3\1Y\2\4
#27=
#28=
#29=
#30=
#31=
#32=
#33=
#34=
#35=
#36=
#37=
#38=
#39=
#40=
#41=
#42=
#43=\3\1J\2\4
#44=\1R\2
#45=\3\I\4
#46=\1\G\2
#47=\3\L\4
#48=\3\1H\2\4
#49=\1\O\2
#50=\3\1V\2\4
#51=\3M\4
#52=\3\1Z\2\4
#53=\3\F\4
#54=\3\1\O\2\4
#55=\3\1P\2\4
#56=\3F\4
#57=\3V\4
#58=\3P\4
#59=\3I\4
#60=\1I\2
#61=\3\1N\2\4
#62=\3H\4
#63=\3A|4
#64=\3Z\4
#65=\3\H\4
#66=\3\1A\2\4
#67=\1\H\2
#68=\3\1\H\2\4
#69=\3N\4
#70=\3O\4
#71=\3\I\4
#72=\1\G\2
#73=\3\1\G\2\4
#74=
#75=\1\BM\2
#76=\3\1M\2\4
#77=\1\P\2
#78=\3,\4
#79=
#80=\3\1R\2\4
#81=\3\1Q\2\4
#82=\3\1X\2\4
#83=\3\1E\2\4
#84=\3\1T\2\4
#85=\3\1,\2\4
#86=\3\1O\2\4
#87=\3\1C\2\4
#88=\3\1K\2\4
#89=\3\11\2\4
#90=\3\13\2\4
#91=\3\12\2\4
#92=\3\14\2\4
#93=\3\1S\2\4
#94=\3\1L\2\4
#95=\3K\4
#96=\3J\4
#200=
[ End of File ]
To this command (#43=\3\1J\2\4) I have set, on keyboard command of pmdg -Ctrl+Shift+J.
Regards
Sylle
02-04-2009, 07:29 PM
Hi barkay
yesterday two fellow cockpit builder from Sicily have helped me with sioc problems, the new script is very good, baro standard is fully functional and disagree not appear.
I have tested on ground and in flight and all working very well.
These are sioc.txt and sioc.ini
...
To this command (#43=\3\1J\2\4) I have set, on keyboard command of pmdg -Ctrl+Shift+J.
Regards
Hello bsv118
Thank you very much for posting your script files.
I just received my Opencockpit MCP and EFIS yesterday and already managed today to get everything up and running.
Regards,
Sylvain
mounty
02-04-2009, 10:19 PM
Hi,
Have you tried using FSUIPC's mousetrapping to deal with some of your issues, or the PMDG Key Commands. If memory serves me right you can allocate a key combination using the Key Commands of PMDG to set such buttons or switches as range etc.
Rob
Delvos
08-11-2009, 05:57 AM
Hello pitbuilders...
i am using the sioc script by bsv118 for my OC MCP/EFIS. It works very well with one exception: when VNAV is activated, the altitude displayed on MCP and the altitude displayed in PFD are no longer synchronized, when changing them via OC MCP. In the ALTaff subroutine, there is an 'IF VNAVled=0...'; i think that's a possible cause for this? Does anybody have a solution?
THX in advance...
bsv118
08-14-2009, 03:30 AM
Hi Delvos
I don't see your problem on my sim; when i change altitude, in VNAV, on MCP it changes on CDU and on PFD without any problem.
I post you my keycommand for PMDG for altitude; maybe it is the problem...
35 MCP Increase Altitude Ctrl+Shft+Z
36 MCP Decrease Altitude Ctrl+F2
regards
Delvos
08-14-2009, 03:46 AM
Well, the key commands don't seem to be the problem, because they do actually do their work correctly when not flying in VNAV mode...
When turning the ALT knob in VNAV mode, e.g. from 10.000 to 30.000, the ALT displayed on my MCP changes faster than the ALT displayed in PFD/CDU. When ALT on MCP reaches 30.000, PFD/CDU display less, e.g. 22.500.
When VNAV is deactivated before changing ALT on MCP, everything works; so at the moment i have to deactivate VNAV, change ALT and reactivate VNAV afterwards...
Very strange:-)