Log in

View Full Version : SIOC script for SixPack? pmdg737



AndyCYXU
12-14-2012, 10:36 PM
So I made a board with leds for sixpack seemed like an easy project given my poor soldering skills :-) so i started search for sioc script given my low knowledge of sioc to find out that it is not possible ?!? is this true?
well if someone has one or knows of a way to make it work pls let mebknow.
otherwise i guess i will make six pack announiators say other things , not very realistic but will add some life to my cockpit posted few pics, first is the 'ugly side' keeps together, then the pretty side noone will ever see and finally what it looks like working, i know the sixpack announciators are not how they should be it was just for testing
:D

nolatron
12-25-2012, 10:48 PM
The FSUIPC 737NGX Offsets PDF file has all the offsets you need to get the sixpack to work. You can use SIOC to watch the offsets to turn the indicators on/off.

Where did you get that sixpack though?

AndyCYXU
12-25-2012, 11:51 PM
Well the board with and LEDs I made it, the actual black board seen on last picture with annunciatiors is from opencockpits they are not in correct places I know I just put them like that to see what it looks like when LEDs are ON.
so the idea is to connect less to oc- outputs board write Sioc and make the LEDs come on when they would.
How can I use Sioc to watch the offsets as you explained?
I think I am gonna have to learn that Sioc thingy... Am better with a soldering iron then I am with Sioc and as you can see on the pictures this soldering job is well... Crapy lol
Andy

nolatron
12-26-2012, 01:01 PM
Here's a SIOC script that do it.

Set the device number to match your SIOC mastercard and then change the output numbers to the appropriate O/C LED output.


var 3000 name FLT_LED Link IOCARD_OUT Device 1 Output 31
var 3001 name IRS_LED Link IOCARD_OUT Device 1 Output 31
var 3002 name FUEL_LED Link IOCARD_OUT Device 1 Output 31
var 3003 name ELEC_LED Link IOCARD_OUT Device 1 Output 31
var 3004 name APU_LED Link IOCARD_OUT Device 1 Output 31
var 3005 name OVHT_LED Link IOCARD_OUT Device 1 Output 31
var 3006 name ANTI_LED Link IOCARD_OUT Device 1 Output 31
var 3007 name HYD_LED Link IOCARD_OUT Device 1 Output 31
var 3008 name DOOR_LED Link IOCARD_OUT Device 1 Output 31
var 3009 name ENG_LED Link IOCARD_OUT Device 1 Output 31
var 3010 name OVHD_LED Link IOCARD_OUT Device 1 Output 31
var 3011 name AIR_LED Link IOCARD_OUT Device 1 Output 31


var 4000 name FLT_CONT FSUIPC_IN Offset $6508 Length 1
{
IF &FLT_CONT = 0
{
&FLT_LED = 0
}
ELSE
{
&FLT_LED = 1
}
}


var 4001 name IRS LINK FSUIPC_IN Offset $6509 Length 1
{
IF &IRS = 0
{
&IRS_LED = 0
}
ELSE
{
&IRS_LED = 1
}
}


var 4002 name FUEL LINK FSUIPC_IN Offset $650A Length 1
{
IF &FUEL = 0
{
&FUEL_LED = 0
}
ELSE
{
&FUEL_LED = 1
}
}


var 4003 name ELEC LINK FSUIPC_IN Offset $650B Length 1
{
IF &ELEC = 0
{
&ELEC_LED = 0
}
ELSE
{
&ELEC_LED = 1
}
}


var 4004 name APU LINK FSUIPC_IN Offset $650C Length 1
{
IF &APU = 0
{
&APU_LED = 0
}
ELSE
{
&APU_LED = 1
}
}


var 4005 name OVHT_DET LINK FSUIPC_IN Offset $650D Length 1
{
IF &OVHT_DET = 0
{
&OVHT_LED = 0
}
ELSE
{
&OVHT_LED = 1
}
}


var 4006 name ANTI_ICE LINK FSUIPC_IN Offset $650E Length 1
{
IF &ANTI_ICE = 0
{
&ANTI_LED = 0
}
ELSE
{
&ANTI_LED = 1
}
}


var 4007 name HYD LINK FSUIPC_IN Offset $650F Length 1
{
IF &HYD = 0
{
&HYD_LED = 0
}
ELSE
{
&HYD_LED = 1
}
}


var 4008 name DOOR LINK FSUIPC_IN Offset $6510 Length 1
{
IF &DOOR = 0
{
&DOOR_LED = 0
}
ELSE
{
&DOOR_LED = 1
}
}


