View Full Version : SIOC Problems
Boeing 747 Flyer
06-23-2010, 01:16 PM
Hello everyone,
After consulting The O/C SIOC Examples Forum, the SIOC manual and one of the SIOC presentations I'm still stuck with a basic SIOC script.
I'm trying to program Input 12 (SPST Switch) of the Opencockpits Transponder to the offset $70BC, the A/P MASTER switch. I created the following SIOC Code:
Var 9000 Link IOCARD_SW Input 12 Type P
var9001=V9000
Var 9001 Link FSUIPC_OUT Offset $07BC Length 4
And it will not even compile, I know the problem lies within line 2 of the code.
Basically, I just want to know how to program Input 12 to Offset &07BC. Please don't tell me off, I have looked and read manuals I just still don't understand.
Thanks alot,
Jack;)
deering
06-23-2010, 02:15 PM
Jack,
paste one of the SIOC examples you've looked at into a post here. Then we'll have a look at how yours differs from one that works.
Jim.
Jack,
The curly brackets are required, this is the part is executed.
Var 9000 Link IOCARD_SW Input 12 Type P
{
v9001 = V9000
}
Var 9001 Link FSUIPC_OUT Offset $07BC Length 4
Hope this helps, im no expert but it compiles alright for me.
Les
Boeing 747 Flyer
06-23-2010, 02:48 PM
Okay tried the curly brackets. It compiles fine, but nothing happens when I hit the ident button.
A picture of my SIOC screen at the time:
http://i822.photobucket.com/albums/zz146/Stratuspheric/SIOCscreen.jpg
The code as it stands:
Var 9000 Link IOCARD_SW Input 12 Type P
{
v9001 = V9000
}
Var 9001 Link FSUIPC_OUT Offset $07BC Length 4
Jack,
If you take a look at the SIOC screen you will see FSUIPC Status: Disabled.
I guess you have not enabled FSUIPC in your sioc.ini ...
Nico
Boeing 747 Flyer
06-23-2010, 02:58 PM
Jack,
If you take a look at the SIOC screen you will see FSUIPC Status: Disabled.
I guess you have not enabled FSUIPC in your sioc.ini ...
Nico
Hi Nico,
That is 100% correct. Just a question - Is, by default, FSUIPC disabled in SIOC?
Is, by default, FSUIPC disabled in SIOC?
Why do you care about that? If your SIOC script uses FSUIPC offsets YOU should Enable FSUIPC in sioc.ini. If your script does not use FSUIPC Offsets YOU should Disable FSUIPC in sioc.ini.
I don't know what is specified in the sioc.ini that comes with a fresh install of sioc, but again, who cares, YOU always have to configure SIOC, not only w.r.t. FSUIPC but also about how many Master Cards you have, and so on...
Nico
P.S. Don't forget to define the FSUIPC refresh rate as well
Boeing 747 Flyer
06-23-2010, 03:10 PM
Okay, the problem persists.
I am running the script, and FSX with FSUIPC installed is sucessfully recognised by SIOC. However, I push the IDENT button, and nothing happens in-sim to the A/P MASTER.
Any ideas?
Again, this is the current file (TESTs.ssi):
Var 9000 Link IOCARD_SW Input 12 Type P
{
v9001 = V9000
}
Var 9001 Link FSUIPC_OUT Offset $07BC Length 4
And a picture of the SIOC interface:
http://i822.photobucket.com/albums/zz146/Stratuspheric/PictureSIOC.jpg
"Why do you care about that?"
I am just curious to see if I had accidently disabled it somehow, or if it is disabled by default.
What aircraft are you running in Flight Simulator? Not all aircraft support the FSUIPC offset $07BC ... The Level-D 767 for instance does not. You have to use the Level-D SDK for that.
Boeing 747 Flyer
06-23-2010, 03:32 PM
Hi Nico,
It is a default Beechcraft Baron.
Just to test a SIOC script I recommend you try the Lights offset. Most aircraft support that. http://www.lekseecon.nl/howto.html#example1
Boeing 747 Flyer
06-23-2010, 04:15 PM
Hi Nico,
Still no luck. In fact, I used the Type I ON/OFF Switch (Input 7) on the Transponder to keep things simple, so that I wouldn't have to alter the script at all.
Still nothing happens. I even switched aircraft to the Default Cessna and still the Landing Lights Switch is dead. The TESTs.ssi script that I'm using compiles fine and runs okay, the SIOC interface detects FSX and FSUIPC, everything looks okay...
This is a very strange problem is it not?:eek:
EDIT: The SIOC.ini file looks suspicious... Take a look:
[SIOC]
IOCP_port=8092
IOCP_timeout=4000
Minimized=Yes
toggle_delay=20
CONFIG_FILE=TESTs.ssi
[IOCARDS MODULE]
IOCard_disable=No
IOCard_LPT=No
[MASTERS]
[USBKEYS]
USBKeys=0,67
[FSUIPC MODULE]
FSUipcdisable=No
[IOCP CLIENTS MODULES]
IOCPini_delay=3000
IOCPclient0_disable=Yes
IOCPclient0_host=localhost
IOCPclient0_port=8090
IOCPclient1_disable=Yes
IOCPclient1_host=localhost
IOCPclient1_port=8099
[SOUND MODULE]
Sound_disable=Yes
Volume=100
If you notice, all the Modules are Disabled=Yes... That is wh yI asked earlier, as I have not personally disabled any of these myself, I wonder if SIOC does it by default or something?
Again, SIOC does nothing by default or something. It is YOU who has to set the definitions in sioc.ini right.
Your sioc.ini is not right.
At first sight:
* You miss the FSUIPC refresh statement
* the USBKEYS section should not be present now because you are not using the USBKeys module
* instead you should add the ATC module in the MASTERS section
I have no time now to help you further. Please study the documentation and do not hop from one topic to another.
regards,
Nico
Boeing 747 Flyer
06-23-2010, 04:49 PM
I have studied the documentation many times, and I still do not understand it. I learn through participation and exercises. I have invested many, many, many hours trying to learn SIOC and it is not easy for me.
I will have a go at adding "ATC" under the Masters section, I still don't understand what to add exactly (ATC, MODULE_ATC) but I guess I'll just have to trial and error it out.
" do not hop from one topic to another"
I did not want to hop from one to another, but you said to end the previous discussion so I thought I'd start a new one in its place.
"You miss the FSUIPC refresh statement"
Again, I would love to know what this is. The SIOC documentation is confusing is some aspects. From which manual or guide did you get this information? One of the SIOC tutorials cannot be downloaded from the O/C website, as it is a dead link.
Jack,
Your sioc.ini should be this:
[SIOC]
IOCP_port=8092
IOCP_timeout=4000
Minimized=Yes
toggle_delay=20
CONFIG_FILE=TESTs.ssi
[IOCARDS MODULE]
IOCard_disable=No
IOCard_LPT=No
[MASTERS]
MASTER=0,11,1,67
[FSUIPC MODULE]
FSUipcdisable=No
FSUipcRefresh=50
[IOCP CLIENTS MODULES]
IOCPini_delay=3000
IOCPclient0_disable=Yes
IOCPclient0_host=localhost
IOCPclient0_port=8090
IOCPclient1_disable=Yes
IOCPclient1_host=localhost
IOCPclient1_port=8099
[SOUND MODULE]
Sound_disable=Yes
Volume=100
Note:
MASTER 0,11,1,67 means:
Logical Device 0 is an ATC module (code 11), it has 1 Master Card (not relevant for a ATC module) and in your system its IDX is 67.
FSUipcRefresh=50 means that every 50 msec SIOC will read/write to FSUIPC offsets (so 20 times per second)
The USBKEYS section is not needed because you are not using a USBKey card in this test.
Try again...
Nico
Boeing 747 Flyer
06-24-2010, 02:45 PM
Thanks Nico!
All is working perfectly now, I managed to get the IDENT working with the A/P MASTER Switch, and then I made a further SIOC entry to control the HDG button with the XPNDR select.
Good to hear Jack! Eventually you will become a SIOC Master :-)
Boeing 747 Flyer
06-24-2010, 04:05 PM
Good to hear Jack! Eventually you will become a SIOC Master :-)
Thanks very much Nico! I can only hope that I do!:p
Also, how are LEDs controlled by FSUIPC Offsets? I assume that they are controlled by something like, for example:
- If AP MASTER is ON, then LED23=1... etc
I must learn how to write that. I looked on your site and found the LED section, but couldn't find the reference to the FSUIPC within it.
Here an example from my site, a led connected to the FSUIPC offset for the state of the parking brake:
http://www.lekseecon.nl/howto.html#readFSUIPC
Hessel Oosten
06-24-2010, 05:30 PM
Also, how are LEDs controlled by FSUIPC Offsets? I assume that they are controlled by something like, for example:
- If AP MASTER is ON, then LED23=1... etc
Jack,
Really, really, surprised that you ask this.
We are obliged not to take time from others here, if it's not nesessary i.m.h.o.
It's ***ALL*** in the Opencockpits documentation !
AND
It's all on ***Nico's "HOW TO"*** page !
http://www.lekseecon.nl/howto.html#readFSUIPC
Hessel
Boeing 747 Flyer
06-25-2010, 09:24 AM
Hi Hessel,
As previously mentioned I personally do not understand the whole nature of the Opencockpits Manuals, and thus could not deduce what to write.
As I also wrote in the other page, Nico's site is a BIG help to me but I still need a bit of extra assistance to get things working - That's just how I am I'm afraid, and I can't help that until I get tha hang of SIOC.
I also said that I have read through most of the Opencockpits documentation that I could find, including two presentations.
I would not post here if I knew how to do it beforehand.
Thanks,
Jack =)
Hessel Oosten
06-25-2010, 10:15 AM
Jack,
As mentioned before, on the HOW TO page it is written to the last digit ...:-)
http://www.lekseecon.nl/howto.html#readFSUIPC
Var 1 Link FSUIPC_IN Offset $0BC8 Length 2 // parking brake state
{
IF v1 = 0
{
v2 = 0
}
ELSE
{
v2 = 1
}
}
Var 2 Link IOCARD_OUT Output 91 // led indicating parking brake set
This is *exactly* you were asking, isn't it ?
H.
Boeing 747 Flyer
06-26-2010, 04:04 PM
Oh dear... Another problem.
What is wrong with the following script:
Var 9000 Link IOCARD_SW Input 12 Type P
{
v9001 = V9000
}
Var 9001 Link FSUIPC_OUT Offset $07BC Length 4
Var 1 Link FSUIPC_IN Offset $07BC, Length 4 // AP MASTER STATE
{
IF v1 = 0
{
v2 = 0
}
ELSE
{
v2 = 1
}
}
Var 2 Link IOCARD_OUT Output 23 // AP MASTER LED
And SIOC.ini:
[SIOC]
IOCP_port=8092
IOCP_timeout=4000
Minimized=Yes
toggle_delay=20
CONFIG_FILE=LEDtest.ssi
[IOCARDS MODULE]
IOCard_disable=No
IOCard_LPT=No
[MASTERS]
MASTER=0,11,1,69
[FSUIPC MODULE]
FSUipcdisable=No
FSUipcRefresh=50
[IOCP CLIENTS MODULES]
IOCPini_delay=3000
IOCPclient0_disable=Yes
IOCPclient0_host=localhost
IOCPclient0_port=8090
IOCPclient1_disable=Yes
IOCPclient1_host=localhost
IOCPclient1_port=8099
[SOUND MODULE]
Sound_disable=Yes
Volume=100
And SIOC Interface screen:
http://i822.photobucket.com/albums/zz146/Stratuspheric/yut.jpg
The SIOC file I'm running is obviously LEDtest.ssi
After consulting the SIOC manual I'm still lost, I must've missed something.
Thanks alot, forgive my (potential) ignorance,
Jack
deering
06-26-2010, 06:08 PM
Jack,
you've got two definitions for the same FSUIPC offset $7BC: one a FSUIPC_IN link and the other a FSUIPC_OUT link. Change one to FSUIPC_INOUT and delete the other.
FSUIPC_INOUT is not well documented by OC but it is in SIOC tutorial 1
Jim
Jack,
Are you sure that at output 23 there is a led?
Nico
P.S. we should re-phrase the topic of this thread: it is not about problems in or with SIOC but about learning SIOC :-)
you've got two definitions for the same FSUIPC offset $7BC: one a FSUIPC_IN link and the other a FSUIPC_OUT link. Change one to FSUIPC_INOUT and delete the other.
Athough Jim is right I do not think that this is the problem. It is perfectly allright to have as well an FSUIPC_IN as a FSUIPC_OUT variable to the same offset in one script.
deering
06-26-2010, 08:10 PM
Right again, Nico.
Thx
Boeing 747 Flyer
06-27-2010, 05:50 AM
Hi Nico,
Yes there is an Output on LED 23.
I think the problem moreover is that the AP MASTER Switch does not come on at all in-sim.
Volante
06-27-2010, 12:16 PM
Hi all!
May I jump in with another SIOC question:
When starting Controlador.exe, an error message about IO.DLL pops up. It says 'Unable to start the IO.SYS service. Error code = 1275'.
Clicking OK to accept the info, closes the error message and opens Controlador application which works just fine, as does SIOC.EXE!
Anyone understanding the implication of this error?
Volante
Boeing 747 Flyer
06-28-2010, 12:28 PM
Hello everyone,
Just wondering has anyone managed to figure out wh ythat SIOC script doesn't work, the push button isn't even detected by the AP Switch.
I think the problem moreover is that the AP MASTER Switch does not come on at all in-sim.
Check first whether your aircraft supports the FSUIPC offset for AP MASTER switch... It seems it does not...
Boeing 747 Flyer
06-28-2010, 01:12 PM
Check first whether your aircraft supports the FSUIPC offset for AP MASTER switch... It seems it does not...
Hi Nico,
It is the same Aircraft I used for the previous SIOC test (default Beech Baron).
Last time I used it, it easily supported the Push-Button AP Switch.
I've checked that the device number (69) is correctly defined in the SIOC.ini, the SIOC script seems okay... I'm a bit lost here!
ok, try this:
Var 9000 Link IOCARD_SW Input 12 Type P
{
v9001 = V9000
}
Var 9001 Link FSUIPC_OUT Offset $07BC Length 4
{
IF v9001 = 0
{
v2 = 0
}
ELSE
{
v2 = 1
}
}
Var 2 Link IOCARD_OUT Output 23 // AP MASTER LED
Boeing 747 Flyer
06-28-2010, 03:14 PM
Hi Nico,
That script works fantastic thank you. I think I'll close this thread until the Servo is ready (contruction is complete, the the USBServos Card has arrived), just waiting until everything is ready.
The only problem with the SIOC script you supplied is that if I "click off" the AP in FS, nothing happens to the LED in real life. Regardless, it still works fine if I manually press the IDENT Button.
The only problem with the SIOC script you supplied is that if I "click off" the AP in FS, nothing happens to the LED in real life.
That is a matter of design... If you want that as well, you should change FSUIPC_OUT into FSUIPC_INOUT
Boeing 747 Flyer
06-28-2010, 03:25 PM
Okay, sounds a bit simple though. Are you sure JUST changing that will work?
Yes, SIOC is powerful and simple ... If it does not work it is because of your aircraft addon not giving back the state to that FSUIPC offset.
I will close this thread too.
This summer I will not be very active in these forums, see you in September ;-)