Welcome to Cockpitbuilders.com. Please login or sign up.

May 01, 2024, 04:11:37 PM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
476 Guests, 0 Users
Members
  • Total Members: 4,154
  • Latest: xyligo
Stats
  • Total Posts: 59,641
  • Total Topics: 7,853
  • Online today: 506
  • Online ever: 582
  • (January 22, 2020, 08:44:01 AM)
Users Online
Users: 0
Guests: 476
Total: 476

COUNTDOWN TO WF2022


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Welcome

SIOC and Opencockpits help

Started by Emanuelejazz, March 05, 2013, 03:48:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Emanuelejazz

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.





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

Thank a lot
Bye

Emanuele
Home cockpit in progess - PC1: Intel Q6600 3.4 Ghz, ATI X1950XT, Samsung LCD 20'', NEC LCD 15'' PC2: Pentium 4 3.4Ghz, ATI X550, 2 NEC LCD 15'' - Saitek X52 Pro and Rudder Pedals

XOrionFE

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

Emanuelejazz

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
Home cockpit in progess - PC1: Intel Q6600 3.4 Ghz, ATI X1950XT, Samsung LCD 20'', NEC LCD 15'' PC2: Pentium 4 3.4Ghz, ATI X550, 2 NEC LCD 15'' - Saitek X52 Pro and Rudder Pedals

XOrionFE

From the log window on your screenshots it didn't look like you were loading the file

Emanuelejazz

#4
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
Home cockpit in progess - PC1: Intel Q6600 3.4 Ghz, ATI X1950XT, Samsung LCD 20'', NEC LCD 15'' PC2: Pentium 4 3.4Ghz, ATI X550, 2 NEC LCD 15'' - Saitek X52 Pro and Rudder Pedals

XOrionFE

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?

Emanuelejazz

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 !!!  :-\
Home cockpit in progess - PC1: Intel Q6600 3.4 Ghz, ATI X1950XT, Samsung LCD 20'', NEC LCD 15'' PC2: Pentium 4 3.4Ghz, ATI X550, 2 NEC LCD 15'' - Saitek X52 Pro and Rudder Pedals

fordgt40

Have you changed your sioc.ini file to reference the mastercard and its device number - in your case 16?

Emanuelejazz

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....
Home cockpit in progess - PC1: Intel Q6600 3.4 Ghz, ATI X1950XT, Samsung LCD 20'', NEC LCD 15'' PC2: Pentium 4 3.4Ghz, ATI X550, 2 NEC LCD 15'' - Saitek X52 Pro and Rudder Pedals

fordgt40

I hope you have not kept the square brackets :)

The definition should be

MASTER=0,4,1,16

makoy

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
      }
   }
}
FS9 / Posky 777 / OC cards and sioc / FreeFD / VasFMC / ProMFD / FSuipc & WideFS / 3 PCs / 3 projector / all homemade. https://www.facebook.com/MakoysB777er

dc8flightdeck

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
      }
   }
}

Emanuelejazz

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:
Home cockpit in progess - PC1: Intel Q6600 3.4 Ghz, ATI X1950XT, Samsung LCD 20'', NEC LCD 15'' PC2: Pentium 4 3.4Ghz, ATI X550, 2 NEC LCD 15'' - Saitek X52 Pro and Rudder Pedals

fordgt40

Great, glad to help - that is what this forum is for :)

makoy

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.
FS9 / Posky 777 / OC cards and sioc / FreeFD / VasFMC / ProMFD / FSuipc & WideFS / 3 PCs / 3 projector / all homemade. https://www.facebook.com/MakoysB777er

Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate