Using Visual C++
hi,everybody
weisheng2011-11-20 19:16:47
Comments
-
S visual c++ are also use to the programing ...
we use that , for rapid date use the new technology like xml that is supported by VC++
0 -
PCSDK is built using .NET technology. If you use C++ you need to have it as managed code.
But I don't see why you would want to do that? To do that you'd have to use a .NET version of VisualStudio and since that includes C# anyway there would be no benefit in doing a complex solution with C++???
John Wiberg2011-12-20 09:20:21John
Developer Center0 -
I want to do an visual servo experiment which include ABB robot and vision sensor (NDI Polaris Vicra).My PC link with vision sensor which use visual studio C++.this is the reason why I want to use Visual C++.0
-
Now just because you have some older dependencies to some C++ dll's you don't have to have the whole project as C++. Instead you will see that it's much much easier to call "older" C++ components from C#.
http://msdn.microsoft.com/en-us/library/ms235282.aspx
http://1code.codeplex.com/wikipage?title=Invoke%20Native%20C%2b%2b%20DLL%20from%20.NET#CLIWrapperSo I'd still recommend against it. Whenever possible it would be advisable to use C# instead of C++ since it just brings complexity without any given advantage.Regardless, you will need to use C# for the PCSDK, so you will need three components
1. the PCSDK stuff in C#
2. your old stuff in C++
3. a main app to bind them together.
If the main app should be in C# or C++/CLI is dependent on how much of the "new" code you are going to write is old stuff and how much is PCSDK stuff. If the old C++ stuff is in minority and PCSDK stuff is in majority - go with C# for the main app as well. But if the old C++ stuff is in majority and PCSDK stuff is in minority - go with C++/CLI for the main app.
To get you started on the complexity of the issue at hand here are a bunch of articles:
http://en.wikipedia.org/wiki/Managed_code
http://en.wikipedia.org/wiki/C%2B%2B/CLI
http://msdn.microsoft.com/en-us/library/85344whh.aspx
http://msdn.microsoft.com/en-us/library/ms379617(v=vs.80).aspx
http://msdn.microsoft.com/en-us/library/x0w2664k.aspx
There are also some books on the topic.
It's not as easy to do this properly as one would initially think.
Well, at least if you dislike interopability issues as much as I do...John
Developer Center0 -
I guess your setup is pretty much like mine. My system has 3 modules running on completely different language platforms: 1) AI - using Prolog 2) Vision system - using VC++ (not .NET) and 3) Robot - using RAPID.I just simply linked everything together with socket communication, in my case the AI is the client and other modules are the server. So, you just have to setup the socket messaging individually for each module. For the RAPID, look into:"Application manual - Robot communication and I/O control"However, I m not sure that the data transfer rate using this method is fast enough for your application or not. So, Let me know once you have tried it0
-
thanks for everyone's helpnow, I almost programed the code with VC++,such as write to rapid data,load the module into memory,save the module to a file,change the position within robot motion, etc.So, my program is just like the FlexPendant.thanks0
-
what i im doing is to write the robot interface in c# and calling it using c++ interop0 -
Visul C++ was first introduced to me when I was in College and based on his explanation this kind of program is good in doing commands but the very hassle thing performing this program is you have to enter any commands with yourself. Well, C++ is good I think this program commonly used some mobile phones nowadays. Correct me if I'm wrong, it is very much appreciated.
0 -
actually you can also use tinyxml to parse your xml and you there are even tools that can take your xml file and output as several languages including from xml to C++, C# and Java.
0 -
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings