PDA

View Full Version : My LED's dont Burn



Biting Bee
07-19-2009, 12:39 PM
Hi there all!

I have cards from opencockpit and i have a little problem.
I have the usboutput card and my led dont burn when i push a button.

I will use for testing the 5volt usb power

my led has a resistor and i have checked ,.. its not damaged (led)

J1 ist bridged
J2 is not bridget

my Led is on gnd port 11
and 5+ is on the v+ port

when i bush button 1 no reaction on my led

code:


Var 0001 // Input key
{
IF V0001 = 1 // Key #23
{
V0002 = 1
}
}

Var 0002, Link IOCARD_OUT, Output 11 // Led

Where is my problem?

Kind regards
Biting Bee

Edit:
When i run the testprogram and J1 is bridged and J2 not the LED dont burn
but when i open J1 and Bridge J2 and check whit the testprogram my led burn?

In the how to :
J1 Bridge
J2 not Bridge
Use the settings for usbpower!



[Fichero de configuracion para el SIOC]
[ Configuration file for SIOC ]
Version=3.5
generated_by=Config_SiocIni

[SIOC]
IOCP_port=8092
IOCP_timeout=4000
Minimized=No
toggle_delay=20
CONFIG_FILE=.\falcon.ssi

[IOCARDS MODULE]
IOCard_disable=No
IOCard_LPT=Yes

[MASTERS]
MASTER=1,4,1,60
MASTER=2,6,1,48

[USBSTEPPER]

[USBKEYS]
USBKeys=3,70

[USBSERVOS]

[USBRELAYS]

[USBMOTOR]

[USBANALOGIC]

[FSUIPC MODULE]
FSUipcdisable=No
FSUipcRefresh=50

[IOCP CLIENTS MODULES]
IOCPini_delay= 3000
IOCPclient0_disable=No
IOCPclient0_host=localhost
IOCPclient0_port=8090
IOCPclient1_disable=No
IOCPclient1_host=localhost
IOCPclient1_port=8091

[SOUND MODULE]
Sound_disable=No
Volume=100

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

[KEYBOARD EMULATOR MODULE]
window=a.txt - Bloc de notas
#1=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=
#45=
#46=
#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=\E

[ End of File ]

fordgt40
07-20-2009, 06:35 AM
Biting Bee

Assuming everything else is ok, then I think that the problem lies with your SIOC code. There is no link between your variable and the key press, I suggest that you check on the Opencockpits site for examples as your code should be along the lines of

Var 0001, name key, Link USB_KEYS
{
IF &key = 23 // key press defined in your sioc.ini file
{
V0002 = 1 // turn on your output and led
}
}


Var 0002, Link IOCARD_OUT, Output 11

There again, I could be wrong!

Regards

David

Edit - It is always a good idea to use Controlador and/or the IOCPConsole within SIOC to check if things are happening as you expect or otherwise

kiek
07-20-2009, 07:16 AM
Hi,
You miss a DEVICE number in your Var 2 definition,
Var 0002, Link IOCARD_OUT, Output 11

It should read:

Var 0002, Link IOCARD_OUT, DEVICE x Output 11

Whereby x is the logical number you have given to your USB output card in one of your Master statements in sioc.ini

And by the way are you sure you are using a USB key card as input and not a normal input at a Master Card? If you are using a MC SIOC code should look like this:

Var 1 Link IOCARD_SW Input 23
{
v2 = v1
}

regards,
Nico

Biting Bee
07-20-2009, 05:52 PM
Hi there all

My cards
1.) USB expansion card connect via USB to my PC
2.) Mastercard connect via Parallelcable to J1 of my USB expansion card
3.) USB Key card connect via USB to my PC
4.) USB Output card connect via USB to my PC

My devices
IDX = 1 IOCardUSB - Device = 60
IDX = 2 USBOutputs - Device = 91
IDX = 3 IOCardS-Key - Device = 89

Sioc Status
Sioc Version 3.52B
IOCard device ver.:2.3
Status running

Status via pictures
http://img383.imageshack.us/img383/8146/84903851.jpg
http://img198.imageshack.us/img198/4274/90020306.jpg
http://img241.imageshack.us/img241/7171/22707124.jpg
http://img241.imageshack.us/img241/2199/67170646.jpg

USBOutput testprogramm
If i run now the test_outputs.exe my LED dont Burn!
If I now turn around jumper J1 open and J2 close goes to my lamp whit USBpower.
But J1 open and J2 close is external power and not USB power.

