Seite 1 von 1
Grundsätze zum FT programmieren mit C++
Verfasst: 11 Sep 2011, 08:47
von hefeteig
Hallo,
ich habe schon öfter gelesen, dass man Fischertechnik auch mit C++ programmieren kann,
im Internet habe ich aber keine wirklich einfache und schrittweise Einleitung dafür gefunden

.
Könntent ihr mit die Grundlagen wie z.B. welchen Compiler man braucht und wie man Motoren ansteuert
erklären? Oder kennt ihr vielleicht eine Website auf der dass erklärt wird?
Ich habe langsam die Funktionen von Robo Pro ausgeschöpft und möchte nun zu den Industriellen Programmiersprachen
wechseln, weil das schon mal eine gute Vobereitung für meine berufliche Zukunft sein könnte.
Ein wenig Kenntnisse von C++ habe ich

, aber ich weiß wie gesagt nicht wie man die mit Fischertechnik kombinieren kann.
Ich würde mich sehr freuen wenn ihr mir helfen könntet.
Als Zusatzinfo, ich habe Windows7, es wäre schön, wenn es zumindest für den Robo TX controller eine Lösung gibt.
Gruß Hefeteig
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 11 Sep 2011, 11:10
von Ad2
Well, for the TX everything is changing all the time, so that may not be so easy. As you probably know there two possibilities, online (program on the PC) and oofline (program on the TX). For the latter case there is only the documentation from MSC, the recommended environment is YAGARTO. For the first case you can use many compilers but the easiest is probably Visual C++ Express. Besides the compiler you need the library FtMscLib.dll and the header files (*.h) that come with it. I haven't tried lately but I have strong suspicions that the package provided on the website does not work with the current 1.24 firmware. So if you happen to have a RoboInterface I would start with that one. I also recommend that you start with online programming and move to offline later.
Furthermore the libraries are C, not C++ but of course you can use them from C++. Ulrich Muller provides some interesting wrappers that may make your life easier.
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 11 Sep 2011, 15:03
von hefeteig
Thank you for your detailed help.
It helped me really much.
Hefeteig
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 11 Sep 2011, 17:10
von vleeuwen
Ad has right, for the moment there is no support for online or offline programming.
The FtMscLib is not completely compatible for the use with dotNet framework.
The delegates and events are not always working well. Probably only inside the single thread compartment of a Windows program.
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 11 Sep 2011, 18:21
von hefeteig
I found a good intruduction in programming with C++ at the Website of Fischertechnik, with many Demos and a RoboTXtest.exe,
but than I started it the message, that it not funtion opened, the same happens, than I do it with win XP. Do you have an idea why?
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 11 Sep 2011, 21:27
von vleeuwen
As Ad wrote before, the information about the FtMscLib online/offline programming is for and old version and not for the actual RoboPro 3.1.2 version. The FtMsclib is now integrated into the FtMscLib so the tester is not able to work.
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 16 Sep 2011, 20:26
von hefeteig
Thank you,
so it's not me, but the new Version of Robopro.
Does someone have an alternative for the win xp program hyperterminal?
win 7 don't have this helpfully program, but I think I need it.
Hefeteig
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 16 Sep 2011, 23:42
von vleeuwen
On Google you can find free terminal emulators.
For example Putty (if this one still exist).
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 16 Sep 2011, 23:47
von vleeuwen
Maybe the next item will help you!
After a search with the keyword "RoboTxTest" on this forum I found:
by Janosch Kuffner03.05.2011, 09:54 Forum: Kontakt mit fischertechnikTopic: Robo TX Controller TestReplies: 11Views: 533
Re: Robo TX Controller Test
Hello, the newest version of the RoboTxTest software including the current ftMscLib.dll file can be downloaded using the following link:
http://www.fischer.de/ftBeta/RoboTxTest_FW1_24.zip
This version works with the ROBO TX Controller Firmware ...
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 17 Sep 2011, 10:59
von Ad2
I use robotxtest with fw 1.24, that works. Putty still exists and also realterm may be useful.
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 17 Sep 2011, 18:04
von hefeteig
I have no idea, but also this RoboTXTest doesn't work with on my computer on the one hand it could be win 7 on the offer it's the new RoboPro.
However, the documentation of the FT Website say you can use Yartago, can I also you CodeBlocks?
And do I need the RoboTXtest really or does it works without it?
Sorry for my many questions, I havn't much experience the this parts of the computer.
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 17 Sep 2011, 18:14
von UMueller
Hallo,
Du erzählst leider nicht welches Win7 Du einsetzt.
RoboTxTest läuft bei mir mit Vista 32bit, nicht aber mit Win7/64bit.
Die beiliegende ftMscLib.DLL scheint nur mit dem RoboTxTest zu laufen.
Mit meinem Pendant ftPanel50 läuft es nicht, da einige Schnittstellen nicht mehr vorhanden sind.
Eine Doku für das neue ftMscLib habe ich noch nicht gefunden. Also lieber nicht.
Wenn vorhanden besser mit einem alten Robo Interface arbeiten.
Gruß Ulrich Müller
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 17 Sep 2011, 18:37
von hefeteig
Danke
für deine Information ich benutze tatsächlich Windows 64 bit, aber brauch ich den roboTxTest.exe überhaupt?
Oder geht das auch ohne, so wie ich das verstanden habe ist das eben nur ein test.
Ich will aber eigene anwendugen schreiben können, dafür brauch ich einen compiler geht da auch codeblocks?
Gruß Hefeteig
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 17 Sep 2011, 19:03
von UMueller
Hallo,
zum Schreiben von eigenem (C++, C# ...) Code brauchst Du erstmal einen Zugriff auf den TX Controller.
Das geschah bei den 2.Versionen von RoboPro über die ftMscLib.DLL und dann weiter mit darauf aufsetzenden Schichten. Das funktioniert jetzt aber nicht mehr.
Mit dem freien Programmieren auf Win7/64bit ist es also erstmal nichts.
Das freie Programmieren auf 64bit Systemen von Robo Interfaces geht aber (z.B. C# und darunterliegenden Libs).
Gruß Ulrich Müller
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 17 Sep 2011, 19:15
von hefeteig
Das ist ja richtig blöd.
UMueller hat geschrieben:
zum Schreiben von eigenem (C++, C# ...) Code brauchst Du erstmal einen Zugriff auf den TX Controller.
Das geschah bei den 2.Versionen von RoboPro über die ftMscLib.DLL und dann weiter mit darauf aufsetzenden Schichten. Das funktioniert jetzt aber nicht mehr.
Mit dem freien Programmieren auf Win7/64bit ist es also erstmal nichts.
Das freie Programmieren auf 64bit Systemen von Robo Interfaces geht aber (z.B. C# und darunterliegenden Libs)
Wenn ich das richtig verstanden habe, so kann ich also nur das Robo Interface mit anderen Programmiersprachen als mit RoboPro programmieren,
Oder gehts auch mit dem TX aber nicht auf Win 7/64bit sondern mit Windows XP?
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 17 Sep 2011, 19:37
von UMueller
Hallo,
ich habe ein Vista 32bit System mit RoboPro v2.1.4.2 und TX Controller mit Firmware v1.18 (wie man den Firmwarestand auf v1.18 zuücksetzt siehe
http://www.ftcomputing.de/fishdllstx.htm )
und verschiedenene Programmiersysteme (z.B. Processing, Python, BlueJ(Java für Einsteiger), Scratch, C#2005...2010 und VB2005...2010, die laufen da alle sehr zufriedenstellend auf Basis der ftMscLib.DLL von 2009 und darauf aufbauend umFish50.DLL und FishFaTX.DLL (siehe gleiche Seite).
Auf Win XP lief das meiste auch. Z.Zt. habe ich aber kein Win XP System (es könnte sein, dass ServicePack 3 Probleme macht, ich habe es aber nicht verifiziert).
Gruß Ulrich Müller
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 17 Sep 2011, 19:51
von hefeteig
Vielen Dank nun weiß ich wenigstens unter welchen Voraussetzungen es überhaupt geht.
Gruß Hefeteig
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 20 Sep 2011, 17:07
von hefeteig
Ich habs jetzt geschaft ein C-Programm auf den roboTX zu laden und es funktioniert auch.
Der hacken bis jetzt jedoch ist, das ich den TX nicht im online Betrieb mit dem PC ansteuern kann, ich hab was von einer TransferArea gehört,
aber ich weiß nicht wie ich die zum laufen kreige und was das eigendlich ist.
Wie geht das jetzt mit der Real-time Steuerung über PC?
Gruß Hefeteig
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 20 Sep 2011, 17:44
von Ad2
Hi,
I don't know what you did but it is either-or. If you have a C program that you (after compilation) downloaded to the TX and started it, you are in off-line mode. The only communication you should have (but AFAIK currently do not have) is the Bluetooth communication with other TXs. If however you have written a PC program (with umfish or ftmsclib or whatever) that runs on your PC, then you are in online mode and nothing gets downloaded to the TX. In this case the PC takes over the control of the TX. The mechanism behing this is indeed the TransferArea. This is a piece of memory that exists both on the PC and on the TX. When the transfer thread is started it regularly copies data from the PC area to the TX and vice versa. Typically the output data in the TA_OUTPUT structure gets copied to the TX and in response the TX sends back the TA_INPUT structure which is then copied into the transfer area of the PC.
Re: Grundsätze zum FT programmieren mit C++
Verfasst: 20 Sep 2011, 17:54
von vleeuwen
In the PC Programming ROBO-TXC 1.2 - 2,16 MB
http://www.fischertechnik.de/ResourceIm ... x?raid=406
you will find two manuals (in German) about the structure of the TA and some predefined operation on it.