Results 1 to 7 of 7
  1. #1
    New Member
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Calling a FSUIPC MACRO from SIOC

    Hello,

    im new in SIOC and have a question.

    In the FSUIPC SDK exists a Macro File for the PMDG Overhead called "737 OHD.MCRO".
    Inside this File we have a lot of Macros defined for the Overhead, e.g.:

    [Macros]
    Module="PMDG_737NG_Overhead.gau"
    1=Batt=RX3170*X8b90
    2=CabUtil=RX3210*X8b90
    3=IFE/PassSt=RX3260*X8b90
    4=Gen1off=RX32b0*X8b90
    .
    .
    Ok, now i want to call a Macro, lets say the Batt Switch from SIOC.
    How can i do this ?

    Var 0001, name S_BAT1, Link IOCARD_SW, Device 0, Input 1, Type I // Batarie Schalter
    {
    if &S_BAT1 = 0
    {
    Macro aufrufen ( 1=Batt=RX3170*X8b90 )
    }
    }
    Please help
    Matthias

  2. #2
    75+ Posting Member
    Join Date
    Apr 2009
    Location
    Toronto
    Posts
    125
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Calling a FSUIPC MACRO from SIOC

    Matthias,

    FSUIPC provides some "Virtual joysticks" at offset $3340. TOGGLE one of those buttons in SIOC and, in FSUIPC, associate that button push with the macro.

    Jim

  3. #3
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Calling a FSUIPC MACRO from SIOC

    indeed, like this:

    Code:
    Var 1, name S_BAT1, Link IOCARD_SW, Device 0, Input 1, Type I // Batarie Schalter
    {
      if &S_BAT1 = 0
      {
        &FO_JoyStick64 = CHANGEBIT 0 v1 // toggle bit 0 of joystick 64 
      }
    }
    
    Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4
    // and then go to FSUIPC, select Buttons+Switches tab, press Batterie Schalter,
    // and select for Joystick 64, Button 0 the FS control, macro 737 OHD
    Last edited by kiek; 07-14-2010 at 01:04 PM.

  4. #4
    New Member
    Join Date
    Jan 2009
    Location
    Nieuw Vennep
    Posts
    2
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Calling a FSUIPC MACRO from SIOC

    Hi guys.
    This works perfectly. but how do i enter the code to use more than one joystick button?
    I tried a lot of options but i cannot seem to figure it out...
    Hope you guys can help me out here...

  5. #5
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Calling a FSUIPC MACRO from SIOC

    Well, for the next button (1) at Joystick 64, you code:
    Code:
    Var 1, name S_BAT1, Link IOCARD_SW, Device 0, Input 1, Type I // Batarie Schalter
    {
      if &S_BAT1 = 0
      {
        &FO_JoyStick64 = CHANGEBIT 1 v1 // toggle bit 1 of joystick 64 
      }
    }
    
    Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4
    and so on, 32 buttons for a Joystick.
    At offset $3344 length 4 you find the next joystick (65) with another 32 buttons

    Nico Kaan

  6. #6
    New Member
    Join Date
    Jan 2009
    Location
    Nieuw Vennep
    Posts
    2
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Calling a FSUIPC MACRO from SIOC

    Quote Originally Posted by kiek View Post
    Well, for the next button (1) at Joystick 64, you code:
    Code:
    Var 1, name S_BAT1, Link IOCARD_SW, Device 0, Input 1, Type I // Batarie Schalter
    {
      if &S_BAT1 = 0
      {
        &FO_JoyStick64 = CHANGEBIT 1 v1 // toggle bit 1 of joystick 64 
      }
    }
    
    Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4
    and so on, 32 buttons for a Joystick.
    At offset $3344 length 4 you find the next joystick (65) with another 32 buttons

    Nico Kaan
    Hi Nico,

    Thanks for the reply. i just cannot get it to work.
    i have one button working with the code that i took off your website.
    Now i made the code that works bold. i tried several solutions including the one below.. i know its wrong.. but could you help me out with the code for 2 buttons... i had it in the past but i cant seem to remember it anymore.

    Could you let me know how i can code 2 buttons... maybe you can make an example so that i can add a few more myself?
    thanks!

    Var 1 Link IOCARD_SW Input 16 Type I
    {
    &FO_JoyStick64 = CHANGEBIT 0 v1 // toggle bit 0 of joystick 64
    }

    Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4


    Var 3, name S_BAT1, Link IOCARD_SW, Device 0, Input 22, Type I // Batarie Schalter
    {
    &FO_JoyStick64 = CHANGEBIT 1 v1 // toggle bit 1 of joystick 64
    }

  7. #7
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Calling a FSUIPC MACRO from SIOC

    Hi,
    You made a mistake in var 3, you have to use v3 there, not v1 ...
    Code:
    Var 1 Link IOCARD_SW Input 16 Type I
    {
      &FO_JoyStick64 = CHANGEBIT 0 v1 // toggle bit 0 of joystick 64
    }
    
    Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4
    
    Var 3, name S_BAT1, Link IOCARD_SW, Device 0, Input 22, Type I // Batarie Schalter
    {
      &FO_JoyStick64 = CHANGEBIT 1 v3 // toggle bit 1 of joystick 64
    }
    Last edited by kiek; 07-14-2010 at 05:45 PM.

Similar Threads

  1. FSUIPC Mouse Macro problem w/ BU0836X
    By hladamjr in forum I/O Interfacing and Hardware
    Replies: 4
    Last Post: 12-31-2009, 10:33 AM
  2. Macro mapping in FSUIPC....I need help??
    By Spoceto1003 in forum General Builder Questions All Aircraft Types
    Replies: 0
    Last Post: 12-05-2009, 01:21 PM
  3. SIOC and FSUIPC
    By Bell209 in forum I/O Interfacing Hardware and Software
    Replies: 6
    Last Post: 03-04-2009, 10:50 PM
  4. FSUIPC 3.81 Mouse Macro Controls for Level-D 767
    By kiek in forum I/O Interfacing Hardware and Software
    Replies: 7
    Last Post: 07-23-2008, 12:33 PM
  5. FSUIPC/MACRO/Keysend with sioc
    By Georg Schneider in forum OpenCockpits General Discussion
    Replies: 12
    Last Post: 05-05-2008, 01:18 PM