SIOC LANGUAGE EXAMPLE
Let's do an example of SIOC configuration: one switch that turns on and off a led. We start creating a variable called "interruptor" linked with Master card input number 1:
Var 0001, name interruptor, Link IOCARD_SW, Input 1
and another called "salida" linked with Master card output number 1:
Var 0002, name salida, Link IOCARD_OUT, Output 1
The rules are:
IF &interruptor = 0 // If switch is OFF
{
&salida = 0 // output is OFF
}
ELSE
{
&salida = 1 // If not, output is ON
}
With this information, we write the file "prueba.txt":
Now we import this file with "Config_SIOC" software:

Now the configuration file is shown with this format:
We save this file as "sioc.ssi" and as "prueba.ssi" too. "sioc" software will work with "sioc.ssi" file actually. We can close now "Config_SIOC".
Now we are going to use the IOCards simulator (it's better to check the configuration file with this simulator before cabling). We check "sioc.ini" configuration file:
[ fichero de configuracion para el SIOC ver. 2.0 ]
[ Configuration file for SIOC ]
[************** SIOC ***************]
[ Puerto del servidor IOCP ]
[ IOCP port ]
IOCP_port=8092
[ Tiempo de respuesta máximo de los paquetes IOCP ]
[ IOCP Timeout ]
IOCP_timeout=4000
[ Arranque minimizado en la barra ]
[ Start minimized in tray ]
Minimized=No
[ Retraso necesario para las variables toggles (Project Magenta)]
[ Deley needed for var. toggles (Project Magenta) ]
toggle_delay=20
[ Fichero de configuracion ]
[ Configuration File ]
CONFIG_FILE=.\sioc.ssi
[************** IOCARDS MODULE ***************]
[ Desactivar el módulo de las IOCards ]
[ Disable IOCards module ]
IOCard_disable=No
[ Uso de Expansión USB ]
[ Iocard Master expansion USB ]
USB=yes
[ Múltiples USBs ]
[ Non unique USB ]
MUSB=No
[ Número de periférico para el USB ]
[ USB Device number ]
deviceUSB=2048
[ Número de A/D a usar de la placa de Expansión USB ]
[ A/D used by Iocard Master expansion USB ]
USB_AD=0
[ Puerto donde se encuentra conectada la IOCard Master ]
[ Iocard Master, parallel port address ]
Port=$0378
[ Modo compatible yes/no , necesita cable especial ]
[ Compatibility Mode yes/no, needed special cable ]
FullCompatible=No
[ Numero de tarjetas Master inter-conectadas ]
[ Number of connected master cards ]
NCards=1
[ Utiliza placa de expansión yes/no]
[ Use Expansion card yes/no]
Expansion=No
[ Activar en modo SIMULADOR yes/no]
[ Use simulated card yes/no]
simulator=yes <- we are using the simulator
[ Refresco de poll tarjetas Master ]
[ Master cards refresh ]
MasterRefresh=10
[************** FSUIPC MODULE ***************]
[ Desabilitar lectura de las FSUIPC ]
[ FSUIPC disable mode yes/no ]
FSUipcdisable=yes <- we are not using FS, nor FSUIPC
[ Refresco recepción FSUIPC ]
[ FSUIPC refresh ]
FSUipcRefresh=50
[************** IOCP CLIENT MODULE ***************]
[ Desactivar el módulo cliente IOCP ]
[ Disable IOCP client module ]
IOCPclient_disable=no
[ IP del servidor donde debe de conectar el cliente ]
[ IOCP client host name ]
IOCPclient_host=localhost
[ Puerto de envio del protocolo IOCP cliente ]
[ IOCP client port ]
IOCPclient_port=8090
[ Retraso para inicializacion una vez conectado el cliente en milisegundos ]
[ Delay for initialization when client has been connected in mseconds ]
IOCPini_delay=3000
[ End of File ]
When we start "sioc", the simulator starts automatically:
We can minimize "sioc". By clicking on "Interrupt" we define the inputs (number 1 in this case); clicking on "leds" we define the outputs (number 1 too):


Clicking on the simulated switch will turn on and off the output:

The system works fine, so we can save the simulator file as "prueba.ioc" just in case we want to work with it in the future.
By changing :
[ Activar en modo SIMULADOR yes/no]
[ Use simulated card yes/no]
simulator=no
we could work with the IOCards directly.
As we can see, X-Plane haven't been used in this example. So we can use IOCards for other purpouses than a cockpit, for example, domotics, etc.
Last edition: 19.10.2005