Results 1 to 3 of 3
-
09-03-2011, 08:09 PM #1
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
The USBExpansion Card is Index 0, Device 18. The Pot is #4. Any suggestions?
Cheers,
Jack
-
09-04-2011, 03:33 AM #2
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
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
-
Post Thanks / Like - 1 Thanks, 0 Likes, 0 DislikesBoeing 747 Flyer thanked for this post
-
09-04-2011, 03:08 PM #3
Re: Potentiometer connected to USBExpansion Card
Thanks to much for that Perik! It has worked a treat! Cheers!
6yo FACECAST LINK 14year GIRLS FORUM : ( )...
YWM RAR JAILBAIT ZOOM