

|
IOCards step by step
By Claude Kieffer http://www.simucockpit.com Translate : José Olliver |
|
|
|
|
|
|
|
In this tutorial We will see:
|
1
- Master
card assembly |
|
IOCards
is a non commercial design. It development was possible thanks to
Manuel Vélez, el main designer. You
can make the order of the IOcards cards in kit, or mounted and tested, in
Opencockpits
web site . All cards are sold to cost price without lucre... This tutorial non dispensation the mandatory reading of the annexes that you can
download from
Opencockpits
web site. Mainly the annexed I and II.
|
|
|
|
1 – Master card assembly |
|
The Master
card is the "heard" of the IOCards system. It provides inputs, that can be connected
to any type of switches, and also outputs for to connect Leds or to show information in the
displays.
Alone the Master card could work if it was connected to the parallel port of the computer. This is even possible... to the condition that their computer still takes that port type. The truth is that the parallel port goes being more and more scarce since the printers take all the USB. Today is better to connect the Master card in the USB port. For that an additional card is needed but it is worthwhile for quantity of reasons.
|
|
|
|
2 – USB card assembly |
|
Of course, for the assembly of the
USB card will follow the same phases exactly that for the Master. |
We will begin welding the small components: the resistors, the condensers, and then the socket of ICs. Remember that the condenser C1 that give it for 220 nF (or 0,2 µF) in the nomenclature this proportionate one for O,1 µF. The correct value is this last one (0.1). |
|
|
|
|
|
|
The Display II
card
|
The
keyboard emulator USB Keys
|
|
|
|
Each people
has their method to avoid made a mistake with the multitude of wires that leave the
IOCard card. I personally, appeal to plane cables of 40 wires that they go distributed by the whole
cockpit. Each panel (as well as that of the landing gear, EFIS, etc.…) it should be independent and easily
unmounted. Therefore, the wires of switches, LEDs, displays of each pane,l they will be gathered and connected in a male connector HE10 of 2 x 20
pins (it is very easy to get them in the electronic store).
My method is the
following: the Master card provides the HE10 male connectors J3 and J4. In each one, I connect a plane cable of 40
wires with a female connector. One goes toward the right part of the cockpit and another toward the left. When arriving the plane cable near an I modulate (for example that of the landing
gear), It is connected to a HE10 female connector thru a grimp tools. Then as the
wires of the landing gear panel are welded in a HE10 male connector because single lack that to connect it to the female connector that there is
grimped. Good, keep in mind that alone 10 wires of the plane cable were used for this module. The other ones continue but far, for example until the EFIS that
It needs 15 wires. And we continue this way since to grimp several HE10
female connectors is been able to the plane cable. Each female connector corresponds to a panel. This way to proceed has several
benefit: it is clear wired. It is also this way easier to modify it and to extend it. Let us say that the inconvenience is that there is that
grimped the connectors and it is better to have a special tool for it. It can also give to one the waste impression since they take few
wires some connectors. But, they are cheap the HE10 connectors. With these pictures it is but explicit: |
|
|
It is never necessary to weld the wires directly on the pins. It is necessary to weld the pins on a piece of printed circuit and then the wires on this circuit. |
|
|
|
Well,
We have mounted our cards, and clever the wires. First We will have to check that everything works correctly. For that,
We need a power source of 5 V cc. As say in the "Annexed I", page #16, if we want to use as
power source one of computer´s. There is but you solve. We should keep in mind that the
IOCards cards use a little current. But that of more consumption are the Leds and the displays that can be connected. A Led consumes 10
miliampers approximately, a 7 segments display (alone a "it calculates" to show a frequency for example) it can consume more 10 times. To be comfortable, a feeding of 5Vcc 2 amperes will be enough. Care: some
power source have a "current of quite" high and that can damage some
ICs. To avoid that risk, it is always necessary to use a plug with taking of
ground to connect those feedings to the line. The "Controller." The
"Controller" program that forms part of the group of the software IOCards, because as it seems logical, it will be good us to check the correct operation of the
Master card and also to locate the inputs and the outputs. It seems interesting to gather the programs and the files in an unique
folder, for example in Program Files \ IOCards.
[ fichero de configuración
para el programa CONTROLADOR ]
[ Uso de Expansión USB ]
[ Múltiples USBs ]
[ Número de periférico para
el USB ]
[ Activar en modo SIMULADOR
yes/no]
[ Numero de tarjetas Master
inter-conectadas ]
Now, We run the "Controlador" program.. We do a click in the "Comenzar" button: the program display this screen. Only We use at this moment the red box info:
In the
upper side "IOCardUSB running" will show. That means that the
Master card and the USB Expansion card is working. With the USB port, no longer interests us all that refers to the parallel port and its address. Anything should appear in the
"Inputs" box. Neither in the white window below. If it leaves some series of
numbers in this window, it can mean that there is a short circuit in the inputs
of the master card or a faulty connection cable. We activate
an input now. Prepare a piece of plane cable of 40
pins of 30 centimeters. In an end of the cable, put a HE10 female connector 2 x 20. Care with the color thread (the
#1) that should be on the side of the a small triangle is recorded in the HE10).
The other end of the cable it removes the first 10 wires, remove the plastic
cover and connect to a switch among the color wire (#1) and the #10 wire. To activate the
input #1, connect the HE10 connector in the J3 connector of the master card
(below, in the left), and close the switch, immediately will appear the
"001" in the box and window below. Perfect! The input #1 works.
Leave welded the switch with the wires that it will be necessary later. Next we expose a diagram with the correspondences: J3 Connector:
J4 Connector:
As they can already see it, the
inputs go for groups of 9. The first input takes the number 000. In total, the two connectors J3 and J4 provide 72
inputs. They are activated when join one of the pins of oneself group with the
ground pin (GND) of the same group. We have discovered that the
input #001 was activated when join with a switch the pin 1 with the pin 10 of the
J3 connector. Equally, the input #009 was activated joining the #17 and #20
pins, etc... Now we can
test them the #000 thru #008 joining the wires of our plane cable with the #10
wire of GND. If everything works, that is to say if each
input this located correctly in the white window the rest it also worked Of course anything prevents us us to make the same thing with the connector J4. At the moment alone we will make this with the Controller. |
|
|
|
Config IOCard As same of the "Controller", ConfigIOCard has a configuration file called: ConfigIOCard.ini This file es very import and it should show us the following thing. Change it if necesary:
[ fichero de configuración
para el programa IOCARD ]
[ Múltiples USBs ]
[ Número de periférico para
el USB ]
[ Número de A/D a usar de la
placa de Expansión USB ]
[ Dirección IP local para el
protocolo IOCP (UDP) ]
window = "a.txt - Bloc de notas"
La first screen is the following:
This program is
that we use to create all the programming instructions that we will use. We will go
slowly. We will think about a first very modest objective: to select the control of the landing
gearn. Nothing else. For their internal operation, the Flight Simulator uses "variables". All the functions of the simulator, and not alone those that are about the flight, refer to a variable. Peter Dowson has been able to crumble the code of Flight Simulator and it has taken out the list of those variables. This way, a software just as IOCard can negotiate them and for mediation of FSUIPC they will be been able to send to SFC. Alone they are given an address… AND there they go! The variables list of Flight Simulator goes included in the IOCards documentation, in the annex IV, and also in the Peter Downson web. There are hundreds (the annex IV consist of 43 pages), but calm because if we leave aside the variables that are about the meteorological service, geographical coordinates, or physical characteristics of an airplane, what composes a booth is really quite less important.
We return to Config IOCards. In the "Variables" folder, We can see the following columns :
NAME : here we will put the name that we want to give to the first VARIABLE. For the landing gear, we will call it for example GEAR. This name will assign to an address and from now one will be able to only use to define the function to retract or extend the landing gear, and anything. For that reason it is important to choose a sufficiently representative name. For example, if We call to a variable BRAKE, it is certain that we don't go that is after a little time if it is the left Brake, of the right or of the control of parking brake. In the NAMES column, we will put GEAR for example. We have just defined a name of VARIABLE. DIRECCIÓN : The address that We should use for the variable that We have defined provides it to us Peter Dowson in the list of FSUIPC offsets (Annex IV). We cannot put the one that want, We have to remit ourselves to the defined ones in the FSUIPC. In the list, We can see "Gear Control". Because that it is the one that We need.
We have to remit ourselves to the address
0BE8. But still lack something: We have whenever the prefix sign "$"
to each address. Then in the column ADDRESS, we will put: $0BE8 LENGTH
: it is the number of "bytes" that has each variable (that is to say the name of "words" of 8 bits).
We trust Peter's word Dowson and We will put the longitude that gives us and that in this case for the landing
gear will be 4. At the moment We will leave aside the two following columns: Then We
have: Because not this wrong for start ! For our landing gear control, We will use a switch "normal" of type micro-switch, with a Closed position and an Opened position. We make a click in the SW-NORMAL folder.
NAME
: We don't should mistake with the previous NAME. Here We will give a name to the
landing gear switch and not to the variable of the gear. For example We will take GEAR_SW, or INTER_TREN. INPUT
: We put the input number of Master card on which We will connect the landing
gear switch. It can be the first one, that takes the number 0, or the input
#1. Let us put the #1 for example. VARIABLE
: Here We find the name of the VARIABLE that We have defined in the previous
folder. It is not necessary to change it. We had chosen GEAR, because We will put GEAR in that column. Council: to avoid errors when
rewrite us the name of the variable, because it would be cause for not being recognized, make a double click in the Variable column. Then, the list of the variables that
We have already used will come out and alone We will have to choose. VALOR_ON AND VALOR_OFF: this part
is interesting. Here We have to indicate that value should take the variable when the switch
is closed (Valor_ON/Key) and when is open (Valor_OFF/Key). We have several options, according to the control type. We will already see then some examples. For the landing
gear, the simplest solution is putting ON=1 and OFF=0, then switch closed =
landing gear down and switch open = landing gear up. Nothing else. The program understands what means 0 and 1 perfectly. Good, We can
make this in a different way. Notice again in the offset line of Peter's Dowson
offsets : And that we see? Gear Control: 0=UP, 16383=Down.
When having defined a variable and a control by means of a switch,
We have just programmed the first input of the master card. Now We have to make two very important things: 1°
The Config IOCard program have received the informations of an important file, the
". dat". This is the file to the one that the main program, IOCard.exe,
it will refer to know which is our programming. But before, it is necessary to record it, because at the moment, like they can see it IOCard it arrives of the window of Config,
it calls himself "sin_nombre.dat". We execute File/Save then like and we
save that new "file.dat" with a name anyone, aeris.dat or... mi_avión.dat. This new
file.dat stays together with the other ones that We gave as examples, in the
IOCard folder. 2° Very important:
We should inform to IOCard.exe that is with this file. dat that should act. For
We execute it again the file ConfigIOCard: when arriving to the the last lines of this file this the following group of
lines:
[ Nombre y localización del
fichero de configuración ] Edit the last line and write ConfigFile=.\aeris.dat (o ConfigFile=.\mi_avion.dat) From now IOCard knows that it is that configuration file to which will have to refer. Observe that “\ before it names him of your file it means that the file.dat is inside the same folder that We have left IOCard.exe. Only that to execute the Flight Simulator, and IOCard.exe whose window should indicate us that it has found among other things FS2004 and FSUIPC. IOCard minimize in the taskbar. In four phases: define a variable, define an input, record a file. dat and configure ConfigIOcard for that “. dat” We have programmed the first function of the IOCard system. A example way, now they can program the
battery switch. The variable address is $3102, the longitude 1 and logically the Valor_ON will be 1, and the Valor_OFF
will be 0. They will have noticed that when We execute the ConfigIOCard
program, it shows us a blank page, open the file.dat that We want to use in
File/Open. AND don't forget save it every time that modifies something! The programming of the
battery switch is specially conclusive: it is much more realistic to control it with a switch that with the keyboard or with
push buttons. Now, we add the parking brake control ($0BC8) Comment 2: When
We modify something in the file ConfigIocard, it is always necessary to safeguard that file with File \ to Keep. But if this being also executed
IOCard.exe, so that they are effective the modifications, it is necessary to make click in
RELOAD. Comment 3: The window of beginning of IOCards sometimes indicates us errors, and the program cannot be executed. The most frequent errors are: “it is not a whole value”: IOCards closes with EXIT, execute it again and don't make click in the button to RELOAD, but in START. We can have
"erroneous Variable in Exit lines". That happens mainly when an or several programming lines have been open with ADD, but dropshots in
blank. Suppress the empty boxes, IOCards execute again and everything will return to the normality. |