NGXu air temp rotary switch

The forum for all issues related to the new OC4BAv5 and the new OCP4NGXu driver for PMDG B737NGXu.
James Curry
Posts: 52
Joined: Tue Jun 30, 2020 4:26 pm
Location: Guildford

NGXu air temp rotary switch

Post by James Curry »

Hi all,

I'm trying to program in sioc my air temp rotary switch as there wasn't any pre made script in my current one.

I'm half way there but missing something but not sure what.
The switch inputs show up in io console so I know sioc sees the switches and inputs,
but im missing on how to get them to link to FS and the PMDG

My setup is NGXu with P3d5.3 and pretty much full opencockpits hardware,
does anyone have a script for this rotary switch that I can use please?

Regards James


Var 1581, name CabTempCon, Link IOCARD_SW, Device 30, Input 71, Type 1 // Supply Duct Cont Cab

Var 1582, name CabTempFwd, Link IOCARD_SW, Device 30, Input 70, Type 1 // CabTempFwd

Var 1583, name CabTempAft, Link IOCARD_SW, Device 30, Input 69, Type 1 // CabTempAft

Var 1584, name AirTempFwd, Link IOCARD_SW, Device 30, Input 68, Type 1 // AirTempFwd

Var 1585, name AirTempAft, Link IOCARD_SW, Device 30, Input 66, Type 1 // AirTempAft

Var 1586, name PackTempR, Link IOCARD_SW, Device 30, Input 65, Type 1 // PackTempR

Var 1587, name PackTempL, Link IOCARD_SW, Device 30, Input 64, Type 1 // PackTempL
James Curry
Loadmaster
James Curry
Posts: 52
Joined: Tue Jun 30, 2020 4:26 pm
Location: Guildford

Re: NGXu air temp rotary switch

Post by James Curry »

I think I'm getting somewhere as I copied the logic from the wipers switch which basically does a similar thing.

I've not hit gold yet as havent actually managed to get the sim to move on rotation of the hardware yet.
I think i'm using the wrong name for the "CabTemp" as this should be a PMDG recognised command, does anyone have the correct string/variable I should be using please?



==============================================

Var 1580, name CabTemp, static

Var 1581, name AIRTEMP_CONT, Link IOCARD_SW, Device 30, Input 71, Type 1 // AIRTEMP_CONT
{
IF &AIRTEMP_CONT = 1
{
&CabTemp = 0
}
}

Var 1582, name AIRTEMP_DF, Link IOCARD_SW, Device 30, Input 70, Type 1 // AIRTEMP_DF
{
IF &AIRTEMP_DF = 1
{
&CabTemp = 1
}
}

Var 1583, name AIRTEMP_DA, Link IOCARD_SW, Device 30, Input 69, Type 1 // AIRTEMP_DA
{
IF &AIRTEMP_DA = 1
{
&CabTemp = 2
}
}

Var 1584, name AIRTEMP_PF, Link IOCARD_SW, Device 30, Input 68, Type 1 // AIRTEMP_PF
{
IF &AIRTEMP_PF = 1
{
&CabTemp = 3
}
}

Var 1585, name AIRTEMP_PA, Link IOCARD_SW, Device 30, Input 66, Type 1 // AIRTEMP_PA
{
IF &AIRTEMP_PA = 1
{
&CabTemp = 4
}
}

Var 1586, name AIRTEMP_PACK_R, Link IOCARD_SW, Device 30, Input 65, Type 1 // AIRTEMP_PACK_R
{
IF &AIRTEMP_PACK_R = 1
{
&CabTemp = 5
}
}

Var 1587, name AIRTEMP_PACK_L, Link IOCARD_SW, Device 30, Input 64, Type 1 // AIRTEMP_PACK_L
{
IF &AIRTEMP_PACK_L = 1
{
&CabTemp = 6
}
}
James Curry
Loadmaster
mvr1918
Site Admin
Posts: 1628
Joined: Thu Aug 30, 2012 3:35 pm

Re: NGXu air temp rotary switch

Post by mvr1918 »

Some comments:

As my OVH did not come with any wirings to the AIR TEMP, I never tried to make this part in the driver and the script.

But, if you have it wired , here are some details can can hellp you further.
Attachments
Screenshot 2022-03-10 175915.jpg
Screenshot 2022-03-10 175915.jpg (182.19 KiB) Viewed 2121 times
James Curry
Posts: 52
Joined: Tue Jun 30, 2020 4:26 pm
Location: Guildford

Re: NGXu air temp rotary switch

Post by James Curry »

Thank you, that looks just the ticket,
ill try programming those in and give it a whirl!

your help is as always much appreciated.
James Curry
Loadmaster
James Curry
Posts: 52
Joined: Tue Jun 30, 2020 4:26 pm
Location: Guildford

Re: NGXu air temp rotary switch

Post by James Curry »

Hi all i feel ive made real progress tonight and have managed to program my own script for this switch and it all works.
2585 ACT_SO_S_800 is the 7 position rotary and commands that is the cabin air temp selector switches,

