Results 1 to 10 of 65
-
04-06-2011, 02:09 PM #1
"Inner Circle" HSI - SIOC DC Motors Card Script
Hi everyone,
I need some advice on how to build a SIOC script for the "Inner Circle" of my HSI.
This Circle is not the rotating compass card, but the inner needle that points to a VOR station and that moves according to the aircraft's heading.
The HSI is equipped with DC Motors, and is also equipped with Potentiometers for feedback (although I'm still finalising detils of these potentiometers).
So, I need a script that incorporates Motors, feedback and the FSUIPC Offset for the Inner Circle of a HSI. I cannot find anywhere to start; as all the scripts I can see are for Stepper Motors.
I *think* the Potentiometers go from like 0-5K Ohms, then when they reach the 0/360 (North) heading they reset back to 0.
If some-one could help me, point me in the direction of a script that I can modify, or anything else, I would be most grateful.
Kindest regards,
Jack
-
04-07-2011, 05:48 AM #2
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Hi Jack,
if I understand you right, you are trying to move the nav1 localizer needle ? You can get the value from the fsuipc offset $0C48. Then you need to calibrate the potentio meter. Means you have to find out where the middle and the right and left extremes are. As well as calculating the pot-values to be equal to the nav-needle values or the other way around. (That depends on your preference). The nav-needle's value range is -127 to 127. Then you need to programm the motor movement according to the pot's position vs. the nav1-needle position. If you're using OC card's analogue input, it's 8-bit so the values will allready be close to those of the nav-needle.
I do have a sioc dc motor code example for an airspeed indicator on my homepage : http://www.md80.ch/index.php?option=...d=82&Itemid=72
Basically it's the same principal for the nav-needle.
Hope this helps you
Kind Regards,
Gery
-
Post Thanks / Like - 1 Thanks, 0 Likes, 0 DislikesBoeing 747 Flyer thanked for this post
-
04-07-2011, 07:50 AM #3
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Thank you very much Gery!
I understood most of that.
Also; thank you very much for the localiser offset. I was, in fact, trying to use Offset 04CE, the NAV1 Course Indicator. This ranges from 0-359 degrees. Does this change anything?
Also, please may you expand a little on the scaling and the "8-bit" sort of things?
Jack
-
04-07-2011, 08:05 AM #4
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
HI Jack,
the nav1 course is the compass and the nav1 localizer indicator is the needle that shows if your're left or righ off the selected course.
When it comes to the scaling there's not much too it. You will want to use simmilar values for the pot and the needle. So you need to find a factor for either one of them so that you get simmilar values. If you look at the airpseed indicator example you see that I devided dc_in_mo4 / 61. dc_in_mo4 is here the pot-value for the airspeed needle. If I devide it by 61 in this case I get values from 70 to 250 in stead of 4270 to 14250 (which is the pot's native resolution using the bodnar cards as input (12 bit resolution)). The OC cards have a 8-bit input resolution which gives you a potentiometer native values from 0 - 255.
Regards,
Gery
(pot = potentiometer.)
-
04-07-2011, 10:54 AM #5
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Hi Gery,
I definitely understood most of that!
So what you're saying is, you need to divide the FSUIPC range to get it down to a figure of, lets say 70-250 (or whatever the native resolution is).
How can I do this for the Offset $04CE (NAV1 Course) though? It has a range from 0-359, with a length of 2 Bytes. This would have to be divided by something like 1.X surely?
Jack
-
04-07-2011, 11:08 AM #6
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Hi Jack,
yes, but the nav1 course will probably not work with a potentiometer since it's 360 degrees. A potentiometer even if the mechanical range is 360 degrees always has a dead zone. It's most likely that your HSI has syncros not pots for the course position. So far I have not seen any one make a card that can handle syncros. So the only way to do the course is to modify the HSI and excange the DC motor with a stepper motor.
Gery
Gery
-
04-07-2011, 11:14 AM #7
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Hi Gery,
The HSI uses three pots per motor. Each Pot covers approximately 120 degrees, thus making up the full circle. They are definitely DC Motors and the Potentiometers are definitely potentiometers.
So, I'll need to scale and script three potentiometers, each covering a different range of offset 04CE.
Jack
-
04-13-2011, 11:09 AM #8
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Hi everyone,
I have written myself a small test script; it does not require FSUIPC or anything; it just rotates the motors when Var0000 is executed. Take a look:
Code:Var 0, Value 0 { &Motor_2 = 120 &Motor_3 = 120 &Motor_4 = 120 &Motor_6 = 120 } Var 0001, name Motor_1, Link USB_DCMOTOR, Output 1 Var 0002, name Motor_2, Link USB_DCMOTOR, Output 2 Var 0003, name Motor_3, Link USB_DCMOTOR, Output 3 Var 0004, name Motor_4, Link USB_DCMOTOR, Output 4 Var 0005, name Motor_5, Link USB_DCMOTOR, Output 5 Var 0006, name Motor_6, Link USB_DCMOTOR, Output 6 Var 0010, name A1, Link USB_ANALOGIC, Input 1, PosL 0, PosC 127, PosR 255 Var 0011, name A2, Link USB_ANALOGIC, Input 2, PosL 0, PosC 127, PosR 255 Var 0012, name A3, Link USB_ANALOGIC, Input 3, PosL 0, PosC 127, PosR 255 Var 0013, name A4, Link USB_ANALOGIC, Input 4, PosL 0, PosC 127, PosR 255 Var 25, name Bar_GS { IF &A3 <= 150 { &Motor_1 = 120 &Motor_5 = 250 } ELSE { &Motor_1 = 250 &Motor_5 = 120 } }
Any ideas? Have I defined something wrong?
Jack
-
04-13-2011, 03:56 PM #9
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Hi Jack,
have you looked at the console ? you should be able to see the contents of the variables there.
I'm not 100% sure but I think var0 is only executed once. You probably need a function and a timer to call the function.
A very good site with some examles: http://www.lekseecon.nl/howto.html
Gery
-
04-13-2011, 06:55 PM #10
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
HI Gery,
I found the problem. According to the log, the Pots are not recognised at all.
This is my SIOC.ini:
Code:[SIOC] IOCP_port=8092 IOCP_timeout=4000 Minimized=Yes toggle_delay=20 CONFIG_FILE=Motor_tests.ssi [IOCARDS MODULE] IOCard_disable=No IOCard_LPT=No [USBKEYS] USBKeys=0,13 [USBDCMOTORS] USBDCmotor=0,38 [MASTERS] ;MASTER=1,7,1,1001 ;MASTER=2,5,1,1002 MASTER=3,11,1,48 ;MASTER=5,8,1,1005 MASTER=0,4,1,12 MASTER=2,5,1,50 [USBKEYS] USBKeys=4,67 [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
Also, yes Var0 is only executed once. Var 0 will set the 4 motors moving, and the other 2 are dependant upon the position of the pots, which are not recognised.
Jack
Similar Threads
-
DC Motors Card - How to use in SIOC?
By Boeing 747 Flyer in forum OpenCockpits General DiscussionReplies: 4Last Post: 04-20-2017, 09:11 PM -
Expansion card buggy? Shows "ghost" inputs where there aren't...
By Michael737NG in forum OpenCockpits General DiscussionReplies: 0Last Post: 12-26-2010, 07:02 AM -
SIOC "IF" Question
By Boeing 747 Flyer in forum OpenCockpits General DiscussionReplies: 89Last Post: 08-29-2010, 05:34 PM -
FSX "This graphics card does not meet minimum ..." HELP !!!!
By ibennett in forum Computer Hardware SetupReplies: 5Last Post: 04-12-2010, 09:46 PM -
Looking for "Below GS" and "Spoilers armed" annunciator light offset
By PeterH in forum PM General Q & AReplies: 17Last Post: 03-05-2008, 12:39 PM
Girls in your town
A320 Sound Files Missing