PDA

View Full Version : IOCP



aufa35
06-01-2011, 03:33 PM
Hi
I am new in building cockpits and i want to build MD82 (maddog)
I tried to understand software things (i studied tutorials on opencockpit), but now i am so confused :shock: of all terms and theory. At first, i have big problem with IOCP. How does it work? How can I connect computers and get IOCP server working? Please, if someone can help me (or where i can get useful informations for me).
Thank :)
PS: I don't know where this theme belong, please don't delete it.

kiek
06-02-2011, 04:34 AM
Hi,
Welcome to the club.

Why do you need an IOCP server?
Basic information about SIOC can be found here: SIOC (IOCP) (http://www.lekseecon.nl/sioc.html)

regards,
Nico Kaan

verticallimit
06-02-2011, 06:54 PM
Hello and welcome.
MD-80 is a little harder to build than an 737, because there is not yet built a 100% finished home sim cockpit.
The project is far from plug and play, but is a fun challenging hobby.
We become more and more people that are starting to build the cockpit of this amazing airplane and You are welcome on our website where you can read more about the project, IOCP script, LUA and more: http://www.md80project.dk
http://img848.imageshack.us/img848/591/18453789.jpg

aufa35
06-05-2011, 05:18 AM
Thank
So if i have just one computer, i need install SIOC (I have done it), FSUIPC (also), and program sioc.ssi? Then i will connect USBexpansion card, and master, start simulator and sioc.exe and it will work :?:

kiek
06-05-2011, 05:28 AM
and program sioc.ssi?

Yes, a .ssi file is the compiled version of the SIOC script for your cockpit. You have to program and compile that script first before you can run sioc.exe with that .ssi file ...

regards,
Nico Kaan

aufa35
06-05-2011, 03:44 PM
Ok. I have one more question. If i will make new value in config_sioc it open new parameter window. Please if you can describe me settings in this window (what i can set there), or if you know some tutorial where is it describe. At first, where i set the input number (where i set which expansion card, which master card, which input/output) and where i set the function of this var (if it will be no smoking on, or apu start or outside light on.....)
THANK! :D

verticallimit
06-05-2011, 05:03 PM
Ok. I have one more question. If i will make new value in config_sioc it open new parameter window. Please if you can describe me settings in this window (what i can set there), or if you know some tutorial where is it describe. At first, where i set the input number (where i set which expansion card, which master card, which input/output) and where i set the function of this var (if it will be no smoking on, or apu start or outside light on.....)
THANK! :D

Nico have a very fine toturial:
http://www.lekseecon.nl/howto.html
I have used this when the script was new to me.
Take the time to play with in and outputs and make the script working, so you understand the logic.
Search for others' script, and copy from it, change the script and see what happens and ajust it to fit your cockpit.

kiek
06-05-2011, 05:40 PM
If i will make new value in config_sioc it open new parameter window. Please if you can describe me settings in this window (what i can set there), or if you know some tutorial where is it describe.
I'd recommend not to use the GUI interface of config_sioc but to use the NotePad editor (or any text editor) and write the script. The Help menu item of config sioc will give you the syntax and semantics of the SIOC language. Examples of SIOC scripts can be found at my site

regards,
Nico

aufa35
06-07-2011, 04:23 PM
And can you describe me please, how to program servo motors via USB servo card? Because overhead in MD80 has many gauges, and i would like to make it via servo motors. I hope, i little bit understand SIOC programming (thank for your help), but how to servo motors?
THANK

kiek
06-07-2011, 05:09 PM
First things first... Try to write a SIOC script that drives leds and responds to switches first.

regards,
Nico

aufa35
06-30-2011, 04:11 PM
Hello
I have now one expansion and master card and i am trying to write something, but it is without success.
So first, i would like to ask you if i have everything well installed. I have FSX, Maddog, SIOC and FSUIPC from www.schiratti.com. Is it right?
I tested my card in controlador (everything was ok), than i write something like this:
//--------------------LANDING GEAR-------------------------
Var 2330, Link IOCARD_SW, Input 1, Type I // GEAR
//--------------------GEAR RELEASE-------------------------
Var 2350, Link IOCARD_SW, Input 2, Type I // GEAR RELEASE
i saved it as sioc.ssi, reload sioc.exe and i started FSX.
The surprise was that it was doing nothing. :D Except the blinking led light on expansion card. :roll:
Can you save me?

kiek
06-30-2011, 04:27 PM
Hi,
I'm not surprised at all ;-)
Your program does nothing... You only have defined two variables linked to inputs. These variables will hold the values of the inputs, but you do nothing with these values ..
Please study my simple examples at my howto (http://www.lekseecon.nl/howto.html)page first.

Nico

aufa35
07-12-2011, 04:29 AM
Hi I am again here :p and I have a lot of questions.
I understand SIOC a little bit, but everywhere on Internet sites about home cockpits and itīs software i found IOCP server and IOCP network and IOCP, IOCP....
So i would like to know what is it, for what is it, what can i do with it, and how to make it. :) If you can help me i will be very happy. Or if you can tell me where can i get some useful documents about it (step by step (something for beginners 8) )).
And i have one more problem, with FSX Maddog Md80 2010 offsets. I don't know where can i get it.

