Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27
  1. #21
    767 builder edo17982's Avatar
    Join Date
    Jun 2008
    Location
    Milano, Italy
    Posts
    53
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airspeed indicator interfaced with OC cards

    yeah I know, all the pots u finf out are 22 mm wide...and same is for those I use. so 22 mm with really little mod will work Maybe u can find them bit cheaper, around 30€ on RS

  2. #22
    25+ Posting Member crashdog's Avatar
    Join Date
    Jun 2010
    Location
    swizerland
    Posts
    42
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airspeed indicator interfaced with OC cards

    just found this page today... lot's of pictures of electromechanical instruments. Had not seen the page before.
    http://l1011project.blogspot.com/201...indicator.html

  3. Thanks edo17982, Boeing 747 Flyer thanked for this post
  4. #23
    767 builder edo17982's Avatar
    Join Date
    Jun 2008
    Location
    Milano, Italy
    Posts
    53
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airspeed indicator interfaced with OC cards

    Wow, really great find!!! I already found 2 VSI indicators, the same he's using and took them as they have the DC motor inside and will be easy to make working...I can tell u where to get it if u need

  5. #24
    25+ Posting Member crashdog's Avatar
    Join Date
    Jun 2010
    Location
    swizerland
    Posts
    42
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airspeed indicator interfaced with OC cards

    Just got my DC card today and try to understand the basics of siocing it...
    I made a fsuipc var to read vertical speed. My target is a t the moment just to get the needle of my alt to move right when climb and left when descend.
    from the example codes it seames that one must have a timer... never use those but... well at the moment it seames to move pritty much like it wants here's the code i use:
    Code:
    Var 1000, Value 0
    {
     &dc_mo_in1 = TIMER 999,0,2
    }
    
    Var 0200, name dc_test1, Link USB_DCMOTOR, Device 4, Output 1     // dc  motor1
    
    Var 0210, name dc_mo_in1, Link FSUIPC_IN, Offset $02C8, Length 4     // dc mo in 1
    {
      L0 = &dc_mo_in1 * 60
      L0 = L0 * 3.28084
      L0 = L0 / 256
      L0 = L0 / 10
      IF L0 > 128
      {
        L0 = 128    
      }
      IF L0 < -128
      {
        L0 = -128    
      }
      &dc_test1 = L0    
    }
    what am I undersanding wrong here ? the needle just turns and turns in one direction. Randomy or maybe the first impulse it get's at start off sioc ?

    Gery

  6. #25
    767 builder edo17982's Avatar
    Join Date
    Jun 2008
    Location
    Milano, Italy
    Posts
    53
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airspeed indicator interfaced with OC cards

    Quote Originally Posted by crashdog View Post
    Just got my DC card today and try to understand the basics of siocing it...
    I made a fsuipc var to read vertical speed. My target is a t the moment just to get the needle of my alt to move right when climb and left when descend.
    from the example codes it seames that one must have a timer... never use those but... well at the moment it seames to move pritty much like it wants here's the code i use:

    what am I undersanding wrong here ? the needle just turns and turns in one direction. Randomy or maybe the first impulse it get's at start off sioc ?

    Gery
    Hi Gery!
    What I can suggest (I'm not a SIOC guru but I found a way to have my gauges workin) is 1st to divide variables for FSUIPC conversion and Motor control as I did.
    In the FSUIPC conversion you will put the converion itself as you did and the various ranges of the VSI scale according to the pot positioning.
    In the control variable you will define how the motor will act according to the pot position and the objective position it has to reach.
    In your code I see that you forgot to insert the variable for the pot used for the positioning...remember also to correctly configure your IOCDCMOTOR.INI file to get everything workin properly.

    Code:
    Var 0000, Value 0
    {
      &VSControl = TIMER 999, 0, 2
      &VSMotor = 0
      &VSObj = 127
    }
    
    Var 0001, name VSMotor, static, Link USB_DCMOTOR, Device 2, Output 1 // motor control (0-127) 0=Left, +128 = Right
    Var 0006, name VSAd, Link USB_ANALOGIC, Device 2, Input 1, PosL 0, PosC 127, PosR 255 Static // Potentiometer value
    Var 9001, name VSOffst, link FSUIPC_IN, offset $02C8, Length 4
    {
      L0 = &VSOffst * 60	// FSUIPC conversion, L0=VS
      L0 = L0 * 3.28084 	// FSUIPC conversion, L0=VS
      L0 = L0 / 256		// FSUIPC conversion, L0=VS
      L0 = ROUND L0		// Let's round the decimal value
      &VS = L0
      L2 = L0		// Since now we'll calculate all the ranges of the scale
        IF L0 <= -6000 // First sector, value greater than - 6000 ft/min
        {
          L1 = 0	// Pot 0: here you will type the value according to the pot position when needle is on the "6" in negative range
        }
        ELSE
        {
          L2 = L0 + 6000
          IF L0 <= -2000 // Second sector, value between -6000 and -2000
          {
            L1 = L2 / 80 // pot 50
            L1 = L1 + 0
    	L1 = ABS L1
          }
          ELSE
          {
            L2 = L0 + 2000
            IF L0 <= -1000	// Third sector, value between -2000 and -1000
            {
              L1 = L2 / 50 // pot 70
              L1 = L1 + 50
    	  L1 = ABS L1
            }
            ELSE
            {
              L2 = L0 + 1000
              IF L0 < 0	// Fourth sector. value between -1000 and 0
              {
                L1 = L2 / 17.85714 // pot 126
                L1 = L1 + 70
    	    L1 = ABS L1
              }
              ELSE
              {
                L2 = L0
                IF L0 = 0	// Fifth sector, Value 0
                {
                  L1 = 127
                }
                ELSE
                {
                  L2 = L0
                  IF L0 <= 1000	// Sixth sector, value between 0 and 1000
                  {
                    L1 = L2 / 17.85714 // pot 184
                    L1 = L1 + 127
                  }
                  ELSE
                  {
                    L2 = L0 - 1000
                    IF L0 <= 2000	// Seventh sector, value between 1000 and 2000
            	{
             	 L1 = L2 / 50 // pot 204
            	 L1 = L1 + 183
           		}
           		ELSE
            	{
              	  L2 = L0 - 2000
              	  IF L0 <= 6000	// Sixth sector, value between 2000 and 6000
              	  {
                	    L1 = L2 / 80 // pot 254
                	    L1 = L1 + 203
              	  }
                      ELSE // Out of range
                      {
        		    IF L0 > 6000 // Last sector, value greater than +6000 ft/min
        		    {
         		       L1 = 255	// Pot 255: here you will type the value according to the pot position when needle is on the "6" in positive range
        		    }
                      }  
    		}
    	      }
                }
              }
            }
          }
        }
      &VSObj = L1
    }
    Var 9002, name VS
    Var 9004, name VSControl, Link Subrutine // Subrutine for Control (each 20ms)
    {
      L0 = &VSobj - &VSAd
      L1 = 0
      IF L0 < 0
      {
        L1 = 128
      }
      L0 = ABS L0
      L2 = &VSVelMax + L1
      IF L0 <= &VSAprox8
      {
        L2 = &VSVel8 + L1
      }
      IF L0 <= &VSAprox6
      {
        L2 = &VSVel6 + L1
      }
      IF L0 <= &VSAprox4
      {
        L2 = &VSVel4 + L1
      }
      IF L0 <= &VSAprox2
      {
        L2 = &VSVel2 + L1
      }
        IF L0 <= &VSAproxSlow
      {
        L2 = &VSVelMin + L1
      }
      IF L0 = &VSMargen
      {
        L2 = 0
      }
      &VSMotor = L2
    }
    
    Var 9006, name VSObj // objective position
    Var 9007, name VSMargen, Value 0 // %error
    Var 9008, name VSAprox8, Value 6
    Var 9009, name VSAprox6, Value 4
    Var 9010, name VSAprox4, Value 3
    Var 9011, name VSAprox2, Value 2
    Var 9012, name VSAproxSlow, Value 1	// Value approaching target
    Var 9013, name VSVelMax, Value 60 // Max Speed for follow objective
    Var 9014, name VSVel8, Value 40 
    Var 9015, name VSVel6, Value 34
    Var 9016, name VSVel4, Value 28
    Var 9017, name VSVel2, Value 22
    Var 9018, name VSVelMin, Value 13 // Speed approaching target
    Last edited by edo17982; 08-12-2010 at 11:35 AM. Reason: Added the code

  7. #26
    25+ Posting Member crashdog's Avatar
    Join Date
    Jun 2010
    Location
    swizerland
    Posts
    42
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airspeed indicator interfaced with OC cards

    the problem seames to be the dc motor card or at least the output on the card I used. I have a second card and connected the altimeter there and it works correct now. That's why I always order more than one OC card For the moment I don't have the potentiometer and I wanted to see how the motor must be programmed. Will had the potty as soon as I have it. What did you mean with "RS" is that servo city or some other store ?

  8. #27
    767 builder edo17982's Avatar
    Join Date
    Jun 2008
    Location
    Milano, Italy
    Posts
    53
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Airspeed indicator interfaced with OC cards

    RS is RS component store. Try another input to see if it works correctly and post also the IOCDCmotor ini file as well as sioc.ini to see if it is correct along with your code.
    PS in prev post I posted the just compiled VSI code for you

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Pre-Interfaced Gauges?
    By Clocked-Off in forum General Builder Questions All Aircraft Types
    Replies: 5
    Last Post: 01-16-2011, 07:57 AM
  2. VSI Interfaced with OC cards !!
    By edo17982 in forum Interfacing Real Aviation Parts
    Replies: 0
    Last Post: 09-16-2010, 10:04 PM
  3. Boeing - Loockheed airspeed indicator
    By edo17982 in forum Off Site Articles For Sale
    Replies: 0
    Last Post: 08-20-2010, 11:27 AM
  4. Real-World Aircraft Instruments interfaced to FSX via SIOC & USBServos
    By Boeing 747 Flyer in forum My Cockpit Update
    Replies: 1
    Last Post: 08-07-2010, 08:58 AM