Sei sulla pagina 1di 8

IOCards software user manual (ver. 1.

4)
Author: Manuel Vlez. Translation by Manolo Hdez-Pea

INTRO
IOCards software consist of three main programs:
- Controller: We will use it to control the cards, to test their correct operation and to locate inputs,
outputs and displays.
- Iocard: This is the program that will run in parallel with FS2002 (FS2000 or FS98 too). Once it has
read the previously programmed configuration, it will comunicate the IOCards with the rest of
software.
- Config: With this software, we will prepare the configuration file based on FSUIPC variables. We
will define here these variables depending on which software we are going to use (FS, Project
Magenta or any FSUIPC based software).
The software also includes a card simulator, a virtual connection panel with which we can make
tests with different configurations.

CONTROLLER
We will use it to control the cards, to test their correct operation and to locate inputs, outputs and
displays.

The first thing this program asks is the parallel port address (is the same as defined in BIOS).
Normally it will be $0378.
If we are using a COMPATIBLE MODE cable, then we have to tick the corresponding checkbox (for
this option, parallel port must be set ECP type).
Note: To check if the card communicates with the software, we have to run a connection test,
setting the parallel port into SPP mode (or bidirectional mode, depending on the BIOS version).
Outputs will work properly anyway. The problems could appear with the inputs. If there wnotaould
be any type of incompatibility with the parallel port, the card could only read 5 of the 9 availables
inputs in each input block. We will anyway test al the modes (SPP-ECP-EPP-ECP/EPP) and if with
none of them the card can read the 9 inputs, then we'll have to use a COMPATIBILITY CABLE
ticking the MODO COMPATIBLE (compatible mode) checkbox (and ECP mode for the parallel
port).
Once we are ready, we will click the COMENZAR (start) button and the software will start.
We have different options:
- IN/DPLAY field is used to set a testing output or display.
- ON and OFF buttons are used to turn on and off the output or display previously defined at
IN/DPLAY.
- +ON and -ON buttons increase or decrease the initial number defined at IN/DPLAY. This is realy
useful to easily locate an output where something is connected.
- DIGITO (digit) field defines the number (0 to 9) that will be shown in a specific display.
- OK button will show the number DIGITO (digit) in the display defined at IN/DPLAY.
- RESET button will reset all the active outputs and displays, turning them to off.
- CONTADOR (counter) and STOP buttons make an increasing count in the first displays of the
displays card.
- We will use the TEST GENERAL button to execute a general test for all outputs and displays.
- We will use TODO ON (all on) button to turn on all the outputs and displays.
- With the SALIR (exit) button, we will exit the program.
Under the ENTRADAS (inputs) indicator, we will be able to see all the active inputs in each
moment.
This aplication has a configuration file named controlador.ini, where the operation modes are
defined as follows:
Port=$0378, will inform about the parallel port address.
FullCompatible=no, we will write yes just if we have to use a compatibility cable.
Expansion=no, we will write yes if we are connecting the master card to the expansion circuit (a
circuit that allows to connect four master cards in only one parallel port).
Simulator=no, if it's set to yes a virtual panel will start, and all operations will be simulated.
NCards=1, indicates how many cards are connected to the expansion circuit (up to 4).

MasterRefresh=10, refresh time (in ms) for inputs checking.

IOCARD
This is the program that will run in parallel with FS2002 (FS2000 or FS98 too). Once it has read the
previously programmed configuration, it will comunicate the IOCards with the rest of software.
Like in the previous program, parallel port address and compatible mode can be set according the
selected operation mode.
INICIAR (start) button starts the process.
PARAR (stop) button will stop the process. We can restart the process by clicking INICIAR (start)
again or exit the program by pressing SALIR (exit).
RECARGA (reload) button makes the program to reload the configuration file (iocard.dat), so any
modification in this file will be applied.
IOCards state, parallel port, simulator, FSUIPC or any problem found in the configuration file will be
shown on screen.
Like in the previous program, there is a configuration file (iocard.ini) with the same parameters
plus:
FSUipcRefresh=100, refresh time (in ms) to access to the FSUIPC variables.
ConfigFile=.\iocard.dat , path and file name for the data configuration file to be used.

