Results 1 to 3 of 3
  1. #1
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    771
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Potentiometer connected to USBExpansion Card

    Hi everyone,

    Since it has been such a long time since I last connected a Potentiometer and used it in SIOC, I am slightly confused on the process of using a Pot connected to the USBExpansion Card.

    In the past, all my Potentiometers were connected to my USBDCMotors Card. This Pot, however, is connected to the USBExpansion Card (Input #4).

    This is my SIOC.ini file:

    Code:
    [SIOC]
    IOCP_port=8092
    IOCP_timeout=4000
    Minimized=Yes
    toggle_delay=20
    CONFIG_FILE=Cockpit_Full.ssi
    [IOCARDS MODULE]
    IOCard_disable=No
    IOCard_LPT=No
    
    [USBKEYS]
    USBKeys=0,96
    
    [USBDCMOTORS]
    USBDCmotor=0,38
    
    [USBDCMOTORSPOTS]
    USBAnalogic=0,38
    
    [MASTERS]
    MASTER=3,11,1,70
    MASTER=2,5,1,50
    MASTER=0,4,4,12
    
    [A/D USED MASTER]
    USB_AD=4
    
    [MULTIPLE]
    MUSB=Yes
    
    [USBSERVOS]
    USBSERVOS=0,4
    deviceUSB=2132
    
    [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=NO
    Volume=100
    I need to know which entry I need to add to use the Potentiometers off've the USBExpansion Card. Unfortunately, the manual only tells you how to configure Pots for the Controlador.exe program, which is obviously useless if you want to use it in SIOC.

    The USBExpansion Card is Index 0, Device 18. The Pot is #4. Any suggestions?

    Cheers,

    Jack

  2. #2
    150+ Forum Groupie


    Perik's Avatar
    Join Date
    Aug 2007
    Location
    NORWAY
    Posts
    229
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Potentiometer connected to USBExpansion Card

    Jack,

    Found this in the SIOC docs:

    IOCARD_ANALOGIC

    With this link we can read from the USB Expansion card analogue axes.
    The values from the A/D converter is stored in the variable. Values vary between 0 and 255.

    Attributes :
    Name Assigns a symbolic name to a variable.

    Input Sets the axe (#1-4).
    PosI Sets the left position (normal value is 0)
    PosC Sets the center position (normal value is 127)
    PosR Sets the right position (normal value is 255)

    Example:
    Code:
    Var 2032, name POT1, Link IOCARD_ANALOGIC, Input #1, PosL 1, PosC 128, PosR 255
    Here is another one...

    Code:
    // Ailerons axle
    
    Var 0001, Link IOCARD_ANALOGIC, Input #1, PosL 0, PosC 128, PosR 255 
    // Input #1 means analog connector #1 in USB card. Without # would mean //digital input
    {
      L0 = V0001 * 129    // Potentiometer movement calculation
      V0002 = L0 - 16512
    }
    
    // Simulator ailerons (offset from -16383 to 16383)
    Var 0002, Link FSUIPC_OUT, Offset $0BB6, Length 2
    Regards,
    Per-Erik
    www.hoddo.net

  3. Thanks Boeing 747 Flyer thanked for this post
  4. #3
    500+ This must be a daytime job Boeing 747 Flyer's Avatar
    Join Date
    Nov 2009
    Location
    England
    Posts
    771
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Potentiometer connected to USBExpansion Card

    Thanks to much for that Perik! It has worked a treat! Cheers!