Incidentally, If your wiring up to a card that reads pots then these are the commands and vars for the cont cab, fwd cab and aft cab temperature pots

I hope this helps others as it took me quite a while to figure out for pmdg/p3d but thanks to a few peoples help out there and hacking some existing scripts for rotarys etc......
==================================================

Var 2580, name ACT_S_A_800, static, Link IOCARD_SW, Device 99, Input 99 // // AFT CAB POT //

Var 2581, name ACT_S_C, static

Var 2582, name ACT_S_C_800, static, Link IOCARD_SW, Device 99, Input 99 // // CONT CAB POT //

Var 2583, name ACT_S_F_800, static, Link IOCARD_SW, Device 99, Input 99 // // FWD CAB POT //


===================================================


Var 2585, name ACT_SO_S_800, static // // CAB SUPPLY SWITCH 7 position//

Var 2284, name SO_CON, static, Link IOCARD_SW, Device 30, Input 71
{
IF &SO_CON = 1
{
&ACT_SO_S_800 = 0
}
}

Var 2285, name SO_FWD, static, Link IOCARD_SW, Device 30, Input 70
{
IF &SO_FWD = 1
{
&ACT_SO_S_800 = 1
}
}

Var 2286, name SO_AFT, static, Link IOCARD_SW, Device 30, Input 69
{
IF &SO_AFT = 1
{
&ACT_SO_S_800 = 2
}
}

Var 2287, name AT_FWD, static, Link IOCARD_SW, Device 30, Input 68
{
IF &AT_FWD = 1
{
&ACT_SO_S_800 = 3
}
}

Var 2288, name AT_AFT, static, Link IOCARD_SW, Device 30, Input 66
{
IF &AT_AFT = 1
{
&ACT_SO_S_800 = 4
}
}

Var 2289, name PK_R, static, Link IOCARD_SW, Device 30, Input 65
{
IF &PK_R = 1
{
&ACT_SO_S_800 = 5
}
}

Var 2290, name PK_L, static, Link IOCARD_SW, Device 30, Input 64
{
IF &PK_L = 1
{
&ACT_SO_S_800 = 6
}
}
James Curry
Loadmaster
PH-JRJ
Posts: 66
Joined: Fri Jul 07, 2017 6:58 pm

Re: NGXu air temp rotary switch

Post by PH-JRJ »

Hello James,

Good job and great that you have mastered SIOC. I will also test the script and then use it in my flightdeck!
Are you going to script the brightness for DU’s now?

Would be great to have this working too..

Best regards

Remco
James Curry
Posts: 52
Joined: Tue Jun 30, 2020 4:26 pm
Location: Guildford

Re: NGXu air temp rotary switch

Post by James Curry »

im looking in to that but im having a tough time getting pots to successfully operate as analogic inputs. This is my next mission so I can get the cont cab temp selectors successfully setup as well as the display brightness pots
James Curry
Loadmaster
PH-JRJ
Posts: 66
Joined: Fri Jul 07, 2017 6:58 pm

Re: NGXu air temp rotary switch

Post by PH-JRJ »

I’d just discovered scripted analog inputs in the script provided by Roar.
The tilt and gain of the WX radarpanel in the pedestal device 32 are scripted and use the analog inputs of the USB exp card.

I connected a potmeter to one of the inputs, tested it In PMDG and the this works!

I think that by using the VAR’s for the temp pots in the OVH this could work

Best regards

Remco
James Curry
Posts: 52
Joined: Tue Jun 30, 2020 4:26 pm
Location: Guildford

Re: NGXu air temp rotary switch

Post by James Curry »

cheers for the heads up on this, lifesaver, ill have a look!
James Curry
Loadmaster
James Curry
Posts: 52
Joined: Tue Jun 30, 2020 4:26 pm
Location: Guildford

Re: NGXu air temp rotary switch

Post by James Curry »

Well I have cracked this too it appears.

The analogic inputs on USB servos plus card gives different inputs to that on the usb expansion card.
servos plus card gives up to 1018 value and the standard expansion card the standard 255 value as expected.

I connected the pots to the standard expansion card board and with the values and script below it works absolutely fine and the sim and softyware dimmers are in harmony
I hope this script is of use to anyone out there. I hope to look at and revisit my dimmers now for the original displays brightness for the CRT main screens now!!!
=============================

Var 2580, name ACT_S_A_800, Link IOCARD_ANALOGIC, Device 30, Input 3, PosL 0, PosC 128, PosR 255 // //AFT CAB POT//

Var 2581, name ACT_S_C, static

Var 2582, name ACT_S_C_800, Link IOCARD_ANALOGIC, Device 30, Input 1, PosL 0, PosC 128, PosR 255 // //CONT CAB POT//

Var 2583, name ACT_S_F_800, Link IOCARD_ANALOGIC, Device 30, Input 2, PosL 0, PosC 128, PosR 255 // //FWD CAB POT//
James Curry
Loadmaster
Post Reply