Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    25+ Posting Member
    Join Date
    Jan 2006
    Location
    Benevento
    Posts
    32
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Overhead Sync & IOCARD

    Hi at all, i would like to know in what way i can sync my hardware (for example one switch) with PMSYSTEM. I mean , for example , if i leave the battery switch hardware in ON position, when i restart PMSYSTEM the switch software stay in OFF position.
    I use IOCARD and SIOC Code

    Some suggestions ?

    Thanks.
    Giuseppe Reda

  2. #2
    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

    First as i remember from my first tests opencockpits can "see" the switch position only if it is on on position and let the power to pass.

    Second you have to check in pmsystems menu "IO card active" and not check the "hardware connected ignores switch position" from user menu

    regards


    Eddie

  3. #3
    300+ Forum Addict
    Join Date
    Jan 2007
    Posts
    496
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Quote Originally Posted by excalibur67 View Post
    i would like to know in what way i can sync my hardware (for example one switch) with PMSYSTEM. I mean , for example , if i leave the battery switch hardware in ON position, when i restart PMSYSTEM the switch software stay in OFF position.
    In my PFC hardware driver I save the last set positions of each of the switches in the INI file, and as soon as I am re-connected to pmSystems I set all the offsets correctly for the last known settings, thus gaining synchronisation.

    This works fine as long as no one messes with any of the switches whilst the driver isn't running! There's no way to "scan" the switches, the driver is only notified when one of them changes.

    I don't know how your hardware links to pmSystems, but possibly this could be the subject of an enhancement request -- i.e to get your driver to save the positions before shutdown and re-establish them when reloaded. If your hardware connects direct to pmSystems then it sounds like a good idea for a pmSystems enhancement which would no doubt help many folks.

    Meanwhile, all I can suggest is that you always land, park and shut things off into a known cold-and-dark setting, for every single switch, and ensure that the Initial settings in pmSystems are set accordingly.

    Regards

    Pete Dowson

  4. #4
    25+ Posting Member
    Join Date
    Jan 2006
    Location
    Benevento
    Posts
    32
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Thanks Pete and Oal331... To discover where is the problem in my Sioc Code (ver.3.4) , i coded only one switch (battery) in this way:

    Var 1150,name Batt1, Link FSUIPC_INOUT, Offset $5628, Length 1 // Batt

    Var 1154,name BattSW, Link IOCARD_SW, Input 16 // Batt Sw
    {
    IF &BattSW = 0
    {
    &Batt1 = SETBIT 0
    }
    IF &BattSW = 1
    {
    &Batt1 = CLEARBIT 0
    }
    }
    Now i don't know if you know SIOC but the code is clear. The only thing is that my switch is opposite, i mean , when my switch hardware is in OFF position must give the signal ON at PMSYSTEM. This code works perfectly but only the sync....
    Other suggestions ?

    Thanks.
    Giuseppe Reda

  5. #5
    300+ Forum Addict
    Join Date
    Jan 2007
    Posts
    496
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Quote Originally Posted by excalibur67 View Post
    Now i don't know if you know SIOC but the code is clear. The only thing is that my switch is opposite, i mean , when my switch hardware is in OFF position must give the signal ON at PMSYSTEM. This code works perfectly but only the sync....
    But is the SIOC driver, or whatever they provide, actively scanning the switches, or is it only getting a signal when one changes? Is that code of yours being entered continuously or only when the relevant switch changes?

    As I said, if the switches are not being actively polled, but only noticed when they change, then the answer would then have to be for either the SIOC driver (or whatever) or pmSystems to be made to save the last seen settings and reload them next time. This will then always work provided you don't change the switch positions in between.

    If the SIOC system is supposed to be actively polling and your code recursively entered to deal with it, then there is evidently something wrong with it (not your code, but whatever is calling it).

    Regards

    Pete

  6. #6
    25+ Posting Member
    Join Date
    Jan 2006
    Location
    Benevento
    Posts
    32
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Hi Peter, yes is the reply for the SIOC lead the polling. Also after different try, i saw that sometimes i have the sync and sometimes no and all this very randomly. But when i sync manually all my switches hardware with Pmsystem after goes all fine also if i close and i reopen Pmsystem and in the meantime i did one change in one switch hardware this is synced when pmsystem is running again. The bad situation comeback if i close and i reopen Flight Simulator like happen one sort of reset general. Bah !!!!.

    Thanks,
    Giuseppe Reda

  7. #7
    300+ Forum Addict
    Join Date
    Jan 2007
    Posts
    496
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Quote Originally Posted by excalibur67 View Post
    Hi Peter, yes is the reply for the SIOC lead the polling. Also after different try, i saw that sometimes i have the sync and sometimes no and all this very randomly. But when i sync manually all my switches hardware with Pmsystem after goes all fine also if i close and i reopen Pmsystem and in the meantime i did one change in one switch hardware this is synced when pmsystem is running again.
    Okay, so something is working right.

    The bad situation comeback if i close and i reopen Flight Simulator like happen one sort of reset general. Bah !!!!.
    Of course after an FS crash it is a good idea to close programs like pmSystems too, and restart them. Otherwise it may see the reload as simply the resetting of all of the FSUIPC switch offsets to zero, as they will be initially, and act accordingly. You need pmSystems to go through its normal initialisation phase when FS does the same. I know my drivers may not work correctly otherwise as they expect pmSystems to re-install its version number in the appropriate offset, as this is used to detect that it is running, and I'm not sure pmSystems does that again after its own initialisation.

    Regards

    Pete

  8. #8
    150+ Forum Groupie
    Join Date
    Jan 2007
    Location
    Italy
    Posts
    204
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    This was my long concerning about SIOC and OpneCockpits cards, the way it works is stated in the Doc, SIOC will monitor only if a Switch or Offset change it's state.

    I've the same problem and i found a workaround, as long Sioc only detect a switch in its On position, i suggest you to invert the switch, so when ON(1) it send a signal to SIOC, the problem are the 3 Pos switch, no way to detect it's central Pos, unless you Initialize it in Sioc code at startup.

    To solve your specific problem you have to Start the things in this order:

    Start FS (at gate or runway)
    Start PMsystems and let it fully load and initialize
    Start SIOC and you will see your hardware get Sync

    I can provide my SIOC example code to show you how to deal with 3 Pos switch and Initialization Routine.

    I asked many times to OpenCockpit to provide some sort of scanning hardware at regular interval so we can get Sync everytime. But nothing as changed

  9. #9
    25+ Posting Member
    Join Date
    Jan 2006
    Location
    Benevento
    Posts
    32
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Hi Dcutugno, finalmente un italiano, sto letteralmente impazzendo per questa sincronizzazione. Funziona tutto solo questo.. Se vuoi, mandami la parte relativa all'inizializzazione anche perch tutto il resto mi funziona perfettamente.
    In any case the problem is in SIOC because i did this try:

    In my server Pc:
    I started FS (at terminal)
    I started SIOC Software
    I putted the switch hardware for battery in On position
    I Sarted FSINTERROGATE scanning the 5628 Address and the situation is as follow:
    The software read 0, then SIOC at start don't send the value for the actual status of my switch hardware. But the thing strange is, if i move the switch in OFF position and after in ON the value goes at 1 and this it's ok,but after this, if i close FSINTERROGATE and SIOC software and i put the switch in ON position another time ,when i restart SIOC and after FSINTERROGATE doesn't give me the problem anymore. Like if the SIOC would in absolute one start per Flight Simulatior session. In fact if restart also the Flight Simulator and i repeat the try, the problem comeback...

    Thanks.
    Giuseppe Reda

  10. #10
    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

    Quote Originally Posted by dcutugno View Post
    I've the same problem and i found a workaround, as long Sioc only detect a switch in its On position, i suggest you to invert the switch, so when ON(1) it send a signal to SIOC, the problem are the 3 Pos switch, no way to detect it's central Pos, unless you Initialize it in Sioc code at startup.
    (
    That also i said in my post, that has to be on ON position to have a circiut and let electric power to infomr Opencockpit's s/w that this switch is ON, otherwise OFF.
    In 3 position switches, (On/Off/On) where is the problem? If it will be on ON no problem, right? Otherwise it will be on Off...


    I also need feedback from people using sioc, as i only made some tests before 6 months and now ending my overhead i will start to work on opencokpits s/w and for wiring the switches. Do i have something to take care about?

    Regards


    Eddie Armaos

Page 1 of 2 12 LastLast

Similar Threads

  1. OC IOCard, what's the secret ?
    By Wendy in forum I/O Interfacing and Hardware
    Replies: 52
    Last Post: 12-04-2010, 10:49 AM
  2. Prop Sync
    By gokhotit in forum General Aviation (GA) Builder Disccusion
    Replies: 2
    Last Post: 07-08-2010, 09:45 PM
  3. Bug in Opencockpit IOCARD
    By oliver_mpt in forum I/O Interfacing Hardware and Software
    Replies: 6
    Last Post: 12-19-2008, 01:46 PM
  4. USBout card and iocard.exe
    By mmakela in forum OpenCockpits General Discussion
    Replies: 2
    Last Post: 07-05-2008, 01:56 PM
  5. Cpt/Fo side ND aren't in sync on startup
    By sas550 in forum PM General Q & A
    Replies: 6
    Last Post: 06-17-2007, 11:56 AM