kiek
07-12-2011, 05:37 AM
Hi,

Forget about IOCP servers and the IOCP protocol. Most people do not need it. You only need SIOC.exe Config_sioc.exe, a text editor and a Beer (http://www.lekseecon.nl/sioc.html)!

You can access FSX/FS9 information/controls via FSUIPC offsets in your SIOC script, there is really no need to use IOCP variables.

regards,
Nico

aufa35
07-12-2011, 07:49 AM
Ok, but i will need it later. Ee and where can i get FSUIPC offsets for maddog? :roll: I tried google :-D but google donīt know nothing about it. Maybe on http://www.flythemaddog.com/forum/index.php but i have now some registration problems.

kiek
07-12-2011, 08:01 AM
I don't think you will need a later.

FSUIPC offsets are 'generic' offsets that most aircrafts support. There are no specific Maddog offsets, just as there are no specific IOCP variables for Maddog. The list of FSUIPC offsets is available in the FSUIPC SDK at Pete Dowson's page.

pdpo
07-12-2011, 09:45 AM
One thing I would like to mention here,

be careful with add-ons, many addons will use internal variables which they dont make available via fsuipc offset rendering then somewhat
useless for cockpit builders. The list with addons which provides offsets is to my knowledge rather small : (correct me if I am wrong or I forget
some) Level-D 767 , Ifly 737, project magenta, flightdecksoftware, AST , jeehell airbus, ...)

Greetings Peter

aufa35
07-12-2011, 02:16 PM
Ehm. My script is working! :cool:
// *3.txt
// *12-07-2011

Var 0000, Value 0 // Initialization
{
v0001 = 0
}

// -----------------------Parkovacia brzda----------------------------
Var 0001, Link FSUIPC_INOUT, Offset $0BC8, Length 2 // Parking brake
Var 0002, Link IOCARD_SW, Input 1, Type I // Vstup pre prepinac
{
IF v0002 = 1
{
v0001 = 32767
}
ELSE
{
v0002 = 0
}
}

// -----------------------Podvozok------------------------------------
Var 0010, Link FSUIPC_INOUT, Offset $0BE8, Length 4 // Gear control
Var 0011, Link IOCARD_SW, Input 2, Type I // Vstup pre gear down
{
IF v0011 = 1
{
v0010 = 16383
}
ELSE
{
v0010 = 0
}
}
I don't think, that in FSUIPC offsets status list are all switches from overhead. At least, it's very difficult to find the right offset to some switch. Is there some way how to find it from running FSX? Some program which will be open at the same time as FSX, i will push some button in FSX and it will show me in which offset was made change. Or something like that.

