Results 1 to 7 of 7
  1. #1
    300+ Forum Addict oal331's Avatar
    Join Date
    Dec 2006
    Location
    Athens - Greece
    Posts
    379
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    [Solved] Need help for SIOC !

    Hello Captains,

    i need your help please, about SIOC.

    1) Can i have 2 different SIOC running in 2 PCs ?



    Why ? In main FSX Pc i'm running a SIOC, having conected there all my overhead OC's Cards
    I a 2nd PC, (Captain's) i want to run another SIOC beause there i have connected all OC Radios. Is it possible to have 2 SIOC running in the same network?


    I'm asking because i tried and failed. 2nd SIOC recognizes all the Radios connected, but does not send anything to FSX (testing XPDR)


    2) How to programming Encoders ?

    i made the SIOC code below to control OVH's Flight and Landing Altitudes for B737. It works......, but if i will pass the limits disaster. i.e if will turn the encoder and pass below 0, or above the 41000, i can not control the values.
    What i want ? If possible to have negative values for Landing Altitudes and also to remain the encoder within the limits i want.
    i.e the Flight Altitude should be always from value 00000 to 41000 right? How can put these limits in Sioc code ?

    // *******************************************************
    // * *
    // * Rotary Encoders for Flight & Cabin Altitude *
    // * *
    // *******************************************************




    Var 0015, name IN_F_ALT, Link FSUIPC_INOUT, Offset $94F6, Length 1 // ifly input Flight Altide
    Var 0016, name E_F_ALT, Link IOCARD_ENCODER Input 207 Aceleration 2 Type 2
    {
    L0 = &E_F_ALT * -1 // * -1 turning clockwise should be plus
    &IN_F_ALT = ROTATE 0 84 L0
    }


    Var 0017, name IN_L_ALT, Link FSUIPC_INOUT, Offset $94F7, Length 1 // ifly input Landing Altide
    Var 0018, name E_L_ALT, Link IOCARD_ENCODER Input 209 Aceleration 2 Type 2
    {
    L0 = &E_L_ALT * -1 // * -1 turning clockwise should be plus
    &IN_L_ALT = ROTATE 0 280 L0
    }




    Thank you


    Eddie
    Last edited by oal331; 09-08-2012 at 01:45 PM. Reason: solved
    Eddie Armaos
    Athens-Greece


    [

  2. #2
    150+ Forum Groupie


    Perik's Avatar
    Join Date
    Aug 2007
    Location
    NORWAY
    Posts
    193
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Need help for SIOC !

    Eddie

    Try this command instead of ROTATE

    LIMIT
    Variable = LIMIT Parameter1 Parameter2 Parameter3 Increases or decreases the variable value with the value in Parameter3. If the resutl is higher than Parameter2, then variable = Parameter2. If the resutl is lower than Parameter1, then variable = Parameter1.
    Parameter1 : Variable, real constant or integer constant. Lower value.
    Parameter2 : Variable, real constant or integer constant. Upper value.
    Parameter3 : Variable, real constant or integer constant. Increment/Decrement.

    Example:
    V9302 = LIMIT 0 60000 V0456


    Regards,
    Per-Erik
    www.hoddo.net

  3. #3
    300+ Forum Addict oal331's Avatar
    Join Date
    Dec 2006
    Location
    Athens - Greece
    Posts
    379
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Need help for SIOC !

    Thank you for reply and inforamtion given.

    So i changed the ROTATE with LIMIT function, but sometimes works, other times no.
    I can't understand if the problem is the initila FSX value to increase or descrease.

    Flight Altitude values must be within -1000 feet and 42000 feet. For make it easier we forget the -1000 feet and we start the values from min 0 feet.

    Let's say that when loading the aircraft at FS, the initial FLT_ALT's value is 20000
    The change of values should be at 500 feet, so 19500 or 20500 must be the next altitude when turn the encoder once.

    How to program the sioc for this ? Do i Need to declare any initial values for encoder, for 20000feet that aircraft has already and not the 0 ?

    Var 0015, name IN_F_ALT, Link FSUIPC_INOUT, Offset $94F6, Length 1 // ifly input

    Flight Altide
    Var 0016, name E_F_ALT, Link IOCARD_ENCODER Input 207 Aceleration 2 Type 2
    {
    L0 = &E_F_ALT * -1 // * -1 turning clockwise should be plus
    &IN_F_ALT = LIMIT 0 85 L0
    }

    Eddie
    Eddie Armaos
    Athens-Greece


    [

  4. #4
    150+ Forum Groupie


    Perik's Avatar
    Join Date
    Aug 2007
    Location
    NORWAY
    Posts
    193
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Need help for SIOC !

    Eddie

    What about this:

    Set Aceleration to 1 so the value from the Encoder is either 1 or -1,
    Then multiply this with 5 (-5 in your case)
    Not sure about your limit (0 85...) but these you have to adapt to FSUIPC offset requirements.

    Var 0016, name E_F_ALT, Link IOCARD_ENCODER Input 207 Aceleration 1 Type 2
    {
    L0 = &E_F_ALT * -5 // * -1 turning clockwise should be plus
    &IN_F_ALT = LIMIT 0 85 L0
    }
    Regards,
    Per-Erik
    www.hoddo.net

  5. #5
    300+ Forum Addict oal331's Avatar
    Join Date
    Dec 2006
    Location
    Athens - Greece
    Posts
    379
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Need help for SIOC !

    Solved :

    I made this SIOC and now Encoder works !!

    Var 0016, name E_F_ALT, Link IOCARD_ENCODER, Input 207, Aceleration 1 Type 2
    {
    if &E_F_ALT < 0
    {
    &in_ifly = 129
    }
    ELSE
    {
    &in_ifly = 130
    }
    }
    Thank you Per-Erik !! (Btw i visited your site and you have made an excellent job there!!)


    About first issue, i still didb't make to comunicate a 2nd SIOC code to main FSX for OC's Radios, anyway the weekend will be long !!!

    Regards

    Eddie
    Last edited by oal331; 09-08-2012 at 11:05 AM.
    Eddie Armaos
    Athens-Greece


    [

  6. #6
    150+ Forum Groupie


    Perik's Avatar
    Join Date
    Aug 2007
    Location
    NORWAY
    Posts
    193
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Need help for SIOC !

    Thx Eddie.

    Not tested too much using a second SIOC server but it works great as far as I can see.
    They can run side by side and the second SIOC server communicates with FS9/FSX through
    WideFS.

    If you need communication between the two SIOC servers you can do this at least in two ways:

    Either using some free offset in FSUIPC or by utilizing the IOCP protocol like this:

    On the main SIOC server you’ll need to enable IOCP client:

    [************** IOCP CLIENT MODULE #0 ***************]
    IOCPclient0_disable=No
    IOCPclient0_host=192,168.0.32 (You can either put in the Hostname of the client or IP-address.)
    IOCPclient0_port=8099 (Pick a port address)

    On the second SIOC server (192.168.0.32) set the server port address to 8099
    ************** SIOC ***************]
    Name=Main
    IOCP_port=8099

    When both are running you should see they discover each other in the SIOC status window.

    Now you can start to exchange data between the two using Link IOCP statement in your SIOC code.
    The second SIOC server becomes much like an ordinary device with its own set of variables.

    I would expect that all your radio modules communicate with FSX only through WideFS/FSUIPC.
    If not, you may have to exchange data with the main SIOC server.

    Just some thoughts from a guy on thin ice - never been there, done that.
    Regards,
    Per-Erik
    www.hoddo.net

  7. #7
    300+ Forum Addict oal331's Avatar
    Join Date
    Dec 2006
    Location
    Athens - Greece
    Posts
    379
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Need help for SIOC !

    Thank Per-Erik

    i also tested these entries and enter there the server's ip, then 2nd sioc was connected to 2st one, but i still had the problem.

    Finally i found the solution : there was a wrong entry in sioc.ini with all these radios, so i didn't have a correct IDX number for use it in my sioc code. So for the moment i managed to make some functions to work with 2nd sioc for ATC module and i will continue the programming and the research.

    Have a very nice week-end !!

    Eddie
    Eddie Armaos
    Athens-Greece


    [