Connecting Xplane-UIPCX-SIOC

Dec 18th, 2013 | By | Category: Simulator Conversion

The Caravelle Simulator will be based on X-Plane developed by Laminar Research. It is the most realistic Flight Simulator on the market and used by NASA and many flight schools world wide. Some simulators even have FAA certification! X-Plane makes it possible to simulate all kinds of engine, instruments and system malfunctions!

Opencockpits, a company from Spain, provide electronic and software components to interface  gauges, horns, bells and electric motors or servos and connecting them to the simulator parameters.
As a basic example a bird strike followed by an engine fire will result in the original fire bell in the cockpit going off by using specially designed relay cards. The possibilities are literally endless!

A vital step is to connect the simulator to the actual hardware such as buttons, knobs and gauges. We will show you in detail how we set up the systems and programmes to enable you to do the same:

1. First you need to install X-Plane, once this is up and running you will have to download UIPCX.

datosdatarefs2. Unpack it and put the win.xpl file into the Xplane10/Resources/Plugin folder.

3. Create a .txt text file in the Xplane/Resources/Plugin folder and name it uipcxdatos.txt. UIPCX reads this config file (uipcxdatos.txt), which indicates how to access internal simulator variables. These variables are coded in the XPlane DataRefs.txt file which can be also be found in the Xplane/Resources/Plugin folder. Copy and paste the datarefs you need in the way shown on the image on the right. Here is a list of up to date datarefs.

4. Copy and paste the dataref you want to use in to the uipcsdatos.txt file:

3302    sim/cockpit/electrical/landing_lights_on

The variable 3302 was chosen by us as it reflects the ATA chapter “Lightning System”, you can use and number between 1-9999.

uipcx-SIOC5. Download and install SIOC software from opencockpits. You will need their hardware such as the USB Expansion card and one Master card. This requires you to do some research on Opencockpits and SIOC and how to programme it. This would be too much for this article.

6. Setting up SIOC console is vital for the whole thing to work! check the image on the right.

IOCP server port 8092 (Hostadress 192.168.1.4 = LOCALHOST)
IOCP client module 8090 (192.168.1.4 = LOCALHOST)
Check your own Hostadress.
7. Write a short SIOC code such as this one:

Var 0001, name LIGHT_LANDING, Link IOCP, Offset 3302
Var 0002, name SW_Landlight, Link IOCARD_SW, Input 7
{
IF &SW_Landlight = 1
{
&LIGHT_LANDING = 1
}
ELSE
{
&LIGHT_LANDING = 0
}
}

Note the VAR means variable and has nothing to do with UIPCX. The UIPCX variable is Offset 3302 which we have assigned to the landing light switch in the uipcxdatos.txt file.

This will enable a real switch to turn the Landing light Switch in X Plane ON and OFF.

Good luck!

 

 

 

The IOCP protocol uses numbers to refer to data-refs, these numbers are mapped to data-refs using the config file. Assignment to variables (numbers) - let's call them "offsets" - is arbitrary and can be freely chosen. These numbers have nothing to do with the variables in SIOC! They are similar to FSUIPC's "offsets".

For example, the following line in the config file:

1	sim/cockpit/electrical/avionics_on

will map offset 1 to the sim/cockpit/electrical/avionics_on data-ref, so when any software using the IOCP protocol requests offset 1, the value of sim/cockpit/electrical/avionics_on will be returned.

In the SIOC script, as mentioned above, now one of the (again, freely to be chosen) SIOC variables is assigned to this offset, for example:

"Var 10, link IOCP, offset 1, name avionics_on".

Some of the variables in X-Plane are arrays. For example, the Throttle value for the engines is accessed using the following variable:

sim/flightmodel/engine/ENGN_thro

In order to tell UIPCX which engine you want to get data from, you have 2 choices:

a) Put the following line in the config file:

1	sim/flightmodel/engine/ENGN_thro	_2

This way, when IOCP clients request offset 1, they will be presented the data for engine #2 (first engine is number 0, second is number 1, and so on)..

Leave a Comment