Cockpitbuilders.com

Main => Builders Discussions => Topic started by: Emanuelejazz on March 05, 2013, 03:48:03 AM

Title: SIOC and Opencockpits help
Post by: Emanuelejazz on March 05, 2013, 03:48:03 AM
Hello everyone, I'm new to SIOC and Opencockpits card and I need some help.
I've assembled the USB Expansion, Master Card and Display Card; all seems to work just fine from the SIOC monitor and I can manually switch on a led or display a number on a 7-segment etc, so the cards should be fine.
Now is time to start programmimg the script for my MCP, but first I wanted to do some test to understand how things works.
So I connected a switch to inpunt 001 and I wanted to switch on landing light with it.
I used this script:

Var 1 Link IOCARD_SW Input 1 Type I
{
   v2 = CHANGEBIT 2 v1
}

Var 2 Link FSUIPC_OUT Offset $0D0C Length 2

but it dowsn't work...nothing happens in the simulator... here some screenhots of my setup with the switch off and on.

(https://www.cockpitbuilders.com/proxy.php?request=http%3A%2F%2Fwww.emanuelegoggio.com%2Fvarie%2F1.JPG&hash=8c72c2989a9f462a7d5ea718651977103c6ff549)

(https://www.cockpitbuilders.com/proxy.php?request=http%3A%2F%2Fwww.emanuelegoggio.com%2Fvarie%2F2.JPG&hash=3386875d8f97f63737d5d5a39745b60624755d08)

Can anyone help me to understand what I'm doing wrong ?

Thank a lot
Bye

Emanuele
Title: Re: SIOC and Opencockpits help
Post by: XOrionFE on March 05, 2013, 04:00:55 AM
hello Emanuel,

It doesn't look like you have loaded your script.  You should compile the .txt file into a .ssi file.  Then in your SIOC.ini file you need to tell it you want to load that particular script.   Also, make sure you have defined your card properly in SIOC.ini.

Scott
Title: Re: SIOC and Opencockpits help
Post by: Emanuelejazz on March 05, 2013, 04:10:02 AM
Hi, I've compiled it I think. I 've imported the txt file and the green OK appeared; then i saved the.ssi and set up it to load as default in the .ini config file.
Now I also tryed to set Device as 16 that is my USB Expansion Card but nothing changed....
How can be possible ???

Thank again
Title: Re: SIOC and Opencockpits help
Post by: XOrionFE on March 05, 2013, 04:16:35 AM
From the log window on your screenshots it didn't look like you were loading the file
Title: Re: SIOC and Opencockpits help
Post by: Emanuelejazz on March 05, 2013, 04:28:42 AM
This is the complete log screen....the file name is test.ssi so it seems I have loaded it but I may be wrong....

http://www.emanuelegoggio.com/varie/3.JPG (http://www.emanuelegoggio.com/varie/3.JPG)
Title: Re: SIOC and Opencockpits help
Post by: XOrionFE on March 05, 2013, 04:33:34 AM
Oh, I see.  That looks good.  But I do see your problem now.  SIOC doesn't see FSUIPC or WideFS running...

Do you have FSUIPC installed and registered on you Flightsim installation?   Is this card on same computer as fs?
Title: Re: SIOC and Opencockpits help
Post by: Emanuelejazz on March 05, 2013, 04:39:30 AM
No that was my fault, I did the screenshot only to show the SIOC log without starting the sim. In the previous ones FS2004 was running with FSUIPC last version installed; no I run all on one PC for the moment....
I really can't figure out what's happening !!!  :-\
Title: Re: SIOC and Opencockpits help
Post by: fordgt40 on March 05, 2013, 10:49:23 AM
Have you changed your sioc.ini file to reference the mastercard and its device number - in your case 16?
Title: Re: SIOC and Opencockpits help
Post by: Emanuelejazz on March 05, 2013, 11:13:08 AM
Hi, first thanks for helping me !!!
I've just done it in this way:

[------------- CARDS CONFIG -------------]

[ IOCard Master ]
[ MASTER=0,4,1,16 ]


having only one USB expantion and one MasterCard connected, but it doesn't effect anything.

I've also noticed that when I turn on the switch, in the IOCP concsole, Var1 which is related to the switch doesn't change its value....that is the problem I think but... why ?? If in the SIOC monitor the switch works .... I can't really understand....
Title: Re: SIOC and Opencockpits help
Post by: fordgt40 on March 05, 2013, 01:14:46 PM
I hope you have not kept the square brackets :)

The definition should be

MASTER=0,4,1,16
Title: Re: SIOC and Opencockpits help
Post by: makoy on March 05, 2013, 01:21:12 PM
Try SETBIT / CLEARBIT, this is how i have write script. This is to default planes, some addons have own offsets and bits.

Var 0001, name Lights, Link FSUIPC_INOUT, Offset $0D0C, Length 2 // LIGHTS

Var 0002, name LightSw, Link IOCARD_SW, Device 0, Input 97, Type I // SW_LANDING_LIGHT
{
   IF &LightSw = 1
   {
       &Lights = SETBIT 2
   }
   ELSE
   {
      IF &LightSw = 0
      {
          &Lights = CLEARBIT 2
      }
   }
}
Title: Re: SIOC and Opencockpits help
Post by: dc8flightdeck on March 05, 2013, 08:17:13 PM
Im glad I noticed this thread, thats the first Ive the SETBIT/CLEARBIT. How about using this offset with the outputs card? I want to use the "good NAV1" offset to control the status light on the 737-200 AP indicator. Would this cause the offset to turn on and off the "good NAV1" on output 97? My switches are not connected through an opencockpits card so I dont need that action in SIOC.

Var 0001, name radio, Link FSUIPC_INOUT, Offset $3300, Length 2 // Additional radio and autopilot status indicatorsLIGHTS

Var 0002, name NAV1, Link IOCARD_OUT, Device 0, Output 97, //  good NAV1
{
   IF &radio = SETBIT 1
   {
       &NAV1 = 1
   }
   ELSE
   {
      IF &radio = CLEARBIT 1
      {
          &NAV1 = 0      }
   }
}


Justin

Quote from: makoy on March 05, 2013, 01:21:12 PM
Try SETBIT / CLEARBIT, this is how i have write script. This is to default planes, some addons have own offsets and bits.

Var 0001, name Lights, Link FSUIPC_INOUT, Offset $0D0C, Length 2 // LIGHTS

Var 0002, name LightSw, Link IOCARD_SW, Device 0, Input 97, Type I // SW_LANDING_LIGHT
{
   IF &LightSw = 1
   {
       &Lights = SETBIT 2
   }
   ELSE
   {
      IF &LightSw = 0
      {
          &Lights = CLEARBIT 2
      }
   }
}
Title: Re: SIOC and Opencockpits help
Post by: Emanuelejazz on March 05, 2013, 11:46:39 PM
Quote from: fordgt40 on March 05, 2013, 01:14:46 PM
I hope you have not kept the square brackets :)