var 4009 name ENG LINK FSUIPC_IN Offset $6511 Length 1
{
IF &ENG = 0
{
&ENG_LED = 0
}
ELSE
{
&ENG_LED = 1
}
}


var 4010 name OVERHEAD LINK FSUIPC_IN Offset $6512 Length 1
{
IF &OVERHEAD = 0
{
&OVHD_LED = 0
}
ELSE
{
&OVHD_LED = 1
}
}


var 4011 name AIRCOND LINK FSUIPC_IN Offset $6513 Length 1
{
IF &AIRCOND = 0
{
&AIR_LED = 0
}
ELSE
{
&AIR_LED = 1
}
}

AndyCYXU
12-26-2012, 01:33 PM
thank you very much i'm going to give it a shot asap :-)

Andy

AndyCYXU
12-27-2012, 11:02 AM
Shaun... It works ! :D
Now, I had to make few more changes but it works...
I am actually glad you didn't give it to me on the plate ready to go this way i can just actually understand and learn something.

Few i may mention:

OVHT_DET_CONT_LED <-sioc compiler complained it was too long so i changed it to OVHT_DET_LED and it also comes on when in FSX it doesn't, but these are things I will try to figure out later on

var4000 <-already existed so i just made them in sequence 4001,4002 etc...

IRS light comes on when in FSX FLT CONT comes on.. so i added FLT CONT it was missing but i left the IRS alone so they both come on..

maybe something else minor i dont recall oh! DOORS statement but whatever good thing SIOC tells me whats wrong
so anyhow thank you very much not only do i have what i wanted i actually learn something :D

well, off to the soldering board gonna solder me the FO sixpack I kinda though it will never work.

1 Question
where do you get these Offset values...?
where do they come from..?
I will try to see what i can come up with to solve/check the rest of the lights when i finish my FO six pack
then I am gonna have me a 12 pack :cool:

Thanks
Andy

nolatron
12-27-2012, 11:19 AM
Glad you got it working. I forgot that SIOC has a character limit on the var names and apparently I forgot to renumber the 4000 sequence as I copied/pasted and left one that Flt_Cont string. Whoops!

Glad you figured it out though, heh.

In the FSX\modules\FSUIPC\ folder there's a documentation folder that contains all the 737ngx offsets that you can read from.

nolatron
12-27-2012, 11:27 AM
I fixed the script above so the IRS, FLT CONT, and doors should work correctly now.

AndyCYXU
12-27-2012, 11:37 AM
Cool! I never knew i had this file there.. hmm... well noobs you know... :p what can you do with them.. :D

i was able to fix IRS its 6509 and FLT is 6508

I understand yay me ! LOL

Thanks again

Andy

AndyCYXU
12-31-2012, 01:57 AM
one more thing i changed in your original script "Length 1" instead of 2

when i opened doors for example HYD would come on as well (but not on FSX Panel) same when I shut down fuel pumps IRS would come on as well, AIR COND would always be on when there was nothing wrong... so i looked around the file for offsets you told me about and all these lights have 1 byte so i changed the Length to 1 and everything is perfect now both sixpack LEDs come on and OFF the same as on the VC cockpit
Thanks again for your help now i have a working and looking good 12 pack ;)

Andy

PS. I had a question about the Prosimparts COMM, NAV, ATC Panels you got for your panel, are they all put together all i need to do is connect it to lets say MasterCard from opencockpits come up with SIOC code and run it?
I looked on their site and their prices are very attractive, sure beats 150 euros per module i get 3 for this price, so I was kind of interested, but i might pass if i got to solder a lot of stuff.. some things like the six pack I invented i can solder but when it comes to segment displays etc.. tiny fragile stuff i just melt the darn thing LOL



