Jump to content
Sign in to follow this  
tigert

SIOC and how it works

Recommended Posts

>I use DF737-400 , and for AP Altitude and AP VS I don't know>what is their offsets , I could not get this from DF>specialists , those offsets are different from the default MS>737.>>So ,still will be posible to use SIOC to display the Altitude>and VS without to know them ?If there are no FSUIPC offsets for AP altitude and AP VS in FSUIPC for the DF737, it will not be possible for SIOC to display them... Quite logical, don't you agree? ;-)SIOC cannot display values that are not present...Nicohttp://www.nicokaan.nl

Share this post


Link to post
Share on other sites
Guest Hans Krohn

... but you could write any value to an internal variable and update the display with that?Would be useful for very fast hardware display updates (fast turning of a selector knob, for example). After the turning of the knob has stopped, the updated value can be sent to FS.This way a feedback loop between hardware and FS can be avoided.I am new to SIOC, but I use the above procedure for my EPIC driven cockpit.Regards,Hans

Share this post


Link to post
Share on other sites

>... but you could write any value to an internal variable and>update the display with that?>>Would be useful for very fast hardware display updates (fast>turning of a selector knob, for example). After the turning of>the knob has stopped, the updated value can be sent to FS.>>This way a feedback loop between hardware and FS can be>avoided.>>I am new to SIOC, but I use the above procedure for my EPIC>driven cockpit.>>Regards,>Hans>>Hi Hans and SIOC experts ,This is posible in SIOC ?How to do that ?Thanks and regardsAlberto K

Share this post


Link to post
Share on other sites

>... but you could write any value to an internal variable and>update the display with that?>Sure, no problem. (Almost) anything is possible in SIOC.>This way a feedback loop between hardware and FS can be>avoided.Well, I don't think that will become a problem, because in SIOC.ini you can define the FSUIPC refresh time at 60ms, so not more then 16 updates a second will be done. Quite easy (not a real stress) for todays computers.On top of that you can always temporize more via the use of the built in DELAY function (of SIOC), or by using a TIMER Regards,Nicohttp://www.nicokaan.nl

Share this post


Link to post
Share on other sites

Hello,I am coming back to the HDG code from Nico (also used by Polmer). Still problems exist for me.My setup is rather normal: PC1 has FS9 and WideServer running, my Notebook has SIOC and WideClient running (plus all the other SW needed). I checked the both WideFS ini files, SIOC.ini has FSUIPC 60ms refresh.Code #1:If I use Nico's code it is jumpy, as Polmer said: changing the encoder +1 tick makes the Display jump 1 degree up, after ca.1/10th of a second back to the old value and after 0,5 seconds 1 degree up, where it should go. Example: 256 degree -> 260 -> 259 --------> 260It is difficult to make big changes e.g. 180 to 270 degree. Changing the acceleration from the encoder does not influence to much.Code #2Then I changed Nico's code from FSUIPC_INOUT into seperate Variables as FSUIPC_IN and FSUIPC_OUT. This was much better, even big changes in HDG where quite ok, also 1-tick changes. The moment the encoder ist turned, the display changes to the new HDG value and ca. 0,5 sec later in the FS panel (seems to be dependant of FSUIPC refresh rate).---------- Nico's code modified -----------// ******************************************************************// * Config_SIOC ver 3.3 - By Manolo V

Share this post


Link to post
Share on other sites