CONFIG IOCARD
We will use this program to create, modify and save the different configurations to be used.
It's recommended to run it at the same time as the FSimulator does, so we can read FSUIPC
variables directly.
Basically, we have the file menu (new, open, save, etc.), the tools menu (herramientas) for version
upgrades, and the help menu, not available right now.
The program shows several tabs: VARIABLES, SW-NORMAL, SW-ROTATIVO/ENCODERS,
DISPLAYS 7-S y LINEAS DE SALIDA (outputs).
Another window shows two columns: one for variables addresses and other for their values.
We have buttons that we use to AADIR (add) a line at the end of the data sheet, BORRAR
(delete) the selected line, or INSERTAR (insert) a new line at the actual cursor position.
We can directly do operations with the FSUIPC variables: with the LEER (read) button all the
variables defined in the configuration will be updated with the corresponding values (decimal and
binary modes) to check how bits change. With the GRABAR (save) button we can write a value by
two ways: by defining its address, lenght and value; or by double clicking on a particular defined
variable so the values are written (for both ways, FSimulator must be running, so the FSUIPC
variables).

VARIABLES :
We will use this sheet to define the FSUIPC variables that we are going to use.
Nombre (name) column will content the variable name that we are using. It's very important not to
change it because this name will be used in other fields. If you change the name, the reference will
break.
Direccin (address) is the hexadecimal value where the FSUIPC variable is located. The
hexadecimal variables value list ($04E2 type) is published in the FSUIPC information documents.
You can find this information at Project Magenta web site also.
Longitud (lenght) indicates the variable number of bytes (1, 2 or 4 can be defined).
Funcin Asociada (associated function), defines a special function that manages certain variables.
There are some functions that have been designed depending in how variables are defined in
FSUIPC; also acceptable variable margins are defined for each associated function.
Here is the associated function table available today. This table will grow up day by day depending
on new requirements. This table can be accessed directly from the program by double clicking in a
specific cell, so the function will be copied to this cell:

Function
name

Description

Minimum

Maximum

HDG

Applied formula: value*(65536/360)

------

------

ALT

Applied limits

10

640

ALT2

Applied formula: value*1997537

640

QNH

Applied formula: value*16

9480

10840

MACH

Applied limits

41

95

MACH2

Applied formula: value*655.36

95

DH

Applied formula: value/100

20000

VSPEED

Applied formula: value*100

-99

99

COURSE

Applied limits

359

IAS

Applied limits

400

COM

It allows to select a COM frequency by using


two rotative switches

------

------

NAV

It allows to select a VOR frequency by using


two rotative switches

------

------

SQW

It allows to select the squawk frequency by


using two rotative switches

------

------

ADF1

It allows to select the three center digits for ADF


-----frequency by using one rotative switch

------

ADF2

Used to initialize the FSUIPC ADF variable

------

------

Valor Inicial (initial value) column will indicate the value that this variable will load when the
program starts.

SW-NORMAL :
IOCARD software is always aware of any input change. If this happens, it processes the information
in the configuration and execute the actions described theree.
We will use push buttons, switches or other elements to activate the inputs. This way we will
execute the desired actions defined in the configuration.
We will assign a text to the desired line in the Nombre (name) column.
Entrada (input), We will write here the input number which we want to check continuously. If any
change happens, the associated orders will be executed. We can locate the input where the push
butoon, switch or other element is connected using trhe controller program.
Variable column contains the name of the previously defined variable in which a particular action is
based on.
With Valor_ON (value ON) and Valor_OFF (value OFF) we will indicate the action to execute if a
particular input is active (ON) or not (OFF). We can write for example:

125 : An absolute value (in this example 125). In the related variable the value 125 will be written
when a state change happens in the corresponding input.
B+5: Only the variable bit number 5 will be set to 1.
B-0: In this case, the variable bit number 0 will be set to 0.
K+14: With this order we make the program execute a toggle operation (it activates a specific bit
only during a period of time) on the bit number 14.
In the Tipo (type) column we will write a P if we want to use a push button with state change. When
an input changes to active, a state check is made, checking first if the condition Valor_ON (value
on) is correct (absolute value or active bit (+) or inactive bit (-)). If it is so, the corresponding value
will be written in Valor_OFF (value OFF) and if the condition is not correct the opposite will be done.

