Page 13 of 74 FirstFirst ... 3910111213141516172363 ... LastLast
Results 121 to 130 of 737
  1. #121
    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

    Sorry Stefan, excuse my ignorance, but where do I put this, and what do I do with it.

    I understand it is to test the analog out.

    Do I need to declare C_Tastanalogout
    Do I need to declare C_Testpoti
    Do I need to MkFsbusObject
    Do I need to MkFSObject


    When you say Poti, are you talking about a potentiometer, if so is it possible to have Analog in on port 80 and Analog out on port 87 because I understood that you couldn't have analog out if you have any analog in.

    Appreciate if you could take me through step by step.

    As you've probably gathered, I know about as much about C++ or C as you could learn in 2 weeks without reading any books.

    David

  2. #122
    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

    That was only an sample.
    You can use your own objekts.
    I dont see any Problems in the Docu with a mix of Analog In and Analog Out.

    Step by Step:
    Find a definied data source. (Potentiometer, encoder, value entry in the Application)
    Make all necessary hardware changes.
    Declare and build all Objekts.
    Write the code like my sample, in case of an encoder you need additional a variable and the add calculation. (x +=val; )

    Stefan

  3. #123
    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

    Ok, I'm up for the challange.

    I might try a value entry in the application.

    How do I MkFSObject without an offset, or do I not need to MkFsObject.

    MkFsbusObject (BTP_A_OUT,C_TESTANALOGOUT,"This is a test",cbVoltmeters,27,85);

    case C_Testpoti:
    int val;
    val = enter set value here?;
    FsbusWrite(C_TESTANALOGOUT, val);
    break;


    Then define C_Testpoti and define C_TESTANALOGOUT IN stdaft.h

    Will this do it if I enter different values in the val = ? part?

  4. #124
    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

    NO.

    first: you put them into a case that means only on an event of the right OID that would do. but without nothing work.

    second: val is the vaiable lable of the OID value. you donīt need to gerate them.

    last time you ask about encoders. use them.

    Stefan

  5. #125
    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

    Ok,
    maybe you can guide me a bit further.

    I have a rotary encoder setup and configured on Digital IN CID27,RID32

    I have a voltmeter setup and configured on Analog OUT 27,87

    Can you write for me what I need to get the encoder to move the needle.
    How will I then see what the numbers are for the encoder - print function?

    Hope you can do this for me, my head is starting to hurt.

  6. #126
    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

    Just an update for anyone using this thread as an information source.

    The rotary encoders are now working great, and the voltmeters are also working great.

    Here were my problems (mistakes):

    When you configure the DIO board for rotary encoders or analog out, the jumper J16 must be set in the same way as for giving the board the CID number.

    The problem with getting the voltmeters to work using the calibrate function is totally my fault. In the array table, I used ( ) brackets instead of { } brackets. Now they all work fine.

    So I now have working: Voltmeter (amps), Left and Right Fuel Gauges, Fuel Pressure, Oil Pressure and Oil Temp. It's great to see them working perfectly.

    For my next adventure, I will start programming the radios: Nav1, Nav2, Com1, Com2

    David

  7. #127
    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,

    Another question for you.

    I am programming my ADF, simple 5 digit display, and a rotary encoder.

    In the example that came with FSBus dll V1, there is an example under nav.cpp

    I have copied this over to my files, made the change for MkFsObject from MakeFsObject, put in my DIO board for the rotary encoder ie: 27,32
    put in the display card, 14,0

    I am getting no change in the ADF using the rotary encoder, and I am getting nothing on the display.

    I tested the display, it is working fine, and we tested the rotary encoder with your program and it's working fine.

    Is there something else that needs to be changed in order for it to work in FSbus V2?

    Appreciate your thoughts.

    David

  8. #128
    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

    Hi,
    as far as I can remember me the ADF never work in the sample files.

    Stefan

  9. #129
    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

    That's a shame, I thought I could just copy it over and it would work straight out of the box. But then again, I have found out that nothing works straight out of the box with programming.

    Any thoughts on what needs to be changed to get it to work?
    Did Rob have any luck?
    Dirk is building a Cessna, perhaps he has had some luck.

    Thanks
    David

  10. #130
    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

    to think you copy a part from the sample and you have a finished solution is the compleatly wrong way.
    That are only early samples, they have big bugs.
    At Robs code you have a finished working ADF.
    Btw. a ADF with only 1 Encode will drive you crazy.

    Stefan

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