Results 1 to 10 of 11
Thread: Overhead Sync & IOCARD
-
03-09-2007, 07:32 PM #1
- Join Date
- Jan 2006
- Location
- Benevento
- Posts
- 32
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
-
03-10-2007, 04:04 AM #2
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
-
03-10-2007, 07:53 AM #3
- Join Date
- Jan 2007
- Posts
- 496
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
-
03-10-2007, 08:45 AM #4
- Join Date
- Jan 2006
- Location
- Benevento
- Posts
- 32
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
-
03-10-2007, 10:05 AM #5
- Join Date
- Jan 2007
- Posts
- 496
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
-
03-10-2007, 10:50 AM #6
- Join Date
- Jan 2006
- Location
- Benevento
- Posts
- 32
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
-
03-10-2007, 12:00 PM #7
- Join Date
- Jan 2007
- Posts
- 496
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 !!!!.
Regards
Pete
-
03-10-2007, 12:02 PM #8
- Join Date
- Jan 2007
- Location
- Italy
- Posts
- 204
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
-
03-10-2007, 02:53 PM #9
- Join Date
- Jan 2006
- Location
- Benevento
- Posts
- 32
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
-
03-10-2007, 06:50 PM #10
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
Similar Threads
-
OC IOCard, what's the secret ?
By Wendy in forum I/O Interfacing and HardwareReplies: 52Last Post: 12-04-2010, 10:49 AM -
Prop Sync
By gokhotit in forum General Aviation (GA) Builder DisccusionReplies: 2Last Post: 07-08-2010, 09:45 PM -
Bug in Opencockpit IOCARD
By oliver_mpt in forum I/O Interfacing Hardware and SoftwareReplies: 6Last Post: 12-19-2008, 01:46 PM -
USBout card and iocard.exe
By mmakela in forum OpenCockpits General DiscussionReplies: 2Last Post: 07-05-2008, 01:56 PM -
Cpt/Fo side ND aren't in sync on startup
By sas550 in forum PM General Q & AReplies: 6Last Post: 06-17-2007, 11:56 AM
It was great listening to this, remembering what a wonderful person and great influence Ian was to...
MyCockpit Podcast "Tips And...