PDA

View Full Version : Status Lights PMDG 737NGX and OC cards (sioc)



az1228
07-10-2012, 07:09 AM
Hello everyone,

I'm using OC cards and wondering if there is a way to read via SDK the status lights and them via SIOC.
What I would nedd to do that ? Actually Gear, flaps transit leds are working well ( standard offset )

Thanks in advance

Francesco

kiek
07-24-2012, 01:10 PM
Yes, that's very well possible:
Pete Dowson's FSUIPC provides offsets for all status variables of the NGX SDK. In SIOC you can read these FSUIPC offsets.
How to read from FSUIPC offsets in SIOC is addressed here (http://www.lekseecon.nl/howto.html#readFSUIPC).

No problem at all.

Nico

nolatron
08-22-2012, 11:55 AM
I'm trying to do the same thing but I'm not having any luck yet.

My goal is to have the PMDG 737NGX light up some LEDs on a panel via FSUIPC offsets.

I have a O/C Usb Expansion Card > Master Card > Outputs Breakout Card > LED

Using the SIOC test panel, the LED works as expected when output 18 is on/off. So connection wise to the hardware we look good.

I also have the [SDK] EnableDataBroadcast=1 in the 737NGX_Options.ini file.

So I thought I'd start simple and get the parking brake light to turn on/off (output 18). The 737NGX offset PDF list the parking brake as:

Offset: 65A7
Length: 1
Date Type: BYTE
Name: PED_annunParkingBrake
Notes: Boolean

So here's the script I'm using (from that lekseecon page):



var 9010 name pb_state LINK FSUIPC_IN Offset $65A7 Length 1
{
IF &pb_state = 0
{
&pb_led = 0
}
ELSE
{
&pb_led = 1
}
}

var 9011 name pb_led Link IOCARD_OUT Output 18 // LED


And my sioc.ini (this is the OCP4NGX ini file, I just point the config to my script. Should that be ok?)




[SIOC]
IOCP_port=8092
IOCP_timeout=4000
Minimized=No
toggle_delay=20

CONFIG_FILE=.\Parking_Brake_Light.ssi
[CONFIG_FILE=.\OCP4NGX_MCP-EFIS_PP v1.05 - custom.ssi]

[IOCARDS MODULE]
IOCard_disable=No
IOCard_LPT=No

[MASTERS]
MASTER=0,5,1,41
MASTER=1,4,1,62

[FSUIPC MODULE]
FSUipcdisable=No
FSUipcRefresh=60

[IOCP CLIENTS MODULES]
IOCPini_delay= 3000
IOCPclient0_disable=no
IOCPclient0_host=localhost
IOCPclient0_port=8099
IOCPclient1_disable=yes
IOCPclient1_host=localhost
IOCPclient1_port=8092

[SOUND MODULE]
Sound_disable=Yes
Volume=100
Master 0 is a O/C P&P MCP and 1 is the USB/Master Card.

I noticed if I open the IOCP Console in SIOC, the two variables are both listed as "1" regardless if the parking brake is on or off. But I also figured if the PB_LED var is 1, it should at least turn the LED on I think.

So that's why I'm not sure what I'm missing at this point.

Any suggestions?

Thanks!

kiek
08-22-2012, 01:08 PM
Hi,

If you have assigned the USB card at 1, you should add DEVICE 1 to your Output definitions... (see How to program in SIOC, many basic examples (http://www.lekseecon.nl/howto.html#device) )

var 9010 name pb_state LINK FSUIPC_IN Offset $65A7 Length 1
{
IF &pb_state = 0
{
&pb_led = 0
}
ELSE
{
&pb_led = 1
}
}

var 9011 name pb_led Link IOCARD_OUT Device 1 Output 18 // LED

regards,
Nico

nolatron
08-22-2012, 07:38 PM
Ah... perfect. That did it. I was thinking needing to specify the device somehow was needed but wasn't sure how to do it. Thanks so much!