(http://www.prosimparts.com/)

nolatron
12-31-2012, 03:15 PM
Thanks, got the script updated with Length 1 instead.

For the ProSim panels, they come all assembled ready to use. I just uploaded a few old pics I had of the units I got them in my gallery here: Blue Skies - A 737 Cockpit Project (http://blueskies737.com/gallery) You'll still nead to solder wires to switches and stuff though.

While they come "Plug-n-Play" I had a problem with the dual rotaries because the one's he uses are not directly compatible with the O/C Mastercard. They'll work but you get two pulses per detent. Makes it hard to dial to a certain number. To fix that I had to buy 2 O/C Encoder cards and then reprogram the chips with a PIC programmer with code from this site: Rotary Encoders (http://overkillsystems.com/id12.html) to make them work correctly.

I used 2 display cards too to light up the digits.

nolatron
03-21-2013, 09:05 PM
So the sixpack code is still working for you? I finally got my sixpack setup and I can't seem to get the buggers to work. It's like the 737NGX is never throwing a "1" value even when it turns on a light.

The code:


var 3000 name FLT_LED Link IOCARD_OUT Device 1 Output 34
var 3001 name IRS_LED Link IOCARD_OUT Device 1 Output 33
var 3002 name FUEL_LED Link IOCARD_OUT Device 1 Output 32
var 3003 name ELEC_LED Link IOCARD_OUT Device 1 Output 29
var 3004 name APU_LED Link IOCARD_OUT Device 1 Output 30
var 3005 name OVHT_LED Link IOCARD_OUT Device 1 Output 31
var 3006 name ANTI_LED Link IOCARD_OUT Device 1 Output 23
var 3007 name HYD_LED Link IOCARD_OUT Device 1 Output 24
var 3008 name DOOR_LED Link IOCARD_OUT Device 1 Output 25
var 3009 name ENG_LED Link IOCARD_OUT Device 1 Output 28
var 3010 name OVHD_LED Link IOCARD_OUT Device 1 Output 27
var 3011 name AIR_LED Link IOCARD_OUT Device 1 Output 26

var 4000 name FLT_CONT LINK FSUIPC_IN Offset $6508 Length 1
{
IF &FLT_CONT = 0
{
&FLT_LED = 0
}
ELSE
{
&FLT_LED = 1
}
}

var 4001 name IRS LINK FSUIPC_IN Offset $6509 Length 1
{
IF &IRS = 0
{
&IRS_LED = 0
}
ELSE
{
&IRS_LED = 1
}
}

var 4002 name FUEL LINK FSUIPC_IN Offset $650A Length 1
{
IF &FUEL = 0
{
&FUEL_LED = 0
}
ELSE
{
&FUEL_LED = 1
}
}

var 4003 name ELEC LINK FSUIPC_IN Offset $650B Length 1
{
IF &ELEC = 0
{
&ELEC_LED = 0
}
ELSE
{
&ELEC_LED = 1
}
}

var 4004 name APU LINK FSUIPC_IN Offset $650C Length 1
{
IF &APU = 0
{
&APU_LED = 0
}
ELSE
{
&APU_LED = 1
}
}

var 4005 name OVHT_DET LINK FSUIPC_IN Offset $650D Length 1
{
IF &OVHT_DET = 0
{
&OVHT_LED = 0
}
ELSE
{
&OVHT_LED = 1
}
}

var 4006 name ANTI_ICE LINK FSUIPC_IN Offset $650E Length 1
{
IF &ANTI_ICE = 0
{
&ANTI_LED = 0
}
ELSE
{
&ANTI_LED = 1
}
}

var 4007 name HYD LINK FSUIPC_IN Offset $650F Length 1
{
IF &HYD = 0
{
&HYD_LED = 0
}
ELSE
{
&HYD_LED = 1
}
}

var 4008 name DOOR LINK FSUIPC_IN Offset $6510 Length 1
{
IF &DOOR = 0
{
&DOOR_LED = 0
}
ELSE
{
&DOOR_LED = 1
}
}

var 4009 name ENG LINK FSUIPC_IN Offset $6511 Length 1
{
IF &ENG = 0
{
&ENG_LED = 0
}
ELSE
{
&ENG_LED = 1
}
}

var 4010 name OVERHEAD LINK FSUIPC_IN Offset $6512 Length 1
{
IF &OVERHEAD = 0
{
&OVHD_LED = 0
}
ELSE
{
&OVHD_LED = 1
}
}

var 4011 name AIRCOND LINK FSUIPC_IN Offset $6513 Length 1
{
IF &AIRCOND = 0
{
&AIR_LED = 0
}
ELSE
{
&AIR_LED = 1
}
}


To test I get in the air and flip off all the fuel and hyd switches, so it lights on the sixpack but not on my panel. IOCP Console shows the offset is showing a value of "0" still even though it's on in the VC.

nolatron
03-21-2013, 11:20 PM
Nevermind. It's working now :)

AndyCYXU
03-22-2013, 12:42 AM
all right good deal, not sure I'd be able to help you fix it, other then confirm its still working good for me..
what was the problem just out of curiosity ..?
Andy

nolatron
03-22-2013, 08:13 AM
honestly I have no idea. I think SIOC for some reason just wasn't reading anything from FSX. After double checking the sioc.ini file and reloading up some other scripts to test LED outputs, everything started working.