Page 49 of 74 FirstFirst ... 3945464748495051525359 ... LastLast
Results 481 to 490 of 737
  1. #481
    500+ This must be a daytime job



    Join Date
    Jan 2007
    Location
    NEW ZEALAND
    Posts
    899
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Sorry David,
    I was thinking of the Compass, where you stick a rod in the center of the Faceplate and this has to be drilled.
    Les

  2. #482
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Oh, got ya.

    Umm, although this was my first gauge build, it will probably be my last to finish as the Stepper part of FSBus is only looking like it's sorted now. My compass rose is loose in the gauge.

    What I may do is re-cut the compass rose with the cnc machine and make the centre hole at the same time. At least I know it will be centered.

  3. #483
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Stefan,

    Have some questions, hoping you can help.

    I am having a go at getting the altitude indicator programed.

    I have a 200 step stepper motor 360 deg = 1,000 ft. on the gauge
    720 deg = 2000 ft etc.

    I am using the offset 0x3324 Altitude feet.
    In FSInterogate 0=0 (on the ground), and at 10000 feet = 10000 in FSInterogate

    I have made the objects and declared them.
    MkFsbusObject (BTP_A_OUT, S_ALTIMETERFEET,"Altimeter Feet", cbGauges, 8,80);

    MkFsObject(FS_ALTIMETERFEET,"Altimeter Feet", cbGauges, 0x3324, 4, TP_I32, FS_NORMAL);


    The way I'm looking at it is that Dirk is suggestion using the FsbusWriteFmtVar(30, 80, 0); to write the position to the stepper
    0 in the (30,80,0) being the position of the stepper (number of steps), if it was 200 it should have done a 360 deg movement.

    So can I make the 0 a variable, and give the value of the offset to this variable, but also do it in a way so that each 1000 on the variable = 200 steps

    Look forward to your thoughts.
    Thanks
    David

  4. #484
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    ok short idea.

    case FS_ALTIMETERFEET:
    val= val/5; // 1000feet for 360° are 200 steps (1000/200)
    FsbusWriteFmtVar(8, 80, val);
    break;

    how you connect the 3 Sensors to the Stepper card? in a row?

    Stefan

  5. #485
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Thanks Stefan,

    I put the 3 interupters in a row one on the 100 feet, one on the 1000 ft and one on the 10000 ft gears
    This way, when it needs to zero, it won't stop going to the left until all 3 needles are on zero.

    case FS_ALTIMETERFEET:
    val= val/5; // 1000feet for 360° are 200 steps (1000/200)
    FsbusWriteFmtVar(8, 80, val);
    break;

    So how do I get the offset value to be val?

    David

  6. #486
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    I put the 3 interupters in a row one on the 100 feet, one on the 1000 ft and one on the 10000 ft gears
    This way, when it needs to zero, it won't stop going to the left until all 3 needles are on zero.
    that is the perfect solution.

    case FS_ALTIMETERFEET:
    val= val/5; // 1000feet for 360° are 200 steps (1000/200)
    FsbusWriteFmtVar(8, 80, val);
    break;

    So how do I get the offset value to be val?
    The value of an object (oid) is all the time val.

  7. #487
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Oh, ok. So in this instance, val will be the value of FS_ALTIMETERFEET

    When ever you have the case then object, val will be the value of the object.

  8. #488
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    I'm not getting any action in the Altitude indicator.

    What syntax do I use to view the value of val, ie: printf(........);

    Any other suggestions to try?

    Also, Shouldn't I be writing to S_ALTIMETERFEET
    MkFsbusObject (BTP_A_OUT, S_ALTIMETERFEET,"Altimeter Feet", cbGauges, 8,80);

  9. #489
    300+ Forum Addict
    Join Date
    Feb 2008
    Location
    Krefeld, Germany
    Posts
    318
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Also, Shouldn't I be writing to S_ALTIMETERFEET
    MkFsbusObject (BTP_A_OUT, S_ALTIMETERFEET,"Altimeter Feet", cbGauges, 8,80);
    that object you can delete.

    Sample for a printf
    printf("input %d trimL %d trimR %d\n", val, trimL, trimR);
    %d is the space where the variable is shown.
    in my sample 3 %d for the 3 variable.
    \n is new line.

  10. #490
    300+ Forum Addict RobiD's Avatar
    Join Date
    Sep 2007
    Location
    Gold Coast, Australia
    Posts
    430
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Progamming help with FSBus dll

    Would that object be having any effect on 'no movement' on the gauge.

    Should I also see the green led on the Stepper board lighting up quite a bit. It is not receiving any data at all (not lighting up, other than when FSBus starts)

Similar Threads

  1. Fsbus CDK
    By flyandre in forum General Builder Questions All Aircraft Types
    Replies: 4
    Last Post: 12-27-2014, 12:58 PM
  2. Need Help Getting My FSBUS NG I/O Going Again..
    By JBRoberts in forum I/O Interfacing Hardware and Software
    Replies: 14
    Last Post: 03-21-2010, 01:38 PM
  3. Fsbus ng io
    By Davral in forum I/O Interfacing Hardware and Software
    Replies: 0
    Last Post: 01-10-2009, 10:38 PM
  4. Fsbus 2.4.3
    By Anderson/SBSP in forum I/O Interfacing Hardware and Software
    Replies: 9
    Last Post: 11-30-2008, 04:25 PM
  5. Help FSBUS
    By cesarfsim in forum I/O Interfacing Hardware and Software
    Replies: 2
    Last Post: 10-26-2008, 02:23 PM

Tags for this Thread