Results 1 to 6 of 6
  1. #1
    25+ Posting Member
    Join Date
    May 2010
    Location
    Sydney
    Posts
    36
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Question ACP volume controls

    Hi Niko,
    Just wondering how you would handle the volume control knobs on the Audio Control Panels?
    Normally they would be analogue pots, but that would mean adding several a/d circuits per unit.....

    Do you have an example of how to simulate volume control (I guess you could use encoders, but then you would not get any feedback on startup levels.)

    Cheers,
    Asb

  2. #2
    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: ACP volume controls

    Hi,
    Quote Originally Posted by AlexB View Post
    ,
    Normally they would be analogue pots, but that would mean adding several a/d circuits per unit.....
    With potentiometers, indeed. Opencockpits has very cheap cards with A/D inputs, no problem.
    Cheers,
    Nico

  3. #3
    25+ Posting Member
    Join Date
    May 2010
    Location
    Sydney
    Posts
    36
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Cool Re: ACP volume controls

    Quote Originally Posted by kiek View Post
    Hi,

    With potentiometers, indeed. Opencockpits has very cheap cards with A/D inputs, no problem.
    Cheers,
    Nico
    Hi Nico,
    I have looked at the opencockpits cards and they are seen as a joystick by windows not sioc as far as I can tell.
    Does SIOC see them as analog inputs?

    Cheers,
    AlexB

  4. #4
    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: ACP volume controls

    Hi Alex,
    You should not use that analoque axis card but the (even cheaper, just 25 Euro) USB Servo motors card which has 4 A/D inputs.
    Add this line to sioc.ini:

    [USBSERVOS]
    USBSERVOS=0,??

    and use it in SIOC like this (example from my wxRadar module):

    Code:
    Var 9000 name POT_Tilt Link IOCARD_ANALOGIC Device 0 Input #1, PosL 1, PosC 128, PosR 255   
    {
      CALL &Pot270 &POT_Tilt
      &TiltCp = &Pot270Val
    }
    
    
    Var 3996 Static name TiltCp   // 0 .. 4713
    
    Var 9010 name Pot270Val
    
    Var 9001 name Pot270 Link SUBRUTINE  
    {
      L0 = &Pot270 - 1
      L0 = L0 * 18.486  // equals 4714 / 255
      &Pot270Val = ROUND L0
    }
    Each Usb Expansion card also has 4 A/D inputs, you can use these in SIOC like this (example from my Throttle):

    Code:
    Var 9030 name POT_Tla1 Link USB_ANALOGIC Device 0 Input #1, PosL 1, PosC 128, PosR 255   
    {
      CALL &OutTla1
    }
    
    var 9040 name OutTla1 link SUBRUTINE
    {
    // 50 (idle) .. 220  (Full)
      IF &ATActive = 0
      {
        L0 = &POT_Tla1
        L0 = 219 - L0
        IF L0 <= 0
        {
          IF &Tla1But = 1
          {
            &Tla1 = -8925   // Reverse
          }   
          ELSE
          {
            &Tla1 = 0   // Idle
          }
        }
        ELSE
        {
          L0 = L0 * 29.412     // equal 5000 / (220 - 50) = 5000 / 170
          &Tla1 = ROUND L0
        }
      }
    }
    
    Var 3700 Static name Tla1  // -8925 .. 5000
    
    var 3434 Static name ATActive  // 1 if Active
    {
      IF &ATActive = 0
      {
        CALL &OutTla1
      }
    }
    Do note that in the last example you do not have to add something extra to sioc.ini, use the ID of the USB expansion card.

    Cheers,
    Nico
    P.S. all my scripts can be found in the PSXCockpit folder in PSXseecon.
    Last edited by kiek; 01-22-2016 at 04:08 AM.

  5. #5
    25+ Posting Member
    Join Date
    May 2010
    Location
    Sydney
    Posts
    36
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: ACP volume controls

    Quote Originally Posted by kiek View Post
    Hi Alex,
    You should not use that analoque axis card but the (even cheaper, just 25 Euro) USB Servo motors card which has 4 A/D inputs.
    Add this line to sioc.ini:

    Cheers,
    Nico
    P.S. all my scripts can be found in the PSXCockpit folder in PSXseecon.
    Hi Nico,
    I have seen the axes available on the USB card.
    I have also read the info on the USB motor cards but 4 seems a bit of a small number for one I/O card.
    I wonder if O/C may be interested in producing a card with say 24 A/D circuits.... I may ask them.

    Cheers,
    AlexB

  6. #6
    25+ Posting Member
    Join Date
    May 2010
    Location
    Sydney
    Posts
    36
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: ACP volume controls

    Nico,
    I have contacted OC and they are looking at producing a dedicated analog to digital card with multiple circuits (ie more than 5, possibly 12)

    Will have to keep our eyes open for that one

    asb