aufa35
07-18-2011, 09:17 AM
I examine FSUIPC add-on in menu taskbar in FSX. There is logging and i can see events in maddog. If i push some switch, i can see line like this
xxxxxx *** Event: Cntrl= xxxxx (some numbers 1), Param=x (some numbers 2) Name. (x are numbers). Is there in this line some information about which offset is it (offset which I can use in SIOC script), which value it has and Length? Thank you.

Igolf1
09-02-2011, 03:36 PM
This is an example from md80project.dk where there is a lot of experts on MADDOG. I have built an annunciater panel sith the below code:

MADMAP.LUA:

ovhd_a1 = ipc.readLvar("L:ovhd_eoap_a1_adv1")
ovhd_a2 = ipc.readLvar("L:ovhd_eoap_a2_adv1")
ovhd_a3 = ipc.readLvar("L:ovhd_eoap_a3_adv1")
ovhd_a4 = ipc.readLvar("L:ovhd_eoap_a4_adv1")
ovhd_a5 = ipc.readLvar("L:ovhd_eoap_a5_adv1")
ovhd_a6 = ipc.readLvar("L:ovhd_eoap_a6_adv1")
ovhd_a7 = ipc.readLvar("L:ovhd_eoap_a7_adv1")
ovhd_b1 = ipc.readLvar("L:ovhd_eoap_b1_adv1")
ovhd_b2 = ipc.readLvar("L:ovhd_eoap_b2_adv1")
ovhd_b3 = ipc.readLvar("L:ovhd_eoap_b3_adv1")
ovhd_b4 = ipc.readLvar("L:ovhd_eoap_b4_adv1")
ovhd_b5 = ipc.readLvar("L:ovhd_eoap_b5_adv1")
ovhd_b6 = ipc.readLvar("L:ovhd_eoap_b6_adv1")
ovhd_b7 = ipc.readLvar("L:ovhd_eoap_b7_adv1")
ovhd_c1 = ipc.readLvar("L:ovhd_eoap_c1_adv1")
ovhd_c2 = ipc.readLvar("L:ovhd_eoap_c2_adv1")
ovhd_c3 = ipc.readLvar("L:ovhd_eoap_c3_adv1")
ovhd_c4 = ipc.readLvar("L:ovhd_eoap_c4_adv1")
ovhd_c5 = ipc.readLvar("L:ovhd_eoap_c5_adv1")
ovhd_c6 = ipc.readLvar("L:ovhd_eoap_c6_adv1")
ovhd_c7 = ipc.readLvar("L:ovhd_eoap_c7_adv1")

disp = disp .. "ovhd_a1 = " .. ovhd_a1 .. "\n"
disp = disp .. "ovhd_a2 = " .. ovhd_a2 .. "\n"
disp = disp .. "ovhd_a3 = " .. ovhd_a3 .. "\n"
disp = disp .. "ovhd_a4 = " .. ovhd_a4 .. "\n"
disp = disp .. "ovhd_a5 = " .. ovhd_a5 .. "\n"
disp = disp .. "ovhd_a6 = " .. ovhd_a6 .. "\n"
disp = disp .. "ovhd_a7 = " .. ovhd_a7 .. "\n"
disp = disp .. "ovhd_b1 = " .. ovhd_b1 .. "\n"
disp = disp .. "ovhd_b2 = " .. ovhd_b2 .. "\n"
disp = disp .. "ovhd_b3 = " .. ovhd_b3 .. "\n"
disp = disp .. "ovhd_b4 = " .. ovhd_b4 .. "\n"
disp = disp .. "ovhd_b5 = " .. ovhd_b5 .. "\n"
disp = disp .. "ovhd_b6 = " .. ovhd_b6 .. "\n"
disp = disp .. "ovhd_b7 = " .. ovhd_b7 .. "\n"
disp = disp .. "ovhd_c1 = " .. ovhd_c1 .. "\n"
disp = disp .. "ovhd_c2 = " .. ovhd_c2 .. "\n"
disp = disp .. "ovhd_c3 = " .. ovhd_c3 .. "\n"
disp = disp .. "ovhd_c4 = " .. ovhd_c4 .. "\n"
disp = disp .. "ovhd_c5 = " .. ovhd_c5 .. "\n"
disp = disp .. "ovhd_c6 = " .. ovhd_c6 .. "\n"
disp = disp .. "ovhd_c7 = " .. ovhd_c7 .. "\n"

