loading
 
Interfacing with TwinCAT
keith from Germany  [1 posts]
12 year
Hi, I was wondering if anyone has tried using RoboRealm with TwinCAT before.

TwinCAT is a powerful software from the company Backhoff Automation that runs on windows.

I would like to send the image pixels and also the coordinates of a moving object on a 2D plane over to TwinCAT.

I know that TwinCAT uses ADS for communication and with ADS TwinCAT can communicate with C,C#,C++

One method I could think of would be: RoboRealm ---> C# ---> TwinCAT

Any Idea or suggestion would be great :)
Thanks
Anonymous 12 year
Hi Keith,

That looks like quite a large package. To our knowledge noone has done this integration but it looks like with ADS this should be possible.

As we don't have a copy of that software you'd need to investigate ADS in great depth to see what is easiest to do. Would TwinCAT be the server or the client in this case, i.e. would TwinCAT request info from RR or would RR push information to TwinCAT.

Certainly if you can interface C# with TwinCAT and provide it with the information in a correct way that that's a good route. The RR C# API works well for your needs. Check to see what image format is needed for TwinCAT as that might require some image conversion before getting it from RR. Note that RR by defaults sends the image in uncompressed BGR format but can be told to send jpg, png, etc. too.

I'm assuming the passing of variables would be easier than the image ...so perhaps start there first.

STeven.

Anonymous 12 year
Hi Steven

really sorry for the late reply, I was on Holiday. Apparently its not so easy to link RR to TwinCAT directly. I will try to do it over C++ or C#. I dont need to send an image over as that would be too slow, i just want to send variables from RR to TwinCAT.

Would the C#Socket Extension (http://www.roborealm.com/help/Socket_Program.php) be what i am looking for if i want to send variables to C#?

Thanks
Keith Ong
Anonymous 12 year
Hi All,

I have managed to communicate Variables from RoboRealm to TwinCAT 2. My solution is an unconventional but simple transferring of data with C# as the middle man.


                     (API)                  (ADS)
RoboRealm ------------> C# -------------> TwinCAT 2


Any one keen on trying this out, i have attached my simple example with instruction.

The C# document could be improved so anyone kind enough please feel free to improve on it and upload it here :) thanks

PS: RoboRealm is a fantastic Program - cheers

RoboRealm to TwinCAT 2012-2-2 v5.zip
Anonymous 12 year
Keith,

Looks good! The API is probably the way to go with this ... The socket module could be used to send variables to an app but you'd have to create your own protocol (language) to communicate with that application. So using the API within your own development environment may be easier to work with for most programmers.

The socket module was really made to send very basic information (one or two variables) to a custom created receiver server that just functions to accept a single of few values.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index