Hi,Let's continue this thread with Yet Another example.Regards,Nico//// Implementation of a 4 digits (one decimal, like 388.5) ADF1, // based on default FS9 ADF1 offsets in FSUIPC.//// Supports:// * two rotaries for frequency (each controlling two digits);// * four 7-segment displays for frequency; // * software controlled Decimal Point via an Output;// * full synchronisation with the aircraft panel, so changes made// in the panel by mouse or keyboard command will be taken care of.//// The implementation is a bit complicated due to the fact that the FSUIPC // interface provides two offsets, representing 3+1 digits, // while we want to modify the digits, with our Rotaries, two by two.//// Author: Nico Kaan, The Netherlands, 2007 ©// www.nicokaan.nl////*****************************************************************Var 1700, name X_ADF1High, Link FSUIPC_INOUT, Offset $034C, Length 2{ L0 = FROMBCD &X_ADF1High IF &ADF1High <> L0 { &ADF1High = L0 }}Var 1701, name X_ADF1Low, Link FSUIPC_INOUT, Offset $0356, Length 2 { IF &X_ADF1Low <> &ADF1Low { &ADF1Low = &X_ADF1Low }}Var 1710, name ADF1High{ L0 = &ADF1High L1 = DIV L0 10 IF &ADF1HighR <> L1 { &ADF1HighR = L1 CALL &OutADF1 } L1 = MOD L0 10 L1 = L1 * 10 L0 = &ADF1Low L1 = L1 + L0 IF &ADF1LowR <> L1 { &ADF1LowR = L1 CALL &OutADF1 } }Var 1711, name ADF1Low{ L0 = &ADF1High L0 = MOD L0 10 L0 = L0 * 10 L1 = &ADF1Low L0 = L0 + L1 IF &ADF1LowR <> L0 { &ADF1LowR = L0 CALL &OutADF1 }}Var 1712, name ADF1HighR{ L0 = &ADF1LowR L0 = DIV L0 10 L1 = &ADF1HighR L1 = L1 * 10 L1 = L1 + L0 &ADF1High = L1 CALL &OutADF1 }Var 1713, name ADF1LowR{ L0 = &ADF1LowR L1 = MOD L0 10 &ADF1Low = L1 L1 = DIV L0 10 L0 = &ADF1High L0 = DIV L0 10 L0 = L0 * 10 L1 = L0 + L1 &ADF1High = L1 CALL &OutADF1 } Var 1720, name OutADF1, Link SUBRUTINE { L0 = &ADF1High * 10 // high * 10 L0 = L0 + &ADF1Low // + dec &D_ADF1 = L0 // to display L1 = MOD L0,10 // decimal digit IF L1 <> &X_ADF1Low { &X_ADF1Low = L1 // decimal digit to fsuipc } L0 = DIV L0,10 L1 = TOBCD L0 IF L1 <> &X_ADF1High { &X_ADF1High = L1 // higher 3 digits in bcd to fsuipc } &O_ADF1DP = 1 }Var 1740, name RO_ADF1Low, Link IOCARD_ENCODER, Input 70, Aceleration 4, Type 2 { L0 = &RO_ADF1Low * 5 // steps of 5 &ADF1LowR = ROTATE 0, 99, L0 }Var 1741, name RO_ADF1High, Link IOCARD_ENCODER, Input 68 , Aceleration 4, Type 2 { L0 = &RO_ADF1High &ADF1HighR = ROTATE 20, 99, L0 }Var 1770, name D_ADF1, Link IOCARD_DISPLAY, Digit 16 Numbers 4Var 1780, name O_ADF1DP, Link IOCARD_OUT, Output 95 http://www.nicokaan.nl

Share this post


Link to post
Share on other sites
Guest flight884

Is there documentation anywhere on how to talk to SIOC via TCP (I assume its TCP)? Or perhaps how to define another "LINK" type? I'm looking to create a bridge between SIOC and Aerowinx PS1. I have the aerowinx data...I just need to know how to communicate with SIOC. Thanks so much!-flight884

Share this post


Link to post
Share on other sites

>Is there documentation anywhere on how to talk to SIOC via>TCP (I assume its TCP)? Or perhaps how to define another>"LINK" type? I'm looking to create a bridge between SIOC and>Aerowinx PS1. I have the aerowinx data...I just need to know>how to communicate with SIOC. Thanks so much!>>-flight884You have to talk the IOCP protocol to the SIOC IOCP server (part of sioc.exe). IOCP is a simple protocol on top of TCP/IP. I have made an SIOC client (IOCPClient) implementation in C++ using Winsock.There is no need to define extra Links. Just use internal variable numbers in the SIOC script (without links attached). In my program you can defined de varnumbers for which you want SIOC to report value changes to you (with IOCP). And of course it is possible to send value changes messages (with IOCP) to SIOC. Note I'm using two threads to prevent blocking.Well you are lucky. I've just put my IOCPClient program at my website www.nicokaan.nl page downloads, sources included, for free...It's also available at the Opencockpits website, where you may also find more info about the IOCP protocol definition.Regards,Nico Kaan

Share this post


Link to post
Share on other sites

>Vars in SIOC are by default unsigned. This is something to be>aware of when you want to calculate with a signed integer read>from FSUIPC.>Var 1, name SINT, Link FSUIPC_IN, Offset $037C, Length 2Extra information:If you want the integer to be treated as signed integer just add the Attribute Type 1:Var 1, name SINT, Link FSUIPC_IN, Offset $037C, Length 2, Type 1Nico

Share this post


Link to post
Share on other sites
Guest flight884

Nico! I know its been a while since you responded to me, but I just wanted to reply and say thanks for the help! I'm looking at your code now. Looks pretty simple enough... Will now work on a link between Aerowinx PS1 and SIOC!Will keep you informed...-flight884

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...