OC cards and Prosim
514. January 2015 by Peter
I have had a few emails lately asking me how to set op OpenCockpits/SIOC with Prosim. I wrote a guide on this as an answer and most of the message is pasted in to this posting.
First of all you need to set up your OpenCockpits cards in SIOC.
This is done in the sioc.ini-file. There is a small guide inside the .ini-file on what to do. You must match the UBS-port with a device number. In this tutorial I take it that you have one MasterCard and that it is connected as “Device 1”
Inside Prosim you must enable OepnCockpits / SIOC. If you have SIOC running on the same computer as Prosim737 you can just type 127.0.0.1 as address.
SIOC code
Then there is the SIOC code. When using Prosim737 it is very easy – once you understand!
All switches, annunciators, servos etc each have an individual variable number. And so you need to set-up the variables in ProSim.
Once configured in Prosim you edit your sioc-code so that each variable is configured with the corresponding switch input on your MasterCards. It might be a bit hard to understand.
For this topic I have attached my current SIOC-file on Dropdox. Download my SIOC-file here.
In my file different sections of my cockpit have different numbers in my structure of the SIOC-file; divided by thousands:
0xxx is MCP, EFIS and FMC
1xxx is my servos
2xxx is the MIP inputs (Switches)
3xxx is the MIP outputs (Annunciators)
4xxx is the overhead inputs (Switches)
5xxx is the overhead outputs (Annunciators)
6xxx is the pedestal inputs (Switches)
7xxx is the pedestal outputs (Annunciators)
9xxx is other various things
The learning curve can be quite steep with SIOC. Things are often easier explained with an example. I will try and configure the Ground-power on switch.
In Prosim you open the configuration and select the tab “Switches”
Scroll down to “Ground Power on”.
In the drop-down menu select IOOC (Or whatever it is called I can’t quite remember)
A new text-field will appear. In this text-field you write ” 4240 ”
(The number 4240 is taken from my own structure. If you would like another structure use a number that fits you)
Once you have configured the switches you need click “OK” at the bottom to close the configuration window.
The same procedure is used for the annunciators. In configuration use the “Indicators” tab and set the variables numbers for the indicators you would like to configure.
Once you are all done click the help menu in Prosim and choose web-access. From the pop-up window click the SIOC Stub link. This opens a web browser with your SIOC-file. Copy this text.
Now the part in Prosim is done.
Next you need to configure the SIOC-file with the correct connections.
Paste the text from the browser in an empty text-file.
In SIOC you have configured your USB expantionCard with a device number. Lets say device 1. (If not then you must do this first, again, let me know if you need help).
Open the “SIOC Monitor” and click device 1.
A big window will now open, and when you flick a switch (that of course is connected to the MasterCard) you will see one og the number change from white to green (or opposite). In this example lets pretend it is the “Ground Power on” and that it is the number 60 that changes color. Remember this number (60)
Go back to your SIOC file (With the browser-text). Find variable 4240 (4240 if you use my structure); it should read: Var 4240, Link IOCARD_SW, Device 2, Input 60 // Ground Power On
Change the text
From: Var 4240, Link IOCARD_SW, Input 0 // Ground Power On
To: Var 4240, Link IOCARD_SW, Device 1, Input 60 // Ground Power On
What you do here is, that you tell SIOC that when the switch on device 1, input-id 60 is changed SIOC should send a message to Prosim that variable 4240 is changed.
So for all your switches you need to do this. There is no automatic way of doing it. It is hard manual work.
Once done it is time to do the annunciators. They are a bit more tricky.
Again you need the SIOC Monitor window.
First test that they work by clicking ALL ON in the lower right corner. Verify that all annunciators are lit. If not you need to check your wiring. On the SIOC monitor window notice the lower part going all green. These are the ID’s of the LEDs that you will need shortly. Once confirmed click ALL OFF.
Now you simply click the first number in the lower part of the screen. I think it is numbered “11”. See which annunciator lights up (if any is connected to that pin on your MasterCard). Write down which annunciator it is. Then continue to number 12. Click the number 12 so it goes green on the screen and see what annunciator that lights up. Again write it down.
Once you have mapped all annunciators you need to edit the SIOC-file.
Lets say the one we need to map is the Ground Power AVAL annunciator.
It turned on when you clicked number 15 in the SIOC-monitor.
In the SIOC-file find where it says (Your var-number might be different):
Var 5221, Link IOCARD_OUT, Output 0 // Grd Pwr available
And change it to:
Var 5221, Link IOCARD_OUT, Device 1, Output 15 // Grd Pwr available
Again, you map the connector pin with Prosim. So when Prosim sends a signal to light up var number 5221 SIOC then lights up pin 15 on device 1.
Change the SIOC-file for all your mapped annunciators.
Once done save the text file and reload SIOC to see the changes
With both the switches and LEDs please remember to all the “device 1, ” piece. It tells SIOC where to look in case you have more OpenCockpits USB products attached.
I have attached my own SIOC file. It is almost complete. You are very welcome to use it! Just copy to your SIOC folder and edit sioc.ini so it uses the file.
Then make sure all switches / LEDs attached to you MasterCard is mapped correctly using what I wrote above.
All vars that are unused you should comment out with “// ” (Slash-slash-space).
In Prosim you should only configure the variables of the switches you actually have connected.
If you configure a variable without a switch connected the position will be locked in Prosim.
Okay. I know this might sound complex at first. But try and go through the message step by step, then I think / hope it will make sense. 🙂
Happy New Year.
Thank you very much for the tutorial this clarified it to me. I tried reading Manolo Vélez tutorial and it was painful, I had a hard time understanding it. You’ve made it a lot easier.
Hello Peter,
Thank you so much for this fantastic tutorial but I have a question, everything seems to be well connected switch flip is recognized in IOC and the LED works fine but I have a problem to get all that communicating with Prosim do you know what could be missing´?
thanks
Hard to tell from what you write. But you need to configure all switches and LEDs in the Prism config. The switch config is a bit more automatic nowadays then back when I fiddled around with it. I believe you can use the auto function in Prosim config now.
A good way to see if it is working is by using the Prism Panel application. There you can see if the switch reacts in Prosim and if you press the annunciator it will light up when configured.
/P
Hello Peter,
Thanks for your reply,
I am just missing the connection between SIOC and Prosim this point is not so clear for me I followed your tutorial which is realy simple and clear and all steps have been done the only thing which is confusing me is the step after copy and change the text from the web browser of Prosim which I done and then you say something about saving this file and that is the point for me or the question where to save it? should I copy it in the INI file of SIOC and save it there? could you please explain that?
Thanks for your help and time and have a good rest of Sunday
Best regards
Mohamed
Hello Peter,
Thanks for your reply,
I am just missing the connection between SIOC and Prosim this point is not so clear for me I followed your tutorial which is realy simple and clear and all steps have been done the only thing which is confusing me is the step after copy and change the text from the web browser of Prosim which I done and then you say something about saving this file and that is the point for me or the question where to save it? should I copy it in the INI file of SIOC and save it there? could you please explain that?
Thanks for your help and time and have a good rest of Sunday
Best regards
Mohamed