ipc.writeUD(0x66f0,ovhd_a1)
ipc.writeUD(0x66f4,ovhd_a2)
ipc.writeUD(0x66f8,ovhd_a3)
ipc.writeUD(0x66fc,ovhd_a4)
ipc.writeUD(0x6700,ovhd_a5)
ipc.writeUD(0x6704,ovhd_a6)
ipc.writeUD(0x6708,ovhd_a7)
ipc.writeUD(0x670c,ovhd_b1)
ipc.writeUD(0x6710,ovhd_b2)
ipc.writeUD(0x6714,ovhd_b3)
ipc.writeUD(0x6718,ovhd_b4)
ipc.writeUD(0x671c,ovhd_b5)
ipc.writeUD(0x6720,ovhd_b6)
ipc.writeUD(0x6724,ovhd_b7)
ipc.writeUD(0x6728,ovhd_c1)
ipc.writeUD(0x672c,ovhd_c2)
ipc.writeUD(0x6730,ovhd_c3)
ipc.writeUD(0x6734,ovhd_c4)
ipc.writeUD(0x6738,ovhd_c5)
ipc.writeUD(0x673c,ovhd_c6)
ipc.writeUD(0x6740,ovhd_c7)

SICO script:

// Annunciater panel

Var 0030, name ovhd_a1, Link FSUIPC_IN, Offset $66f0, Length 4 // AHRS 1
{
L0 = &ovhd_a1
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&a1 = L1
}
Var 0040, name a1, Link IOCARD_OUT, Device 1, Output 43 //

Var 0031, name ovhd_a2, Link FSUIPC_IN, Offset $66f4, Length 4 // Elevator PWR
{
L0 = &ovhd_a2
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&a2 = L1
}
Var 0041, name a2, Link IOCARD_OUT, Device 1, Output 46 //

Var 0032, name ovhd_a3, Link FSUIPC_IN, Offset $66f8, Length 4 // Not in op.
{
L0 = &ovhd_a3
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&a3 = L1
}
Var 0042, name a3, Link IOCARD_OUT, Device 1, Output 49 //

Var 0033, name ovhd_a4, Link FSUIPC_IN, Offset $66fc, Length 4 // L Eng Anti Ice
{
L0 = &ovhd_a4
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&a4 = L1
}
Var 0043, name a4, Link IOCARD_OUT, Device 1, Output 52 //

Var 0034, name ovhd_a5, Link FSUIPC_IN, Offset $6700, Length 4 // L Fuel Heat On
{
L0 = &ovhd_a5
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&a5 = L1
}
Var 0044, name a5, Link IOCARD_OUT, Device 1, Output 55 //

Var 0035, name ovhd_a6, Link FSUIPC_IN, Offset $6704, Length 4 // CARGO Fire
{
L0 = &ovhd_a6
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&a6 = L1
}
Var 0045, name a6, Link IOCARD_OUT, Device 1, Output 58 //

Var 0036, name ovhd_a7, Link FSUIPC_IN, Offset $6708, Length 4 // AC Emerg. Bus Off
{
L0 = &ovhd_a7
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&a7 = L1
}
Var 0046, name a7, Link IOCARD_OUT, Device 1, Output 61 //

