-
Re: Progamming help with FSBus dll
Dirk has suggested testing the code before using the replacement .dll file.
I'll PM you the .dll file.
Here is the email in it's entirity from Dirk:
Hi David,
I recently finished my stepper example. Please test the following simple program, replace COM5 and CID 23 by your values.
It will set the stepper to position 0, then to 100 (steps) and after a delay of 2s back to zero.
I've tested this successfully without change. If it doesn't work, please try the attached dll.
Your question concerning the switches:
The resistors are well dimensioned vor pics and atmels.
The circuit works, if the zero position obscures the light from led to transistor.
int _tmain(int argc, _TCHAR* argv[])
{
CheckIn();
BOOL b = FsbusOpen("COM5");
FsbusWriteFmtVar(23, 80, 0);
FsbusMux(2000);
FsbusWriteFmtVar(23, 80, 100);
FsbusMux(2000);
FsbusWriteFmtVar(23, 80, 0);
FsbusMux(2000);
CheckOut();
return 0;
}
regards Dirk
-
Re: Progamming help with FSBus dll
Stefan,
Let me know if you didn't get the PM. It did something strange when I pressed send so I'm not sure if it went or not.
David
-
Re: Progamming help with FSBus dll
Hi David,
the PM is there, thank you.
I will check that file and code tonight.
Stefan
-
Re: Progamming help with FSBus dll
The "old" Version donīt work, "new" Version workīs.
The new one is Version 1.2.0, strange.
Stefan
-
Re: Progamming help with FSBus dll
How did you go Jan?
Did you get it to work for you?
David
-
Re: Progamming help with FSBus dll
I would love to test the new DLL.
ALSO: I sometimes need to reprogram the IO board because it loses the fact that i have rotaries (12way modified) and then i get on off. I have to go into the admin program and set the switches again as a rotary!! Anyone had that issue? It is tiresome - having to constantly set switches as rotaries. I do not know why and I am doing nothing wierd - just switchin power on and oiff anmd starting the interface program. I haven't progressed at all with this because I just can't get my altitude to work it only works if i adjust it IN FSX with the mouse ALSO all rotaries are setting the digits backwards etc. I just can't see myself building any further panels and wasting more money. I have 5 cards build and the COm board and at the moment they are gathering dust. Just no enthusiasm anymore after battling for more than a year.
Probably cheaper in the long run to go OC - and less head aches.
-
Re: Progamming help with FSBus dll
Hi shearder,
I had a similar problem with my DIO board some time ago. It kept resetting the CID to 27 and losing all the preference for rotaries etc. Stefan helped with the suggestion regarding the board being reset due to the Brown out settings in the fuse bits. He offered me a solution that has not been fully varified as yet but I tried it and have not had another problem since.
With the altitude indicator, look back in this thread and my altitude indicator code is there. Dig through it and see if you can use some of mine to fix the problems.
I am having no problems with any of my gauges, switches, rotaries, displays, aircore gauges, etc etc etc. I have had an enormous amount of help from a lot of people to get to this point, but the greatest input and assistance has been from Stefan (thanks again Stefan).
Are you working on a stepper board at present, as the .dll is being tested only for the stepper.
Stefan or Jan, have you tried the test .dll on all of the other boards. Does everything else still function?
David
-
Re: Progamming help with FSBus dll
Thanks dude. No, no stepper boards as yet. Planned and i have 2 small stepper motors to test with but, as i said, i can't even get the Altitude to change pfff... I will look through the thread. Thanks.
-
Re: Progamming help with FSBus dll
Also, see if Stefan will PM you the solution regarding the fuse bits. It's not for general publication just incase everyone fries their ATMEGA chips (yes, it is a possibility but it hasn't happened to me).
David
-
Re: Progamming help with FSBus dll
everything else still function?[/QUOTE]
I checked that in the last houre, the DLL is the very old 1.2 version and is not working with the V2 code.
@David did you report our results to Dirk?
@shearder because of your erasing problem. Look to the ATMEL 8535 Manual on page 39 the part about BOD.
There you see what that do and how you can enable that, i use 4V configuration.
manual
Stefan
-
Re: Progamming help with FSBus dll
Just a stepper update.
Stefan, I have given Dirk an update on findings todate, but have not heard back from him yet. I will contact him again shortly to see where he is at with modifying the v2 dll.
The stepper board that I redesigned to take the ATMEGA168-20PU DIP package works fine. Have built the board, set up the zero point indicator and all is working. Just have to test the code Dirk gave me then wait until we have an answer. Altimeter and Radio ADF completed now.
David
-
Re: Progamming help with FSBus dll
Good News, David.
thank you
-
4 Attachment(s)
Re: Progamming help with FSBus dll
Just finished my ADF/RMI gauge so I thought I'd attach some pics and show off a little.
Hope you all like. Note the DIP designed FSBus stepper boards on the back of the gauge.
David
Attachment 4302 Attachment 4301Attachment 4300 Attachment 4303
-
Re: Progamming help with FSBus dll
-
Re: Progamming help with FSBus dll
Thanks Stefan, I'll attach some pics of my altitude indicator when I'm finished. Just have to redesign the Optical interupters so the zero point works properly, but otherwise, it's finished too.
David
-
Re: Progamming help with FSBus dll
Hi Stefan,
I am trying to test Dirk's code and I'm a bit stuck.
Can you walk me through step by step how to set up this code.
Do I start a new project?
Do I just use existing project, start a new .ccp file for this code.
Appreciate your help.
David
-
Re: Progamming help with FSBus dll
Hi David,
you have to generate a new project.
The Code from Dirk you write to the main *.cpp file.
Next is the include the fsbus.h file and that is all.
Iīll send you a link to my Sample file, you need to adjust the Com Port and CID of the Stepperboard.
Stefan
-
Re: Progamming help with FSBus dll
-
Re: Progamming help with FSBus dll
Stefan,
Loaded the project into Visual C++ express and ran it. Worked fine except I didn't change the Com3 to Com1 so I made the change and then ran it again, this time I got a whole host of errors.
Does it mean anything to you? Sorry about the long post. Thought the more info, the easier to debug.
1>Compiling...
1>Stepper.cpp
1>c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(47) : error C2011: 'vc_attributes::YesNoMaybe' : 'enum' type redefinition
1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(47) : see declaration of 'vc_attributes::YesNoMaybe'
1>c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(57) : error C2011: 'vc_attributes::AccessType' : 'enum' type redefinition
1>Build log was saved at "file://c:\Documents and Settings\All Users\Documents\stepper\Stepper\Debug\BuildLog.htm"
1>Stepper - 25 error(s), 0 warning(s)
-
Re: Progamming help with FSBus dll
Do you make a rebuild of the project? (Ctrl+Alt+F7)
-
Re: Progamming help with FSBus dll
Yes, I pressed the green arrow to recompile.
Oh, I'll try the Cntl+Alt+F7
-
Re: Progamming help with FSBus dll
-
Re: Progamming help with FSBus dll
Quote:
Originally Posted by
sgaert
everything else still function?
@shearder because of your erasing problem. Look to the ATMEL 8535 Manual on page 39 the part about BOD.
There you see what that do and how you can enable that, i use 4V configuration.
manual
Stefan[/QUOTE]
Hey Stefan
Due to work i haven't touched my sim in almost 3 weeks. I did some tests with Davids stuff and with a bit of SLIGHT mods i have my MCP working the way it should. My next question is around the BOD for the 8535. Can this be set using Pony? Or do i need something else?
Thanks again!
Sean
-
Re: Progamming help with FSBus dll
You can set BOD with the Fuse in Pony.
-
Re: Progamming help with FSBus dll
Hey Stefan
Sorry, another question: when the 8535 is set to 4v will normal on and off of the power affect it? I assume not?
Thanks again.
-
Re: Progamming help with FSBus dll
Everything is normal.
It only makes a reset when the Vcc is lower then 4V.
Without that it is possible that he erease the EEPROM.
-
4 Attachment(s)
Re: Progamming help with FSBus dll
Images of my newly completed Altitude indicator gauge.
Hi guys, as promised, here are a couple of images of my stepper driven altitude indicator.
Pretty happy with how it's come out.
Just have to get the code together to get it working with FSX..
http://www.safeweightloss4kids.com/d...icture 005.jpg
Front view
http://www.safeweightloss4kids.com/d...icture 006.jpg
Side view
http://www.safeweightloss4kids.com/d...icture 007.jpg
Close up of the three optical interupters needed for zeroing gauges on startup
http://www.safeweightloss4kids.com/d...icture 008.jpg
Needles gaining altitude
-
Re: Progamming help with FSBus dll
Good Job.
Can you make a movie with the working gauge, inside and outside?
-
Re: Progamming help with FSBus dll
Never done that before, but I guess I could give it a go.
I'd love to get the code working though. I tested the code Dirk gave me with the current .dll file and it did what it was supposed to.
Dirk says that according to this test, it indicates that it should work as is in FSBus.
Have no idea where to begin with the code though. I've asked Dirk if he has a sample code for the stepper and I'm just waiting to hear back.
I'll try and get some video this weekend. It will just be through either FSBus admin or through the test code that Dirk sent.
David
-
Re: Progamming help with FSBus dll
ok, no problem.
On FSweekend i will talk to Dirk.
At the moment i have follows themes/topics.
- Stepper bug in the V2 DLL
- Display bug in the DLL (blank, bar,... option)
Do you or anybody have additional topics?
Stefan
-
Re: Progamming help with FSBus dll
Not sure what you mean by themes?
-
Re: Progamming help with FSBus dll
Topics, problems i donīt have on my list.
-
Re: Progamming help with FSBus dll
Oh right.
My only concern to date has been the issue everyone else has had with the stepper, but that would appear to be ok now (although would love some sample code on how to use it)
Shearder has told me that with the MCP code I gave him (lots of help from you and Rob) aircraft locks on to Glideslope to line up with runway, but does not follow GS down. This is probably more to do with the coding rather than a problem with the .dll
So far, everything I've wanted to interface has worked (excluding stepper to this point). I cannot think of anything that I personally think should be added or changed.
Thank you for asking for my input.
-
Re: Progamming help with FSBus dll
Ok, we have some weeks, maybe we have some ideas for improvements or any other.
-
Re: Progamming help with FSBus dll
Hi David,
Nice job, been thinking about making this myself, where did you source your gears from?.
Thanks
Les
-
Re: Progamming help with FSBus dll
Hi Les,
http://www.servolink.com/ in the US.
They have a minimum order of $30 USD plus postage of around $15, so I order extra bits and pieces to make it up.
Fast postage.
I followed the ratio recommendations in Mikes Flightdeck 'Building Simulated Aircraft Instrumentation' http://www.mikesflightdeck.com/ (very worthwhile purchase)
Cheers
David
-
Re: Progamming help with FSBus dll
Thanks David,
I was just checking in case you found a local source. Was going to buy from them, yes i have Mikes book and have already built the Turn Coordinator.
Regards
Les
-
Re: Progamming help with FSBus dll
The Turn Coordinator was my first build too.
Mike's book makes it so much easier.
I build my own little cnc machine, used all of Mike's dimensions in Coreldraw, made the toolpaths then cut out all of the parts. Then assembled and modified as needed.
Chose to interface with FSBus as I have travelled a long journey with FSBus, so I stayed loyal.
It is great when you make all the parts then assemble, and it all works as it should. Very rewarding.
David
-
Re: Progamming help with FSBus dll
Looks like we are doing something similar. I too built a small cnc machine and cut my bits with it. I started out with Fsbus but gave up because i could not get Dirk to fix some very basic things. I didnt want to use multiple i/fs. I now use o/c, much better supported.
How did you drill a hole in the centre of rod which attaches the pointer and connects to the shaft of the stepper.
Les
-
Re: Progamming help with FSBus dll
In Mike's book, he outlines (well actually he details) the use of various diameter brass hobby tubing. So they are all hollow.
Hence it is soooo easy to have three pointers running from the centre (as in the altitiude indicator)