SW-R/ENCODER :
In addtion to the usage of push buttons and switches, the program let the usage of rotary switches
to simulate digital encoders by using three consecutive inputs.
In the Nombre (name) column, we will assign the appropiate name.
In the Entrada Inicial (initial input) column we will define the first of the three consecutive inputs
that are connected to the rotative switch. If we define 34, the program will consider that the inputs
connected to the rotative will be 34, 35 and 36.
The Variable column will content the name of the previously defined variable, the variable on which
actions are going to be taken.
In the Aceleracin (acceleration) column we will write a value that indicates the program how to act
when we rotate the switch at high speed. You can change it until the desired value. An acceptabnle
value is 8.
The Cte. Incremento (increment factor) column will indicate the value to add or substract to the
associated variable with each step in the rotative. This value can be positive or negative.
In Tipo (type) we will write:
Blank if we are using a rotative switch.
1 if we are using 2 phased out digital encoders. They need an additional circuit and use two inputs
instead three.
2 if we are using 2 bits Gray type encoders. They doesn't need additional circuits.

DISPLAYS 7-S :
We will use this tab to define the information that displays must show. To achieve this, the program
will check changes in the associated variables and if something changes, the information shown in
the displays will be updated.
Something important is that some variables can't be used as they are stored in the FSUIPC ones,
so they must be previously processed. We will use then a special function that has been already
explained.

In the Nombre (name) column we will define a text for each line.
1er Digito (1st digit) will indicate the first digit (less significative) we are using to show the
information.
Cifras (digits) will define how many displays are we using to show a variable. If we define 8 as the
first digit and 3 as number of digits (for example for HDG indicator) the information will be shown in
the displays number 8 (for units), 9 (for tens) and 10 (for hundreds).
The Variable column will content the name of the previously defined variable. From this variable,
and once the associated function has been applied, the program will be able to show the proper
information in the displays.
With Opciones (options) we will write N if we don't want to write in the associated variable the initial
value when a display turns on after being off.

LINEAS DE SALIDA (Outputs):


The program running will check any change in the variables defined in this tab. Once any of them
changes, the program will decide if any output must be activated or deactivated or if any display
must be turned on or off.
In the Nombre (name) column, we will assign a text to the corresponding line.
In N.Salida (output number) column, we will define the output number that will be activated or
deactivated depending on the values of the related variable.
We have also the possibility of setting the name of one DISPLAYS-7S (or SW-R/ENCODER)
configuration line in this field by writing a previous *.
In the first case, the corresponding display will be turned off and, in the second, the rotative will be
disconnected and then if you rotate it nothing will happen.
The Variable column will content the name of the previously defined variable, the one we want to
check.
If we want to turn on an output, we have to write in the field Valor ON (value ON) the absolute value
(36 for example) or the bit (B0 will indicate bit number 0) for the associated variable. If the
associated variable value is the same as the one defined in Valor ON then the output will be turned
on. If not, the output will be turned off. If we use the field Valor OFF instead, then the operation will
be the opposite: if the value is different, the output will be turned on.
If we want to turn off a display the operation is the same: the display is defined in the N.Salida
column. We understand to turn off a display as to activate an output.
Just remember that the IOCard program will read the file configuration (iocard.dat) stored in its
same path. We can have several configurations but we have to rename it to iocard.dat if we want to
make it active
We can also export the iocard.dat file in a plain *.txt format so we can edit it with the notepad or any
text editor.

SIMULADOR (Simulator)
This module will be active if we set Simulator=yes. in the corresponding .INI configuration file.
When we start the program, a virtual panel consisting in 32 7-segments diplays, 32 leds, 32 push
buttons, 32 switches and 15 rotatives/encoders will appear. All these elements are simulations for
the real ones than we can connect to our cards that now are also virtual ones as they are not
connected.
To connect the components to the cards (inputs, outputs and displays) we will use the area located
in the right where:
nmero (number) makes reference to the virtual component that we are defining.
E/S/D makes reference to Input, Output or Display number where we are going to connect the
element. In the case of a rotative switch, it will be the first input used by this rotative.
In the T field, we will set 1 if we are using two signals encoders, 2 for two bits Gray type encoders
and blank for rotative swtches simulating encoders.
In Descripcin (description) we can write a short description on what is this element used for.
Using the buttons, we can change from one data table to other with the components that we are
going to use.
All the virtual components configuration can be read and saved by using the corresponding option
in the men de ficheros (file menu).
From this point, when the card must write data on a display, this data will appear in the virtual panel
and in the defined display. The same with the leds: the led will turn on (red circle) when its output is
active.
Push buttons will work like the real ones by clicking them with the mouse. In the case of switches,
one click will turn them on and another click will turn them off.
The rotatives will work by clicking the corresponding rotation arrow. We will see how inputs change
due to the movement.
The configuration can be modified at any time, changing any input/output/display assign whenever
we want.
Copyright por OpenCockpits Derechos Reservados.
Published datel: 28 05 2003

Potrebbero piacerti anche