Var 0050, name ovhd_b1, Link FSUIPC_IN, Offset $670c, Length 4 // AHRS 2
{
L0 = &ovhd_b1
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&b1 = L1
}
Var 0060, name b1, Link IOCARD_OUT, Device 1, Output 44 //

Var 0051, name ovhd_b2, Link FSUIPC_IN, Offset $6710, Length 4 // Not in op.
{
L0 = &ovhd_b2
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&b2 = L1
}
Var 0061, name b2, Link IOCARD_OUT, Device 1, Output 47 //

Var 0052, name ovhd_b3, Link FSUIPC_IN, Offset $6714, Length 4 // APU Starter On
{
L0 = &ovhd_b3
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&b3 = L1
}
Var 0062, name b3, Link IOCARD_OUT, Device 1, Output 50 //

Var 0053, name ovhd_b4, Link FSUIPC_IN, Offset $6718, Length 4 // Wing Anti Ice
{
L0 = &ovhd_b4
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&b4 = L1
}
Var 0063, name b4, Link IOCARD_OUT, Device 1, Output 48 //

Var 0054, name ovhd_b5, Link FSUIPC_IN, Offset $671c, Length 4 // Tail DeIce
{
L0 = &ovhd_b5
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&b5 = L1
}
Var 0064, name b5, Link IOCARD_OUT, Device 1, Output 56 //

Var 0055, name ovhd_b6, Link FSUIPC_IN, Offset $6720, Length 4 // Tail Temp High
{
L0 = &ovhd_b6
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&b6 = L1
}
Var 0065, name b6, Link IOCARD_OUT, Device 1, Output 59 //

Var 0056, name ovhd_b7, Link FSUIPC_IN, Offset $6724, Length 4 // APU Fire
{
L0 = &ovhd_b7
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&b7 = L1
}
Var 0066, name b7, Link IOCARD_OUT, Device 1, Output 62 //

Var 0070, name ovhd_c1, Link FSUIPC_IN, Offset $6728, Length 4 // AHRS 3
{
L0 = &ovhd_c1
IF L0 = 0
{
L1 = 0
}
IF L0 = 100
{
L1 = 0
}
&c1 = L1
}
Var 0080, name c1, Link IOCARD_OUT, Device 1, Output 45 //

Var 0071, name ovhd_c2, Link FSUIPC_IN, Offset $672c, Length 4 // Rudder
{
L0 = &ovhd_c2
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&c2 = L1
}
Var 0081, name c2, Link IOCARD_OUT, Device 1, Output 53 //

Var 0072, name ovhd_c3, Link FSUIPC_IN, Offset $6730, Length 4 // Cabin Oxygen On
{
L0 = &ovhd_c3
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&c3 = L1
}
Var 0082, name c3, Link IOCARD_OUT, Device 1, Output 51 //

Var 0073, name ovhd_c4, Link FSUIPC_IN, Offset $6734, Length 4 // R Eng. Anti Ice
{
L0 = &ovhd_c4
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&c4 = L1
}
Var 0083, name c4, Link IOCARD_OUT, Device 1, Output 54 //

Var 0074, name ovhd_c5, Link FSUIPC_IN, Offset $6738, Length 4 // R Fuel Heat On
{
L0 = &ovhd_c5
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&c5 = L1
}
Var 0084, name c5, Link IOCARD_OUT, Device 1, Output 57 //

Var 0075, name ovhd_c6, Link FSUIPC_IN, Offset $673c, Length 4 // Cabin Alt
{
L0 = &ovhd_c6
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&c6 = L1
}
Var 0085, name c6, Link IOCARD_OUT, Device 1, Output 60 //

Var 0076, name ovhd_c7, Link FSUIPC_IN, Offset $6740, Length 4 // DC Emerg. Bus Off
{
L0 = &ovhd_c7
IF L0 = 0
{
L1 = 1
}
IF L0 = 100
{
L1 = 0
}
&c7 = L1
}
Var 0086, name c7, Link IOCARD_OUT, Device 1, Output 63 //

