Results 121 to 130 of 737
Thread: Progamming help with FSBus dll
-
07-01-2009, 06:34 AM #121
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
-
07-01-2009, 07:21 AM #122
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
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
-
07-01-2009, 07:39 AM #123
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?
-
07-01-2009, 08:07 AM #124
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
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
-
07-01-2009, 08:18 AM #125
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.
-
07-03-2009, 08:33 PM #126
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
-
07-04-2009, 11:50 PM #127
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
-
07-05-2009, 03:39 AM #128
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
Hi,
as far as I can remember me the ADF never work in the sample files.
Stefan
-
07-05-2009, 06:07 AM #129
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
-
07-05-2009, 06:21 AM #130
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
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
-
Fsbus CDK
By flyandre in forum General Builder Questions All Aircraft TypesReplies: 4Last Post: 12-27-2014, 12:58 PM -
Need Help Getting My FSBUS NG I/O Going Again..
By JBRoberts in forum I/O Interfacing Hardware and SoftwareReplies: 14Last Post: 03-21-2010, 01:38 PM -
Fsbus ng io
By Davral in forum I/O Interfacing Hardware and SoftwareReplies: 0Last Post: 01-10-2009, 10:38 PM -
Fsbus 2.4.3
By Anderson/SBSP in forum I/O Interfacing Hardware and SoftwareReplies: 9Last Post: 11-30-2008, 04:25 PM -
Help FSBUS
By cesarfsim in forum I/O Interfacing Hardware and SoftwareReplies: 2Last Post: 10-26-2008, 02:23 PM
Search Womans from your town for night
HDG preselect function