PDA

View Full Version : Opencockpits USB servo card



Rockeyes
04-29-2010, 11:24 AM
I recently purchased the above card and have two problems, one being win Xp often does not recognize the card/driver after a power up of the PC, the other being that when I do get it running I cant see how to tell the SOIC which servo to drive.
I’m fed up trolling through Google searches and the Open cockpit forums only to draw a blank. Has anyone else had this problem or got a solution, before i go mad :cry:? I would also be interested in knowing if any one has based their cockpit on these cards or are they just a royal pain?
<!--EndFragment-->

fordgt40
04-29-2010, 11:48 AM
I have 6 overhead gauges working perfectly off this card. Yes, sometimes windows does not recognise the card, however, in my case this was down to only one machine running XP, the Vista machine has no problem. Generally avoid using add-on hubs (the cheap Chinese ones!) and if you continue to have problems recognising the device from Windows then go into Control Panel/Devices/Hardware and remove (de-install) all USB devices and reboot - this often works.

Telling SIOC which servo to drive is not difficult - it is explained in the friendly manual page 6 on the following link

http://www.opencockpits.com/uploads/manual_usbservos_eng.pdf

David

737NUT
04-29-2010, 01:09 PM
you also need to make sure your SIOC.ini is properly configured for your servo card. They work flawless on my vista machine.

Rockeyes
04-30-2010, 02:05 PM
I’m please to hear that the card works fine with your o/head gauges as that gives me confidence in the system itself (half the battle).
I’m not using a USB hub at the moment but I will be sure to take your advice when I make a purchase. The PC is using Windows XP pro with patch 3 installed and will recognise the OC card after numerous reboots and removals of the USB device under the Hardware/USB drivers section of Windows. I then can get the servo to test. However if I shut down the PC I’m back to the device not being recognised.
I’ve since plugged in the card to another computer running the same version of XP without any problems. So the fault clearly is with my PC.

Tomorrow I’m back to base where I have an i7 a PC running Win7 so I hopefully will be able to progress a little further.

Thanks for the help guys

Bill

Rockeyes
05-02-2010, 06:41 PM
Built another card today and tests ok with the Windows 7 Pc (64) . Still having problems getting a servo to work as a VSI, guess I’m just thick :oops:

fordgt40
05-03-2010, 04:25 AM
Hi

Does SIOC see your servo card ie in the top right sioc sign-on box there should be a device number? Does the servo move at all, but not as you would wish? Perhaps you could post your code and outline the problem.

David

Rockeyes
05-03-2010, 06:40 AM
Thanks for helping David. I will post in list form to help to keep some order.

1, I have the following programs downloaded and installed :
a, Opencockpits SIOC ver 3.7B1
b, IOCard Servo ver 0.1 Beta
c, IOCards USB Test ver 0.2 Beta
d, USBCheck ver 2.0
e, FSX
f, Full licensed FSUIP

2, IOCard USB Test shows:
a, Device 2276
b, The servo is connected to Ser-1 and ranges lower=0, Mid point =572, Upper =1023

3, SIOC
a, IDX=0-10 Card-USBServo-Device=20

I presume one of the first things I need to do is tell the operating program that I have this card installed and using position one to drive a servo. It seems that there is already a program written for a VSI (good starting point) in the Config SIOC.

Any ideas where I go from here? I was up until late last night going through hundreds of Powerpoint slides which don't seem to reflect the current software.

The other point of confusion at the moment is what programs are required to be running and is there an order in which they should be run?

http://i74.photobucket.com/albums/i264/gransden/web/SIOCScreenshot.jpg

fordgt40
05-03-2010, 09:10 AM
Thanks for the info

The good news is that you card works under IOcards test. The bad news is that SIOC is not seeing FS and the SIOC script you are using appears incomplete with no reference to the servo.

The only programmes you need to have running are FSX with FSUIPC and SIOC, if all on the same computer else if you are running SIOC on another computer then you need to run Wideclient on the remote computer. Wideclient provides a network link from a remote computer to FSX on a different computer. Your screen dump of SIOC shows that it is not connected to FSX - not certain why, perhaps you could post your sioc.ini file. Also make sure that your sioc.ini file is ammended to include reference to your servo card - amend the line USBServos=0,0 to USBServos=0,20 to reflect youe card device number.
With regard to a suitable SIOC script, the example you have posted appears incomplete with no entries for a servo motor.

Try this example which should move your servo to reflect the plane pitch


// *****************************************************************************
// * Config_SIOC ver 3.3 - By Manolo Vélez - www.opencockpits.com
// *****************************************************************************
// * FileName : servos.txt
// * Date : 22/4/2006



Var 0000, Value 0 // INICIALIZA - Initialization
{
V0001 = 511 // servo-motors to center
}

Var 0001, Link USB_SERVOS, Output 1, PosL 1, PosC 511, PosR 1023, Type 1 // Pitch

Var 0010, Link FSUIPC_IN, Offset $0578, Length 4 // PITCH, *360/(65536*65536) CONVERSION
{
L0 = V0010 * 8.38E-008 // convert to angle
IF L0 > 25 // Limit 25 degree Max.
{
L0 = 25
}
IF L0 < -25 // Limit -25 degree MAx.
{
L0 = -25
}
L1 = L0 * 20.32 // Calculate degrees for servo
V0001 = L1 + 511
}

badbill65
05-03-2010, 11:06 AM
Hi Rockeyes ive just bought one of those servo cards and also finding a bit of difficulty in understanding WHATS GOING ON !! HELP

Rockeyes
05-03-2010, 11:18 AM
Hi Rockeyes ive just bought one of those servo cards and also finding a bit of difficulty in understanding WHATS GOING ON !! HELP

Stick in here then chum as we can both learn a thing or two :D