aufa35
09-23-2011, 01:49 PM
Hi
I found my overhead event offset, and now i can program my hardware. I have some questions about SIOC, if you fan help me , i'll be very happy :D
-i have three position switches, which can have two values. (for example switch with positions ON-AUTO-OFF. Value 5 is from position ON to AUTO or from position AUTO to OFF, and value 6 is from position OFF to AUTO or from AUTO to ON. I hope you understand :) )
-the same problem is with rotary switches, which have one value when i am rotating it to right, and other value to the left
Thank you for your help

verticallimit
09-23-2011, 04:47 PM
Hi
I found my overhead event offset, and now i can program my hardware. I have some questions about SIOC, if you fan help me , i'll be very happy :D
-i have three position switches, which can have two values. (for example switch with positions ON-AUTO-OFF. Value 5 is from position ON to AUTO or from position AUTO to OFF, and value 6 is from position OFF to AUTO or from AUTO to ON. I hope you understand :) )
-the same problem is with rotary switches, which have one value when i am rotating it to right, and other value to the left
Thank you for your help

If you always start in cold and dark cockpit, there is no problem as long you set your switches and rotary switches to right settings before you leave or load the aeroplane. Some times I use the mouseclick to align switches for the first start.

You can use this script for activate variables:


Var 0000, Value 0 // Initializing
{
V0005 = DELAY 30 ,15 // open guard starter
V0025 = DELAY 34 ,35 // open guard starter
V0035 = DELAY 116 ,55 // open guard APU doors
V1025 = 1024 // Set landing alt to 10.24

}

aufa35
09-24-2011, 02:56 AM
I think you don't understand what is my problem. I don't have problem with initializing, i have problem with switches, which has more than two positions and only two values. For example ENG SYNC rotary switch. This switch can have values 8380 and 16572 (i find out it via gauge composer). For example this switch is in N2 position. When i send value 8380 (via IOCP console), this switch move to N1 position (one to the left). If i send 8380 again, it move to OFF pos. and if i send it again it move to the EPR. So 8380 is value for turning to the left, and 16752 is for turning to the right. And my problem is how to program this switch in SIOC.
Thank

verticallimit
09-25-2011, 06:52 AM
Hi
Here is my scibt for APU AIR for the MD-80 (off-on-colder). The same offset is used to trigger the switch up, and an other offset for trigger the switch down.

The electrical connection: Off = input 3 / On = no inputs / Colder = input 4


//_____APU AIR SWITCH__________

Var 0040, Link IOCARD_SW, Input 3, Type T // input for Apu Air Off/on
{
IF V0040 = 0 // Off > on
{
V0045 = 102 // event: move from off to on
}
else
{
V0045 = 101 // event: move from on to off
}
}

Var 0045, Link IOCP, Offset 2842 // execute Event for Overhead panel


//*****The scribt below are moved down in the scribt, for better reaction time for the switchs******

//_____APU AIR SWITCH COLDER_______

Var 0050, Link IOCARD_SW, Input 4, Type T // input for Apu Air on/colder
{
IF V0050 = 1 // on > colder
{
V0055 = 102 // event: move from on to colder
}
else
{
V0055 = 101 // event: move from colder > on
}
}
Var 0055, Link IOCP, Offset 2842 // execute Event for Overhead panel



The only problem is that at startup, the physical contact can be in a position other than the virtual switch. But by exercising the contact to the end points, then the setting will be correct.
It can be usefull to divided the scibt between each function and move it longer down in the scribt. This gives a minimal time difference when it is read by the program. That minimize a fault reading when the switch is moved quickly across several steps.

This scribt could also be used with rotary switches.

For rotary switches, I have thought about mounting them with resistors so that it works like a potentiometer, and then use an analog input. However, I have not come this far in my project so I have no experience with this yet.