Results 601 to 610 of 737
Thread: Progamming help with FSBus dll
-
01-25-2011, 08:49 AM #601
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
that is the point i canīt help. Nomaly i start the debuger than you se what happends.
I is only math, you need to find the right calculation.
Stefan
-
01-30-2011, 07:39 AM #602
Re: Progamming help with FSBus dll
Thanks Stefan. I'll battle on. I have one more question.
Using your little motor testing code, it takes 2355 to make the rose go around 360deg. Does this mean that there is 2355 steps in 360degs? If so, it changes the code I'm working on drastically.
Here's my code to turn the rose 360 just so you're clear on what I mean.
FsbusWriteFmtVar(30,80,0);
FsbusMux(2000);
FsbusWriteFmtVar(30,80,2355);
FsbusMux(8000);
FsbusWriteFmtVar(30,80,0);
FsbusMux(8000);
-
01-30-2011, 04:56 PM #603
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
Thatīs right
-
01-31-2011, 06:31 AM #604
Re: Progamming help with FSBus dll
Stefan,
I am getting this error now:
Run-Time Check Failure #2 - Stack around the variable 'buf' was corrupted.
From reading, and if I understand correctly, is this a problem with the dll, or my code.
It seems to be around the ADF needle code. When I tune the ADF, it is ok for a while, then produces this error.
Any idea what it's telling me?
Thanks
David
-
01-31-2011, 06:34 AM #605
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
do you named a variable 'buf' ?
-
01-31-2011, 06:37 AM #606
Re: Progamming help with FSBus dll
No. I have no variable "buf".
Doing a little research, this type of error seems to indicate that something is being written to the wrong address, or something is not being cleared from that address before more data is being written to the same address.
I'm probably completely off track with my understanding.
David
-
01-31-2011, 06:40 AM #607
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
Ok Thanks.
On Feb. 19 i have a meeting with Dirk and Rob is will that error message to my todo list.
Please count the errors and try to find the situation to generate the error.
Stefan
-
01-31-2011, 06:43 AM #608
Re: Progamming help with FSBus dll
Will do. I'll try to give you as much info as possible.
-
01-31-2011, 07:03 AM #609
Re: Progamming help with FSBus dll
So it's around this piece of code
Code:case FS_ADF1RELATIVEBEARING: printf("Data in: %d\n",val); ADF1RelNeedleMulti = (1000 * ADF1RelNeedleDeg) / ADF1RelNeedleStep; ADF1RelDataIn = val + 32780; if (ADF1RelDataIn >=0) { ADF1RelDataIn = (ADF1RelDataIn+1); } ADF1RelDataDif = ADF1RelDataIn - ADF1RelDataSave; ADF1RelNeedleDif = ADF1RelNeedleMulti / ADF1RelDataDif; ADF1RelNeedlegoto = ADF1RelNeedleSave + ADF1RelNeedleDif; FsbusWriteFmtVar(29,80,ADF1RelNeedlegoto/1000); printf("Relative Bearing %d\n",ADF1RelNeedlegoto/1000); ADF1RelNeedleSave = ADF1RelNeedlegoto; ADF1RelDataSave = ADF1RelDataIn; //printf("ADF1RelNeedleMulti: %d\n",ADF1RelNeedleMulti); //printf("ADF1RelNeedleDeg: %d\n",ADF1RelNeedleDeg); //printf("ADF1RelNeedleStep: %d\n",ADF1RelNeedleStep); //printf("ADF1RelDataIn: %d\n",ADF1RelDataIn); //printf("ADF1RelDataDif: %d\n",ADF1RelDataDif); //printf("ADF1RelNeedledif: %d\n",ADF1RelNeedlegoto); break;
This bit in particular:
FsbusWriteFmtVar(29,80,ADF1RelNeedlegoto/1000);
printf("Relative Bearing %d\n",ADF1RelNeedlegoto/1000);
With the /1000, the printf data stays at 0 to 4.
If I delete the /1000 I now get some useful figures, but it triggers the error. The error is produced even if I try /10, /100
Hope that give some useful info.
Let me know what the follow up is of the meeting.
Thanks
David
-
01-31-2011, 07:08 AM #610
- Join Date
- Feb 2008
- Location
- Krefeld, Germany
- Posts
- 318
Re: Progamming help with FSBus dll
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
CHILDREN ONION SITES PARADISE BIRDS CLIPS : ( )...
P T H C FILES CLOUD TANGO VIDEOS...