Help Understanding how SIOC get's flight data from NGX

This is a new forum for the OC4BAv4.
Post Reply
snoopy6129
Posts: 22
Joined: Sun Jan 03, 2016 4:32 am

Help Understanding how SIOC get's flight data from NGX

Post by snoopy6129 »

I've been using OC4BA for my PMDG 737NGX on P3D for over a year and it 's been working out great. I have OpenCockpits Plug-and-Play modules for COM, NAV, ATC, MCP, FMC, EFIS and am looking to learn more about SIOC scripting so I can expand my home cockpit. To do this, I've been looking over my SIOC script that I've been using and learning from that.

What I don't understand is how my SIOC script sends or receives "flight data" from NGX. In my script, I see alot of lines to link variables to IOCARD_SW and IOCARD_OUTPUT. I understand what these do. What I don't see are link variables to FSUIPC offsets. My understanding is these offsets is how SIOC read NGX data and relays that to my Opencockpits modules (such as COM 1 active frequency). And conversely, writing new data to NGX based on the knobs or switches I set on my Opencockpit hardware (such as MCP altitude). I'm expecting lines of variable definition with "FSUIPC_IN" and "FSUIPC_OUT" in my script, but I don't - not one line.

The SIOC code below is a snippet from my script related to COM1. The comment says this code reads the active COM1 frequency from NGX. I'm not understanding where in this snippet the actual command to queries NGX for COM1 frequency is.

What is it that I'm missing? Thanks in advance.

Code: Select all

Var 1800, name AC_COM1_BCD, static     // read active COM1 display from NGX
{
  &AC_COM1 = FROMBCD &AC_COM1_BCD     // convert to decimal
  IF &COM1_Power_ON = 1
  {
    &D_AC_COM1 = &AC_COM1 + 10000     // display new active COM1 frequency leadin
  }
}
mvr1918
Site Admin
Posts: 1633
Joined: Thu Aug 30, 2012 3:35 pm

Re: Help Understanding how SIOC get's flight data from NGX

Post by mvr1918 »

First of all, OC4BAv4 scripts do not use FSUIPC.

They use a special interface, for the B737 this interface or driver is OCP4NGX.exe

This is a program written in C++ that communicate directly with the PMDG airplane SDK.

In your snippet example of the COM dispaly the following is going on behind the hood (simplified)

The airplane's COM value defined in the SDK as a variable (output) is sent from the airplane when EnableDataBroadCast=1 in the 737NGX_Options.ini
The driver OCP4NGX.exe receives the value of the variable and write it to SIOC variable 1800

In the OC4BAv4's script button you can see all variables(outputs) and events(inputs) that are defined.

All PMDG B737NGX are defined and a complete cockpit can be built.
snoopy6129
Posts: 22
Joined: Sun Jan 03, 2016 4:32 am

Re: Help Understanding how SIOC get's flight data from NGX

Post by snoopy6129 »

Thanks for your reply. That helps me alot in better understanding how OC4BA works. I do see the variable and events you mentioned and it now much better sense me on how these different pieces are related.

Thanks again.
mvr1918
Site Admin
Posts: 1633
Joined: Thu Aug 30, 2012 3:35 pm

Re: Help Understanding how SIOC get's flight data from NGX

Post by mvr1918 »

.
Post Reply