PDA

View Full Version : sim-avionics and SIOC



sboons
10-07-2009, 03:59 AM
Hello,

I am working on my cockpit and have a mastercard from opencockpits with sim-avionics suite.

Now I have a SIOC script to change the AP-heading with a rotary switch.

It works well on the FSX-screen (I can see the bug moving when I turn it on my flight-sim virtual cockpit) but on my screen of Sim-avionics it does not change.

What am I doing wrong?

Thanks
Steef

fordgt40
10-07-2009, 05:43 AM
Steef

How are you accessing the SA suite with SIOC? Are you using the multi-offset or have you defined an offset within the SA FSUIPC_IO.INI file. If so, which one are you using. Also perhaps you should post your SIOC text file.

Regards

David

sboons
10-07-2009, 06:07 AM
Hi David,

Thanks for the quick response.

I am new to SIOC so, maybe I am doing something very wrong....

My txt file is (only for the heading yet):


Var 1, name X_HDG, Link FSUIPC_INOUT, Offset $07CC, Length 2
{
// convert from fsuipc range to degrees:
L0 = DIV &X_HDG, 182
IF &HDG != L0
{
&HDG = L0
}
}

Var 0055, Link FSUIPC_INOUT, Offset $53A2, Length 2 // HDG


Var 2, name HDG
{
CALL &OutHDG
}

Var 3, name OutHDG, Link SUBRUTINE
{

// convert from degrees to fsuipc range:
L0 = &HDG * 182
IF &X_HDG != L0
{
&X_HDG = L0
}
}

Var 4, name RO_HDG, Link IOCARD_ENCODER, Input 3, Aceleration 4 Type 2
{
L0 = &RO_HDG // * -1 turning right should be plus
V0055 = ROTATE 0, 359, L0
&HDG = ROTATE 0, 359, L0
}



In my SA the value for heading is 53A2

Thanks,
Steef

fordgt40
10-07-2009, 09:14 AM
Steef

I assume that your SIOC code and Hardware are working ok? Have you run the IOCPCONSOLE, this is an option within the SIOC screen to check that your encoder is being recognised and the values are being sent to FSUIPC.

Assuming all is ok, then have you set up the SA Server screen to receive FSUIPC INPUTS/OUTPUTS as per the manual ie within the Server screen/control panel option check the Use INPUTS and OUTPUTS boxes

Assuming all is ok again, then I suggest you try this SIOC code and make certain that the FSUIPC_IO.INI is edited to reflect the following entries.

SIOC Code
Var 0000, Value 0
{
&DIS_HDG = &HDG_OUT // HDG VALUE
}

Var 0005, Name HDG_OUT, Link FSUIPC_OUT, Offset $5302, Length 2 // HDG

Var 0064, Name ENC_HDG, Link IOCARD_ENCODER, Input 6, Aceleration 1, Type 2 // Encoder HDG
{
L0 = &ENC_HDG * -1
&DIS_HDG = ROTATE 0 ,360 ,L0
}

Var 0069, Name DIS_HDG, Link IOCARD_DISPLAY, Digit 6, Numbers 3 // DISPLAY HEADING
{
&HDG_OUT = &DIS_HDG
}

My entries for the encoder type and Input no will need to be changed to suit your system. Also make certain that the following entries are in your FSUIPC_IO.INI file

// INPUTS


// 2 byte (word)
MCP_HDG=5302


// Use FS formating
// HDG = value *65536/360

MCP_HDG_FS_FORMAT=0


Good luck

David

sboons
10-07-2009, 09:54 AM
Hi David,

I have the light version of Sim-Avionics. I think this is the problem; the light doesn't have input/output support.

I will contact SA about this, THANKS for your help!