Is there a simple example to test my USB outputs?
Without the test program (test_outputs.exe )

Error
When i start the controlador and its to long open (ca. 3-5 minutes) i get this error:
http://img529.imageshack.us/img529/7294/50531919.th.jpg (http://img529.imageshack.us/i/50531919.jpg/)


My Sioc.ini


[Fichero de configuracion para el SIOC]
[ Configuration file for SIOC ]
Version=3.5
generated_by=Config_SiocIni

[SIOC]
IOCP_port=8092
IOCP_timeout=4000
Minimized=No
toggle_delay=20
CONFIG_FILE=.\falcon.ssi

[IOCARDS MODULE]
IOCard_disable=No
IOCard_LPT=Yes

[MASTERS]
MASTER=1,4,1,60
MASTER=2,6,1,91

[USBSTEPPER]

[USBKEYS]
USBKeys=3,89

[USBSERVOS]

[USBRELAYS]

[USBMOTOR]

[USBANALOGIC]

[FSUIPC MODULE]
FSUipcdisable=No
FSUipcRefresh=50

[IOCP CLIENTS MODULES]
IOCPini_delay= 3000
IOCPclient0_disable=No
IOCPclient0_host=192.168.178.8
IOCPclient0_port=8090
IOCPclient1_disable=No
IOCPclient1_host=192.168.178.8
IOCPclient1_port=8091

[SOUND MODULE]
Sound_disable=No
Volume=100

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

[KEYBOARD EMULATOR MODULE]
window=a.txt - Bloc de notas
#1=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=
#45=
#46=
#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=\E

[ End of File ]



My controlador.ini


[ fichero de configuracion para el programa CONTROLADOR ]
[ Configuration file for CONTROLADOR ]

[ 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=2276


[ Número de A/D a usar de la placa de Expansión USB ]
[ A/D used by Iocard Master expansion USB ]
USB_AD=4


[ 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


[ Utiliza placa de expansión yes/no]
[ Use Expansion card yes/no]
Expansion=Yes

[ Activar en modo SIMULADOR yes/no]
[ Use simulated card yes/no]
simulator=no

[ Numero de tarjetas Master inter-conectadas ]
[ Number of connected master cards ]
NCards=1

[ Refresco de poll tarjetas Master ]
[ Master cards refresh ]
MasterRefresh=10

Filter=yes


[ End of File ]




I have tried everything but it does not work!
And no, i dont have connect a 5Volt external power supplie.

Kind regards
Thomas

kiek
07-21-2009, 02:00 AM
Hi,
This is my configuration of USB output card:

JMP1: open, JMP2: closed
5 V power at the connector closest to the corner (below JMP2).

You better not use controlador for this but a simple one liner SIOC script.
Could you post your falcon.txt file too...?

regards,
Nico

Biting Bee
07-21-2009, 04:09 AM
Hi Nico , i have on my 4th picture in my last post the Falcon.txt included.
http://img241.imageshack.us/img241/2199/67170646.jpg

Do you have a simple one liner SIOC script?

Currently i use to test this:


Var 0001, name Taste, Link USB_KEYS
{
IF V0001 = 1 // Lichttaste
{
V0002 = 1
}
}

Var 0002, Link IOCARD_OUT, Output 22 // LED ON



or this:


Var 0001, name Taste, Link USB_KEYS
{
IF V0001 = 1 // Lichttaste
{
V0002 = 1
}
}

Var 0002, Link IOCARD_OUT, Device 91, Output 22 // LED ON


Kind regards
Thomas

kiek
07-21-2009, 07:15 AM
Hi Thomas,

This is wrong:

Var 0002, Link IOCARD_OUT, Device 91, Output 22 // LED ON

you must use logical device numbers, it should read:

Var 0002, Link IOCARD_OUT, Device 2, Output 22 // LED ON

In your MASTER statement in sioc.ini you have defined logical USB device number 2 to be the USB output card at physical 91 ...

And define IDX = 0 for your USB expansion card (in sioc.ini)

[read more about the DEVICE attribute here (http://www.lekseecon.nl/howto.html#device) ]
Nico

Biting Bee
07-21-2009, 05:19 PM
I found the mistake!


[ Variable IOCP inicial ]
[ Initial IOCP Variable ]
IOCP_Ini_Var=1

There was a 5!!!
But Biting Bee has only one card in use ;)

kiek
07-21-2009, 05:24 PM
That var tells the system which SIOC var is used to link to USB Keys... You are using var 1.

It has nothing to do with how many key cards you have, imho...

nico