The definition should be

MASTER=0,4,1,16

;D Ooooops hahah That was a stupid error .... I taken off the brackets and wow...it works now !!! That was the problem !!!
I don't know how to thank you !!!  :idiot:
Title: Re: SIOC and Opencockpits help
Post by: fordgt40 on March 06, 2013, 12:49:02 AM
Great, glad to help - that is what this forum is for :)
Title: Re: SIOC and Opencockpits help
Post by: makoy on March 06, 2013, 02:53:50 AM
Quote from: dc8flightdeck on March 05, 2013, 08:17:13 PM
Im glad I noticed this thread, thats the first Ive the SETBIT/CLEARBIT. How about using this offset with the outputs card? I want to use the "good NAV1" offset to control the status light on the 737-200 AP indicator. Would this cause the offset to turn on and off the "good NAV1" on output 97? My switches are not connected through an opencockpits card so I dont need that action in SIOC.

Var 0001, name radio, Link FSUIPC_INOUT, Offset $3300, Length 2 // Additional radio and autopilot status indicatorsLIGHTS

Var 0002, name NAV1, Link IOCARD_OUT, Device 0, Output 97, //  good NAV1
{
   IF &radio = SETBIT 1
   {
       &NAV1 = 1
   }
   ELSE
   {
      IF &radio = CLEARBIT 1
      {
          &NAV1 = 0      }
   }
}


Justin


Hi Justin, i havent play with pedestall and radios yet, but it should work like that.