737NG Display brightness

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

737NG Display brightness

Post by James Curry »

Hi all,

I'm quite new to all the sioc programming and really trying my best to get to grips with it all. This will probably take an expert 2 seconds to answer or come up with the solution, your help would be much appreciated.

I have the 3 main displays (inner DU outer DU and upper DU) on the PMDG 737NG which I'd like to control the brightness of via 3 pots I have plugged in to my OC servo card in positions 1 2 3
The servo card has USB ID 46

From what I can see in the IOCP console the PMDG corresponds to 1364 1366 and 1370 that i'd like to control.

Can someone suggest a script to do this or pass me some tips please.

James Curry
James Curry
Loadmaster
PH-JRJ
Posts: 66
Joined: Fri Jul 07, 2017 6:58 pm

Re: 737NG Display brightness

Post by PH-JRJ »

Hi James,

This is one of the last missing pieces in my flightdeck and hope to add it someday
My knowledge with SIOC is very poor and searched the internet without succes.
There is a example on YouTube but not how to script.

A Opencockpits manual showed below:

USB_ANALOGIC
With this link we can access the analogue axes of USB_SERVOS, USB_RELAYS and USB_STEPPER cards.
The value from the A/D converter is sent to the corresponding variable. Values can vary from 0 to 255.
Attributes :
Name Assigns a symbolic name to a variable.
Device Is the card device number where the variable is assigned. If it is 0, the first available number is considered (default). Clicking on the button gives access to a list of available IOCards USB cards connected. In this case we can select the device from the list. If it is not selected, a 0 will be considered.
Input Assigns the corresponding axe (1-5 depending on the available axes on board).
PosI Sets the left position (normal value would be 0). PosC Sets the center position (normal value would be 127). PosR Sets the righ position (normal value would be 255).

I have tried this test script and this works, turning the potmeter changes value and the servo turns

Var 0001, name servo, Link USB_SERVOS, Device 0, Output 1, PosL 190, PosC 512, PosR 1023
Var 1506, name trim, Link USB_ANALOGIC, Device 0, Input# 1, posL 1, posC 128, posR 255
&servo = &trim // End of file

You should say, change the servo into the VAR of the DU knob and working, but there is a min and max value the VAR and this can be checked in IOCP if I’m correct and this has to be devided by the max potmeter I guess and maybe the script look likes this.

Var 2509, name LWRMAIN_CAPT_INBD_DU_BRT,
Var 0004, Link IOCARD_ANALOGIC, Input 1, PosL 1, PosC 127, PosR 255
{
L0= V0004 * (outcome potmeter/du knob value)
L0= V2509
}

Was not able to test because I don’t want to try it on my flightsimulator pc to avoid problems and have my complete flightdeck out of order

Best regards

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

Re: 737NG Display brightness

Post by James Curry »

Remco,

Thanks for the reply. I need to teach myself the programming of scripts a but more, I'm sure the info you have sent will be useful once I can figure out the programming language.

Best regards James
James Curry
Loadmaster
mvr1918
Site Admin
Posts: 1628
Joined: Thu Aug 30, 2012 3:35 pm

Re: 737NG Display brightness

Post by mvr1918 »

To learn SIOC programming some years ago, I used this excellent guide


https://www.lekseecon.nl/downloads/psx/ ... 20SIOC.pdf
PH-JRJ
Posts: 66
Joined: Fri Jul 07, 2017 6:58 pm

Re: 737NG Display brightness

Post by PH-JRJ »

James Curry wrote:Remco,

Thanks for the reply. I need to teach myself the programming of scripts a but more, I'm sure the info you have sent will be useful once I can figure out the programming language.

Best regards James
Hi James, I will also start again to learn more about Sioc. If you have any progress please let me know.

Thanks

Best regards

Remco
PH-JRJ
Posts: 66
Joined: Fri Jul 07, 2017 6:58 pm

Re: 737NG Display brightness

Post by PH-JRJ »

mvr1918 wrote:To learn SIOC programming some years ago, I used this excellent guide


https://www.lekseecon.nl/downloads/psx/ ... 20SIOC.pdf
Hi Roar, Thanks for the guide will start learning and hope maybe you can script this for us someday. I know you are very busy.
I would even pay for it :D maybe an idea? Provide an script with all missing parts, like yawdamper, oxygen gauge aft. Weather radar, wetcompas etc and make this available in your store?

Best regards

Remco
Post Reply