Rockeyes
05-03-2010, 11:20 AM
How do I do this?

Also make sure that your sioc.ini file is amended to include reference to your servo card - amend the line USBServos=0,0 to USBServos=0,20 to reflect your card device number.

I've done a search and found a SIOC.INI file but if I open it up, amend and then try to save I get 'This file already exists do you wish to over write' Selecting yes gives me the message ' failed to save, access denied'. Maybe I should be using a different method to open the SIOC.INI file.

Here is a copy




[ 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

[ Usar puerto LPT en las IOCards ]
[ Use LPT port in IOCards ]
IOCard_LPT=No


[------------- CARDS CONFIG -------------]

[ IOCard Master ]
[...............]

[ Spanish : ]

[ MASTER=(Indice device),(Tipo),(Número de tarjetas),(Número device) ]

[ Indice Device: Índice usado en la variable SIOC como device, para indicar a que tarjeta se hace referencia ]
[ Se usa 0 en el caso de que sólo haya una tarjeta y no se tenga en cuenta el número de device, por defecto un script en SIOC cuando no se pone parámetro DEVICE, se hace referencia al índice 0]

[ tipo = 0 : Emulador de Master Card ]
[ tipo = 1 : Tarjeta Master conectada al puerto paralelo directamente ]
[ tipo = 2 : Tarjeta Master conectada al puerto paralelo mediante cable de compatibilidad ]
[ tipo = 3 : Placa de expansión por puerto paralelo ]
[ tipo = 4 : Tarjeta USBExpansion usada ]
[ tipo = 5 : Modulo MCP de Opencockpits ]
[ tipo = 6 : Tarjeta USBOutputs ]
[ tipo = 7 : Modulo EFIS de Opencockpits ]
[ tipo = 8 : Modulo Radio COM de Opencockpits ]
[ tipo = 9 : Modulo Radio NAV de Opencockpits ]
[ tipo = 10 : Modulo Radio ADF de Opencockpits ]
[ tipo = 11 : Modulo Radio ATC de Opencockpits ]


[ Número de tarjetas = Número de placas Master usadas, 1 a 4 para uso de placas de expansión, 1 para conexión de placa Master directa o del Emulador ]

[ Número de device = 0 en el caso del Emulador o primera tarjeta USB detectada, Dirección del puerto paralelo (por ejemplo $0378), o número de dispositivo USB ]

[ Por ejemplo para una Master conectada al puerto paralelo : ]
[ MASTER=0,1,1,$0378 ]

[ Un ejemplo de 2 USBExpansion conectadas con 3 y 2 placas Master ]
[ MASTER=0,4,3,22 ]
[ MASTER=1,4,2,24 ]

[ Un ejemplo de conexión a simulador ]
[ MASTER=0,0,1,0 ]


[ English : ]

[ MASTER=(Device index),(Type),(Number of cards),(Device number) ]

[ Device index : Index used in SIOC variable like device, this is the card used for SIOC sentence ]
[ Use 0 for only one card, for this value you not need specify Device number. If you not use DEVICE parameter in a definition in SIOC script, the default index used is 0]

[ type = 0 : Master Card Emulator ]
[ type = 1 : Master Card connected directly to parallel port ]
[ type = 2 : Master Card connected throught compatibility cable to parallel port ]
[ type = 3 : Expansion Card connected throught parallel port ]
[ type = 4 : USBExpansion Card used ]
[ type = 5 : Opencockpits MCP module ]
[ type = 6 : USBOutputs Card used ]
[ type = 7 : Opencockpits EFIS module ]
[ type = 8 : Opencockpits Radio COM module ]
[ type = 9 : Opencockpits Radio NAV module ]
[ type = 10 : Opencockpits Radio ADF module ]
[ type = 11 : Opencockpits Radio ATC module ]

[ Number of Cards = Master cards connecteds, 1 to 4 for expansion cards, 1 for a Master card directly connected or Emulator ]

[ Number of device = 0 for Emulator or first USB card detected, parallel port address, device number for specifies USBexpansion card ]

[ For example, a Master Card connected directly to parallel port : ]
[ MASTER=0,1,1,$0378 ]

[ For example, two USBExpansion cards connected with 3 and 2 Master cards used ]
[ MASTER=0,4,3,22 ]
[ MASTER=1,4,2,24 ]

[ For example, use of Master card emulator ]
[ MASTER=0,0,1,0 ]

[ Use the first USBExpansion card connected with only one Master Card attached ]
[ Esta definición es para usar la primera tarjeta USBExpansion que se encuentre instalada que además llevará conectada una placa Master ]

[MASTER=3,6,1,252]
[MASTER=0,4,1,0]
[MASTER=0,4,1,0]
MASTER=0,4,2,0


[ Others Cards / Otras tarjetas ]
[...............................]

[ Spanish : ]

[ Nombre_de_tarjeta=(Indice device),(Número device) ]

[ Indice Device: Índice usado en la variable SIOC como device, para indicar a que tarjeta se hace referencia ]
[ Se usa 0 en el caso de que sólo haya una tarjeta y no se tenga en cuenta el número de device, por defecto un script en SIOC cuando no se pone parámetro DEVICE, se hace referencia al índice 0]

[ Número de device = 0 para usar primera tarjeta USB de este tipo detectada ó número de dispositivo USB ]


[ English : ]

[ Name_of_card=(Device index),(Device number) ]

[ Device index : Index used in SIOC variable like device, this is the card used for SIOC sentence ]
[ Use 0 for only one card, for this value you not need specify Device number. If you not use DEVICE parameter in a definition in SIOC script, the default index used is 0]

[ Number of device = 0 for first USB card of this type detected, or device number for a specifies device ]

[ Ejemplo de dos USBServos en indices 0 y 1, y números de devices 17 y 23 ]
[ Example of two USBServos for index 0 and 1, and device number 17 and 23 ]

[ USBServos=0,17 ]
[ USBServos=1,23 ]


USBStepper=0,0
USBKeys=0,0
USBServos=0,0
USBRelays=0,0
USBDCmotor=0,0

[ Para los ejes analógicos se usan los números de devices de las tarjetas donde están alojados ]
[ For analogic axles, you use the device number of cards what allow the axles ]

USBAnalogic=0,0


[************** FSUIPC MODULE ***************]

[ Desabilitar lectura de las FSUIPC ]
[ FSUIPC disable mode yes/no ]
FSUipcdisable=No

[ Refresco recepción FSUIPC ]
[ FSUIPC refresh ]
FSUipcRefresh=50


[************** IOCP CLIENTS MODULES ***************]

[ Retraso para inicializacion una vez conectado el cliente en milisegundos ]
[ Delay for initialization when client has been connected in mseconds ]
IOCPini_delay=3000

[************** IOCP CLIENT MODULE #0 ***************]

[ Desactivar el módulo cliente IOCP ]
[ Disable IOCP client module ]
IOCPclient0_disable=Yes

[ IP del servidor donde debe de conectar el cliente ]
[ IOCP client host name ]
IOCPclient0_host=localhost

[ Puerto de envio del protocolo IOCP cliente ]
[ IOCP client port ]
IOCPclient0_port=8090


[************** IOCP CLIENT MODULE #1 ***************]

[ Desactivar el módulo cliente IOCP ]
[ Disable IOCP client module ]
IOCPclient1_disable=Yes

[ IP del servidor donde debe de conectar el cliente ]
[ IOCP client host name ]
IOCPclient1_host=localhost

[ Puerto de envio del protocolo IOCP cliente ]
[ IOCP client port ]
IOCPclient1_port=8099


[************** SOUND MODULE ***************]

[ Ficheros de sonido ]
[ Sound Files ]

[ Desactivar el módulo de sonido ]
[ Disable Sound module ]
Sound_disable=yes

[ Volumen general de los sonidos 0-100 ]
[ Master Volume 0-100 ]
Volume=100


[ put '*' first filename for loop Sound ]
[ anteponer '*' en el fichero para bucle continuo de sonido]

[ Sound=wav_file,frequency,volume,pan ]
[ frequency=100 to 100000 0=original -1=current ]
[ volume=0 to 100, -1=current ]
[ pan=-100 (left) to +100 (right) 0=center -1=current ]

[ Sound=Fichero_wav,frecuencia,volumen,balance ]
[ frecuencia=100 hasta 100000 0=original -1=Por defecto ]
[ volumen=0 hasta 100 -1=Volumen por defecto ]
[ balance=-100 (Izquierda) hasta +100 (Derecha) 0=centro -1=Por defecto ]

[ #1 ]
Sound=APDis.wav,-1,-1,-1

[ #2 ]
Sound=*outermk.wav,-1,-1,-1

[ #3 ]
Sound=*hello.wav

[************** KEYBOARD EMULATOR MODULE ***************]

[ Nombre exacto de la ventana donde se enviarán las teclas ]
[ Name of window for key send ]
[window = "Project Magenta Glass Cockpit - Build 396" ]

window =a.txt - Bloc de notas


[ Asignación de teclas ]
[ assign youe keys ]

#1=\B\A
#2=B
#3=C
#4=D
#5=E
#6=F
#7=G
#8=H
#9=I
#10=J
#11=K
#12=L
#13=M
#14=N
#15=O
#16=P
#17=Q
#18=R
#19=S
#20=T
#21=U
#22=V
#23=W
#24=X
#25=Y
#26=Z
#27=1
#28=2
#29=3
#30=4
#31=5
#32=6
#33=7
#34=8
#35=9
#36=0
#37=<
#38=,
#39=.
#40=-
#41=*
#42=+
#43=//
#44=/0
#45=/1
#46=/A
#47=
#48=
#49=
#50=
#51=
#52=
#53=
#54=
#55=
#56=
#57=
#58=
#59=
#60=
#61=
#62=
#63=
#64=
#65=
#66=
#67=
#68=
#69=
#70=
#71=
#72=
#73=
#74=
#75=
#76=
#77=
#78=
#79=
#80=
#81=
#82=
#83=
#84=
#85=
#86=
#87=
#88=<a
#200=<b

[ End of File ]

fordgt40
05-03-2010, 11:53 AM
Your sioc.ini file looks ok to me except that you need to change the following line to reflect the file that you wish to load for sioc

change

CONFIG_FILE=.\sioc.ssi

to

CONFIG_FILE=.\pitch.txt

Then change the sioc file example that I posted earlier to pitch.txt

With regard to you not being able to change the sioc.ini file, this is a matter of "permissions" on your home computer, are you logged on as administrator? I am not versant in this area at all, other than trying to move the file into another directory, rename it and try again, also check whether it is write protected, if so, see if you can change the properties. Others may be able to help on this

David

Rockeyes
05-04-2010, 09:45 AM
Ok I have found a work around for the editing .TXT files in Win7.

My configuration file for IOCARD is:


[ Configuration file for IOCARD ]

IOCP_Var0=0, IOCP variable that controls #1

[ Iocard Master expansion USB ]
USB=No

[ Múltiples USBs ]
[ Non unique USB ]
MUSB=yes

[ USB Device number ]
deviceUSB=2276


[ A/D used by Iocard Master expansion USB ]
USB_AD=0



[ Iocard Master, parallel port address ]
Port=$0378



[ Compatibility Mode yes/no, needed special cable ]
FullCompatible=No



[ Number of connected master cards ]
NCards=1



[ Use Expansion card yes/no]
Expansion=No



[ Use simulated card yes/no]
simulator=no



[ Deley needed for var. toggles (Project Magenta) ]
TOGGLE_DELAY=2



[ FSUIPC refresh ]
FSUipcRefresh=100



[ FSUIPC disable mode yes/no ]
FSUipcdisable=no



[ Master cards refresh ]
MasterRefresh=10



[ IOCP disable mode yes/no ]
IOCPdisable=yes


[ IP address for IOC protocol (UDP) ]
ioc_ip=127.0.0.1



[ port for IOC protocol (UDP) ]
ioc_port=8090



[ Name and path of Config file ]

ConfigFile=.\iocard.dat


[ Name of window for key send ]
[window = "Project Magenta Glass Cockpit - Build 396" ]

window = "a.txt - Bloc de notas"


[ End of File ]

The other configuration file

[ fichero de configuracion para el SIOC ver. 3.7 ]
[ Configuration file for SIOC ]


[************** SIOC ***************]


[ IOCP port ]
IOCP_port=8092

[ IOCP Timeout ]
IOCP_timeout=4000


[ Start minimized in tray ]
Minimized=No


[ Deley needed for var. toggles (Project Magenta) ]
toggle_delay=20


[ Configuration File ]
CONFIG_FILE=.\sioc.ssi


[************** IOCARDS MODULE ***************]


[ Disable IOCards module ]
IOCard_disable=No


[ Use LPT port in IOCards ]
IOCard_LPT=No


[------------- CARDS CONFIG -------------]

[ IOCard Master ]
[...............]



[ English : ]

[ MASTER=(Device index),(Type),(Number of cards),(Device number) ]

[ Device index : Index used in SIOC variable like device, this is the card used for SIOC sentence ]
[ Use 0 for only one card, for this value you not need specify Device number. If you not use DEVICE parameter in a definition in SIOC script, the default index used is 0]

[ type = 0 : Master Card Emulator ]
[ type = 1 : Master Card connected directly to parallel port ]
[ type = 2 : Master Card connected throught compatibility cable to parallel port ]
[ type = 3 : Expansion Card connected throught parallel port ]
[ type = 4 : USBExpansion Card used ]
[ type = 5 : Opencockpits MCP module ]
[ type = 6 : USBOutputs Card used ]
[ type = 7 : Opencockpits EFIS module ]
[ type = 8 : Opencockpits Radio COM module ]
[ type = 9 : Opencockpits Radio NAV module ]
[ type = 10 : Opencockpits Radio ADF module ]
[ type = 11 : Opencockpits Radio ATC module ]

[ Number of Cards = Master cards connecteds, 1 to 4 for expansion cards, 1 for a Master card directly connected or Emulator ]

[ Number of device = 0 for Emulator or first USB card detected, parallel port address, device number for specifies USBexpansion card ]

[ For example, a Master Card connected directly to parallel port : ]
[ MASTER=0,1,1,$0378 ]

[ For example, two USBExpansion cards connected with 3 and 2 Master cards used ]
[ MASTER=0,4,3,22 ]
[ MASTER=1,4,2,24 ]

[ For example, use of Master card emulator ]
[ MASTER=0,0,1,0 ]

[ Use the first USBExpansion card connected with only one Master Card attached ]


[MASTER=3,6,1,252]
[MASTER=0,4,1,0]
[MASTER=0,4,1,0]
MASTER=0,4,2,0


[ Others Cards / Otras tarjetas ]
[...............................]




[ English : ]

[ Name_of_card=(Device index),(Device number) ]

[ Device index : Index used in SIOC variable like device, this is the card used for SIOC sentence ]
[ Use 0 for only one card, for this value you not need specify Device number. If you not use DEVICE parameter in a definition in SIOC script, the default index used is 0]

[ Number of device = 0 for first USB card of this type detected, or device number for a specifies device ]

[ Ejemplo de dos USBServos en indices 0 y 1, y números de devices 17 y 23 ]
[ Example of two USBServos for index 0 and 1, and device number 17 and 23 ]

[ USBServos=0,17 ]
[ USBServos=1,23 ]


USBStepper=0,0
USBKeys=0,0
USBServos=0,20
USBRelays=0,0
USBDCmotor=0,0


[ For analogic axles, you use the device number of cards what allow the axles ]

USBAnalogic=0,0


[************** FSUIPC MODULE ***************]


[ FSUIPC disable mode yes/no ]
FSUipcdisable=No


[ FSUIPC refresh ]
FSUipcRefresh=50


[************** IOCP CLIENTS MODULES ***************]


[ Delay for initialization when client has been connected in mseconds ]
IOCPini_delay=3000

[************** IOCP CLIENT MODULE #0 ***************]


[ Disable IOCP client module ]
IOCPclient0_disable=Yes


[ IOCP client host name ]
IOCPclient0_host=localhost


[ IOCP client port ]
IOCPclient0_port=8090


[************** IOCP CLIENT MODULE #1 ***************]


[ Disable IOCP client module ]
IOCPclient1_disable=Yes


[ IOCP client host name ]
IOCPclient1_host=localhost


[ IOCP client port ]
IOCPclient1_port=8099


[************** SOUND MODULE ***************]


[ Sound Files ]


[ Disable Sound module ]
Sound_disable=yes


[ Master Volume 0-100 ]
Volume=100


[ put '*' first filename for loop Sound ]


[ Sound=wav_file,frequency,volume,pan ]
[ frequency=100 to 100000 0=original -1=current ]
[ volume=0 to 100, -1=current ]
[ pan=-100 (left) to +100 (right) 0=center -1=current ]



[ #1 ]
Sound=APDis.wav,-1,-1,-1

[ #2 ]
Sound=*outermk.wav,-1,-1,-1

[ #3 ]
Sound=*hello.wav


[ End of File ]

If I change the CONFIG_FILE=.\sioc.ssi

to

CONFIG_FILE=.\pitch.txt

I end up with an ERROR FAIL TO RUN. If I leave that setting and import the file Pitch.txt the log runs and gives me

Config_SIOC ver 3.7B1 - By Manolo Vélez - www.opencockpits.com
Open file "C:\Users\Bill\Desktop\Pitch.txt"
14:03:25
Phase 1
.OK.

Phase 2
.OK.

Phase 3
.OK.

Total file lines : 29
Total SIOC vars : 3
Time = 0:0,2

I then select OK and the Config_SIOC shows me the file in a GUI format. If I then select IOPCONSOLE (On the SIOC Menu) There is nothing shown until I import the pitch file via the file – import SOIC file. I then have what is shown in the screen shot.
http://i74.photobucket.com/albums/i264/gransden/web/screenshot2.jpg

I'm sorry all for the long post but I am struggling here. I have reloaded FSX and the Opencockpits software and have been at this all day, as well most of yesterday. My only consolation at the moment is that I've had a message from one of the other guys on the forum who is also struggling with similar problems. However his are compounded by the fact windows XP seems to be in a habit of changing the Device number every time he boots up.

I am open to any suggestions including granting someone remote access to my PC for a 'Poke about'

Bill

fordgt40
05-04-2010, 11:44 AM
Bill

Sorry to hear you are still having problems. I have not come across ERROR FAIL TO RUN before, nor do I understand why SIOC will not load the file pitch.txt automatically. I assume that you have the file in the same directory as SIOC. Perhaps you should bracket out the line MASTER=0,4,2,0 as there is no Mastercard installed.

At least SIOC sees FSX and will compile the pitch.txt file in direct mode. I assume that when you pitch the aircraft up/down there is no corresponding change in the value of the Pitch variable. If so, then it is the link between FSX and SIOC that is questionable. Is there no change in value?

David

Rockeyes
05-04-2010, 12:05 PM
Hi David

I will try the bracketing out the line MASTER=0,4,2,0

You are correct, there is no corresponding change in the value of the pitch variable and I don't see any change in the binary values regardless which text files I run.

737NUT
05-04-2010, 12:17 PM
OK,
Download the 2 files below and install in your IOCard folder. Your sioc.ini file is not correct. I made chages and posted below. The VSI config file will get you close but you need to adjust for your sevo to make it accurate. SIOC will not load a .txt file. You have to compile it into an .ssi file using the configuration menu Try these 2 files and let us know.
This is very powerful software but has a steep learning curve. :)

NOTE!!! change the file extensions to sioc.ini and VS_Tramos.ssi i had to change them to txt files to upload them here

fordgt40
05-04-2010, 12:34 PM
737NUT

Thanks for joining the help line and I hope you can sort this out. One point, however, is that you are incorrect in your assertion that SIOC will not load a .txt file and compile it. I have been doing this for years:)

David

Rockeyes
05-04-2010, 12:35 PM
OK that's the line MASTER=0,4,2,0 in brackets and the Pitch file is in the SIOC directory as a SOIC compiled script file. Sill no luck :(

Rockeyes
05-04-2010, 12:42 PM
OK,
Download the 2 files below and install in your IOCard folder. Your sioc.ini file is not correct. I made chages and posted below. The VSI config file will get you close but you need to adjust for your sevo to make it accurate. SIOC will not load a .txt file. You have to compile it into an .ssi file using the configuration menu Try these 2 files and let us know.
This is very powerful software but has a steep learning curve. :)

NOTE!!! change the file extensions to sioc.ini and VS_Tramos.ssi i had to change them to txt files to upload them here

Whoops I missed your post, sorry.. I will give that a go now and thanks for joining in.

737NUT
05-04-2010, 12:44 PM
OK that's the line MASTER=0,4,2,0 in brackets and the Pitch file is in the SIOC directory as a SOIC compiled script file. Sill no luck :(
Did you try the files i uploaded? Also, you don't run a vsi gauge off of the pitch offset. it is not the correct offset.

737NUT
05-04-2010, 12:55 PM
737NUT

Thanks for joining the help line and I hope you can sort this out. One point, however, is that you are incorrect in your assertion that SIOC will not load a .txt file and compile it. I have been doing this for years:)

David

Thanks for setting me straight on that. :)

fordgt40
05-04-2010, 01:01 PM
737NUT

The pitch file was only included as a simple test file to see if the servo card was working. The original file that Rockeyes had for the VSI was incomplete and would not work

David

737NUT
05-04-2010, 01:13 PM
737NUT

The pitch file was only included as a simple test file to see if the servo card was working. The original file that Rockeyes had for the VSI was incomplete and would not work

David

I understand completely. He had a few errors going on there so hopefully we got them sorted out.

737NUT
05-04-2010, 01:20 PM
Mke sure you are ONLY running SIOC and FSX nothing else! no usb servos or any other OC software.

Rockeyes
05-04-2010, 06:00 PM
Beginning to think the odds are stacked. That's the third time the forum has crashed on me. Anyway back to the saga:


Getting this message if I try the import method. Same as I had when I tried to change David'S file


CONFIG_FILE=.\sioc.ssi

to

CONFIG_FILE=.\pitch.txt

Config_SIOC ver 3.7B1 - By Manolo Vélez - www.opencockpits.com
Open file "C:\Users\Bill\Desktop\sioc.txt"
17:54:21
Phase 1
.OK.

Phase 2
ERROR! - Unknow command
Line: 1 [ fichero de configuracion para el SIOC ver. 3.7 ]

==> [

How do you suggest changing the file names for sioc.txt and VS-Tramosi.txt?

It's late now so I will check back in the morning.

737NUT
05-04-2010, 06:12 PM
right click on file, select change name, delete the .txt extension and change to sioc.ini and VS_Tramos.ssi

You are getting an error because there is a syntext error in the pitch file. Use the ones i gave you and see what you happens.

fordgt40
05-05-2010, 04:56 AM
Bill

There was no syntax error in the pitch file I uploaded, indeed I checked it before posting. Have you introduced an error when cutting and pasting? I assume that you are using a low level text editor like notepad etc for both the pitch file and .ini file, else you can introduce formatting commands which sioc will not like.

I suggest that we try to narrow down the problem and temporarily ignore the servos by seeing if there is a working connection between sioc and fsx. I will post some code shortly to read various fsuipc offets then you can check if they are being read

David

Rockeyes
05-05-2010, 05:12 AM
Good morning David,

I'm determined to get to the bottom off this today as I have work commitments starting tomorrow until next week. Reinstalling SIOC so I can start fresh now.

Yes currently using notepad as the text editor, can you suggest an alternative?

The plan on working on the connection between SIOC and FSX sounds a smart move.

Bill

The other thing at the moment is I feel i'm using a hit and miss method of installing theses files and where and how they should go. So I will try and find some instructions on that.

Bill

fordgt40
05-05-2010, 05:25 AM
Bill

There is an auto config programme for SIOC modules on their website link is:-

http://www.opencockpits.com/modules.php?name=Downloads&d_op=viewdownloaddetails&lid=334&title=Autoconfig

I have not used it and do not want to alter my config files but you have nothing to lose! I would save/rename your sioc.ini file first. Notepad is fine for editing the sioc files, perhaps you missed something when cutting and pasting, though I would try again to see if this is symptomatic of something else. I have sometimes found that cutting and pasting text files from other sources can introduce syntax errors that cannot be seen! I have since learnt that when this happens to delete all comments, and empty lines -usually solves it

I also attach some simple code for you to compile. Then open IOCPconsole and see if the values change when running FSX, the offsets are self explanatory


Var 0001, Name Gearstate Link FSUIPC_OUT, Offset $0BE8, Length 4 // Gear Offset, 0=up, 16383=dwn

Var 0002, Name Nsestate Link FSUIPC_IN, Offset $0BEC, Length 4 // Nose Gear Green Offset, 0=up, 16383=dwn

Var 0003, Name Lftstate Link FSUIPC_IN, Offset $0BF4, Length 4 // Left Gear Position Offset, 0=up, 16383=d

Var 0004, Name Rgtstate Link FSUIPC_IN, Offset $0BF0, Length 4 // Right Gear Position Offset, 0=up, 16383=

Var 0005, name AP_Active, Link FSUIPC_IN, Offset $07BC, Length 1 // Auto pilot active

Var 0006, name AT_Active, Link FSUIPC_IN, Offset $0810, Length 1 // Auto throttle active

Var 0007, name FLAPS_IN, Link FSUIPC_INOUT, Offset $0BE0, Length 4

Rockeyes
05-05-2010, 06:38 AM
No joy with that software from Opencockpits,

Ran a quick test with FSX running and the IOCPCONSOLE looks like its not receiving the data although its states its connected.

Getting in a pickle so starting again. I have your files you kindly posted up and pasted them into a text file.

Now how should I import/compile them?

I appreciate your time and patience David and would fully understand if you wish to take a break from my posting. If so I will use the time on a read up.

badbill65
05-05-2010, 06:52 AM
David




Just wish to say that I also appreciate the time and effort you guys are putting in to find a solution. I am also struggling with the same problems. Having read the tutorials and power point slides I'm no better off. Just need a step by step approach using the current SIOC on something basic like a VSI and I will be away.




I will stay on the side line as to speak as I don't wish to confuse the post.




Billy

fordgt40
05-05-2010, 06:53 AM
Bill

Re your "quick test" what sioc file did you use?

Re your question just cut and paste the test sioc programme I posted earlier today into notepad. Save as test.txt into the same directory as sioc.exe. Then using notepad edit your sioc.ini file so that the line CONFIG_FILE=.\????? now reads CONFIG_FILE=.\test.txt

Run FSX, run SIOC, enter IOCPConsole from the SIOC sign on window and tell me if the variables are changing when the appropriate FSX inputs are amended

David

Rockeyes
05-05-2010, 07:18 AM
http://i74.photobucket.com/albums/i264/gransden/web/screeshot3.jpg

fordgt40
05-05-2010, 07:20 AM
Bill

I have just done a quick test. I downloaded the latest version of sioc and installed it on my machine which also runs FSX. I then changed the sioc.ini CONFIG_FILE line as above. Ran both FSX and SIOC all ok. Opened IOCPConsole and saw the FSUIPC variables. Re-entered FSX changed the flaps setting and then went back to IOCPConsole - voila the values had changed. Remember, if you run SIOC and FSX on the same machine then when you open IOCPConsole it pauses FSX!!

David

Rockeyes
05-05-2010, 07:22 AM
Whoops missed this part...Then using notepad edit your sioc.ini file so that the line CONFIG_FILE=.\????? now reads CONFIG_FILE=.\test.txt :oops: will try again.

fordgt40
05-05-2010, 07:22 AM
Bill

Just saw your last post - IOCPConsole has no programme in it!!

Please just do precisely as I outlined above and report back

David

Rockeyes
05-05-2010, 07:33 AM
Ok that's in and I can see in Gear state to FLAPS_In files and when I select autopilot the DEC Value changes to a '1' :D

Gear and flaps also showing DEC Values. What a boost THANK YOU

fordgt40
05-05-2010, 07:48 AM
Bill

Ok now save your sioc.ini and test.txt somewhere else so that you can get them back again!
Now carefully copy and paste the pitch example text in an earlier post into a file called pitch.txt and put it in your sioc directory.

Now change your sioc.ini file CONFIG_FILE entry to CONFIG_FILE=.\pitch.txt. Connect your servo to output 1 on the card
Run FSX, run sioc, take off and see if the servo responds? I assume that you have connected a 5 volt supply to the servo card.

If this doesnt work then edit your sioc.ini file so that the line USBServos = 0,20 (assuming the device no is still 20)
Then repeat run fsx etc as above

David

Rockeyes
05-05-2010, 08:31 AM
IT WORKS !!!! :D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:

I'm so happy David thank you for your patience. I need to reflect on what we have done and make some notes. Then I have a couple of more questions and would like to keep them posted here to help anyone else that might need it.

Going to grab a cup of tea and contact Badbill65 (Billy) and see how he's doing. Will be online ;)

Bill

fordgt40
05-05-2010, 08:43 AM
Bill

Glad we got there. SIOC is challenging initially, but very powerful indeed. I have my whole cockpit - Overhead, pedestal, FMC, MIP, MCP/EFIS all running on it across a few networked computers. I just now need to build the physical cockpit to put all the units into it. If you have other questions then just post away.

I am off now to make a printed circuit board for the electrical digits panel on the overhead

Regards

David

Rockeyes
05-05-2010, 08:53 AM
Well is there anything I can do for you David just shout. I will PM my email address. As for your set-up have you any pictures posted?

Bill

fordgt40
05-05-2010, 09:11 AM
Bill

Ian Sissons site hosts pictures of my build, though does not yet include the overhead or completed pedestal. The link is below and Ian`s site is an Aladdins cave of tips, info etc - a must!

http://www.737ng.co.uk/djb/index.htm

David

badbill65
05-05-2010, 09:51 AM
Hi Dave,myself and Rockeyes have been at it all morning and success it works THANKS TO YOURSELF for your time and patiance we now on the right path,the first thing i intend to do is to consolidate all the information and get a good working understanding of SIOC before continuing,plus have a good look through your site.So THANKS again for all your help and hope to be in touch again soon.
THANKYOU DAVE
Regards
Billy

fordgt40
05-05-2010, 09:54 AM
Guys

That was the easy part - wait till you start programming in SIOC:roll:

Only joking;)

David

Rockeyes
05-05-2010, 10:39 AM
Whilst my head is still swimming around, I was wondering.

My current SIOC file has the Pitch.txt file in it and the CONFIG_FILE.\sioc.ssi entry changed to CONFIG_FILE=.\pitch.txt

If I wanted to add say a roll servo (attitude instrument) to the same card.

1,What would be the code be?
2, Would I just save that as a separate text file (Roll)?
3, How would SIOC launch the file?

I'm sure if I can just get my head around this there will be no stopping.

Going back now to have a good look at that link you sent.

Bill

Rockeyes
05-05-2010, 11:17 AM
Wow!!! :mrgreen:

http://www.737ng.co.uk/djb/index.htm

What can I say to that other than your work is truly inspiring.

Bill

PS The wife is worried that 'We are many':-D

fordgt40
05-05-2010, 12:23 PM
Bill

Thanks for the feedback. Re your questions

1) I cannot find the code for the roll function, but it will be out there somewhere. Now is the time to start learning SIOC - dabbling and getting your feet wet is the only way.Picking up bits of code will not work for you as all machines, references and programming abilities are different and you will need to amend the code. If you do not understand how to basically programme SIOC then you will not advance very far.
2) If you only have one servo then save your roll code in a separate .txt file. If you are getting another servo then just add the code to the existing pitch.txt file or rename it to Pitch and Roll.txt
3) SIOC will always load the filename referenced in the sioc.ini CONFIG_FILE line

Regards

David

Rockeyes
05-05-2010, 02:23 PM
Got It... Thanks for clearing that up for me.

Rockeyes
05-12-2010, 06:46 AM
Having got the pitch working with the USB card with a great deal of help, the next step is to combine it with roll. However the servo card is not responding. Can anyone see a mistake?

The SIOC.INI file line has been changed to reflect the new program to CONFIG_FILE=.\bankservo.txt

The script for the file is:

// * FileName : bankservo.txt



Var 0000, Value 0 // Initialization
{
V0001 = 511 // All servo-motors to center
V0002 = 511 // All servo-motors to center
}

Var 0001, Link IOCARD_SERVO, Output 1, PosL 1, PosC 511, PosR 1023, Type 1 // Pitch

Var 0002, Link IOCARD_SERVO, Output 2, PosL 1, PosC 511, PosR 1023, Type 1 // Bank

Var 0010, Link FSUIPC_IN, Offset $0578, Length 4 // PITCH, *360/(65536*65536) conversion
{
L0 = V0010 * 8.38E-008 // convert to angle
IF L0 > 25 // Limit to a 25 degree max
{
L0 = 25
}
IF L0 < -25 // Limit to a -25 degree max
{
L0 = -25
}
L1 = L0 * 20.32 // Calculate degrees for servo
V0001 = L1 + 511
}

Var 0020, Link FSUIPC_IN, Offset $057C, Length 4 // BANK, *360/(65536*65536) conversion
{
L0 = V0020 * 8.38E-008 // Convert to angle
IF L0 > 30 // Limit to a 30 degrees
{
L0 = 30
}
IF L0 < -30 // Limit to a -30 degrees
{
L0 = -30
}
L1 = L0 * 20.32 // Calculate degrees for servo
V0002 = L1 + 511
}

737NUT
05-12-2010, 08:23 AM
Check out this site as well,

http://www.baron58.com/Servo_Calc.htm

fordgt40
05-12-2010, 08:43 AM
Bill

You say the servo card is not responding. To what? is the pitch function ok but the roll is not? Have you tried iocpconsole and the log function to see what is or is not happening - eg is the resultant value of L1 sent to the servo within its movement range?

Regards

David

Rockeyes
05-12-2010, 09:04 AM
Hi David,
Nothing was working. Found the problem by comparing the original pitch file to my new file. I had put in the lines;

Var 0001, Link IOCARD_SERVO, Output 1, PosL 1, PosC 511, PosR 1023, Type 1 // Pitch

Var 0002, Link IOCARD_SERVO, Output 2, PosL 1, PosC 511, PosR 1023, Type 1 // Bank



It should have been:

Var 0001, Link USB_SERVOS, Output 1, PosL 1, PosC 511, PosR 1023, Type 1 // Pitch

Var 0002, Link USB_SERVOS, Output 2, PosL 1, PosC 511, PosR 1023, Type 1 // Bank

Sure wish there was a good manual for this stuff.

Bill

Rockeyes
05-12-2010, 09:09 AM
Check out this site as well,

http://www.baron58.com/Servo_Calc.htm

Thanks thats a handy link that will help a lot.

Bill

badbill65
05-12-2010, 09:11 AM
Hi Rockeyes,yeah ive just sorted that out myself by comparing the data scricpt and realised the difference,what a 'wally' for not seeing that!!

Rockeyes
05-12-2010, 09:43 AM
Who said the Scotts (Badbill65) haven't got a sense of humour:lol:.

I took my eye off the ball as to speak and just burnt out a servo:-(

The board is OK but let that be a warning to all the new guys who might be reading this. WATCH FOR SERVO STALL !!!!!!

fordgt40
05-12-2010, 11:02 AM
Servo stall!! - tell me! - been there got the T shirt:)

Well you have troubleshot your first programme. Tell me what SIOC manuals/guides you have managed to get and I will send you any extra ones that I have

Regards

David

Rockeyes
05-12-2010, 12:59 PM
That’s a kind offer.
I’m using:
1,OPENCOCKPITS IOCcard USBSERVOS INSTALLATION AND USER’S MANUAL V1
2, IOCards Step by step Part2:SIOC language V?

Bill

737NUT
05-12-2010, 01:07 PM
Who said the Scotts (Badbill65) haven't got a sense of humour:lol:.

I took my eye off the ball as to speak and just burnt out a servo:-(

The board is OK but let that be a warning to all the new guys who might be reading this. WATCH FOR SERVO STALL !!!!!!

Thats why you must set-up (your) servo in (your) installation, by setting the left, center, and right after determining these by using the console to manually enter the steps to determine the beginning, middle, and end positions of your servo. All are different even with-in brands!.

fordgt40
05-12-2010, 01:50 PM
Bill

Check your home email account

Regards

David

Rockeyes
05-14-2010, 05:05 PM
I apologise for the poor quality, but thought I should show a result of this post.

Got lighting to sort out and some software tweeking still todo.

<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/HKkS6yjA1tk&hl=en_GB&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/HKkS6yjA1tk&hl=en_GB&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>

fordgt40
05-15-2010, 05:16 AM
Bill

Well done, on to the next challenge then:)

David

Rockeyes
05-17-2010, 11:08 AM
The next challenge !

Whilst I work on my simultaneous equations for calibrating the instrument (Baron58 link), I am wondering how to reverse the servo rotation through the software. The problem, due to the servo fit and gearing used the roll is working in the wrong direction :-?

fordgt40
05-17-2010, 12:14 PM
Offhand, I would reverse the values on the servo sioc command line for posL to 1023 and posR to 1

Stand to be corrected though:) Watch the servo for stall, though I doubt this would happen as I think that the servo does not know left from right - it is just the range of values

Rockeyes
05-20-2010, 11:36 AM
Sorry for the late reply, this volcanic cloud amongst other things has been keeping me busy.

I also thought that reversing the values might do it, but unfortunately not.

As the servo is so small, a modification to its standard direction of travel by swapping over its motor and pot wires was not an option. I've settled for an in-line servo reverser from the local model shop which at the moment seems to be working fine, although an expensive solution.

fordgt40
05-20-2010, 11:46 AM
Bill

Glad you got it fixed! Next time perhaps try tinkering with the code - it should be cheaper. In the programme calcs,
try multiplying with negative numbers or take away the answer from 1024. In the latter case a previous value of 1024 becomes 0 and vice versa. There is a simple coding answer, but you need to get your feet wet:)

David

737NUT
05-20-2010, 11:49 AM
Bill

Glad you got it fixed! Next time perhaps try tinkering with the code - it should be cheaper. In the programme calcs,
try multiplying with negative numbers or take away the answer from 1024. In the latter case a previous value of 1024 becomes 0 and vice versa. There is a simple coding answer, but you need to get your feet wet:)

David
Yes, you are correct. Simple math in the code for sioc, But he isn't ready for that step yet. Baby steps. ;)

Rockeyes
05-20-2010, 12:37 PM
So there is the gauntlet being firmly laid down :lol:

fordgt40
05-20-2010, 12:44 PM
No Gain without Pain;)

Rockeyes
05-21-2010, 03:29 PM
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/VOcxq1HXV6w&hl=en_GB&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/VOcxq1HXV6w&hl=en_GB&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>

fordgt40
05-21-2010, 03:49 PM
Bill

Take a bow and open a can of beer! Well done sir, it looks great - now onto greater things:p

David

737NUT
05-21-2010, 03:56 PM
Nice Job!!! You may now advance to the next level!

asprueda
01-13-2013, 04:53 PM
Hello friend!
When the windows does not recognize the usb servo, it lights the LED? I rode a board and that did not work. I'm thinking it's the hex file.