-2

I am quite new to TwinCAT 3.I am trying to import a C code from Dymola to TwinCAT 3.I have gone through BECKHOFF manual but it didn't help much.

It would be grateful,if you could help me.

  • Hi Venkat. Did you have a particular problem? What did you try, how far did you get? What worked, what didn't? – Mark Lazarides Mar 31 '17 at 07:15
  • Hi lazz,i have created a simple C++ code in TwinCAT(CyClic IO) and executed it.Now my aim is to Import a C Code which was generated from Dymola. I am not sure how to get it. – venkat reddy Mar 31 '17 at 10:24
  • Hi lazz,i have created a simple C++ code in TwinCAT(CyClic IO) and executed it.Now my aim is to Import a C Code which was generated from Dymola. I am not quite sure how to get it.In TwinCAT insteasd of creating new C++ code,used existed item but but TcCom Object is empty.I am unable to create any instance.Is it correct procedure to get a C code to TwinCAT or do i need any wrapers to include the C code in TwinCAT.If so how to get it?Any ideas could be appreciated. – venkat reddy Mar 31 '17 at 10:31
  • My aim is to get a Dymola Code to TwinCAT. It can be either C code or through any wraper. – venkat reddy Mar 31 '17 at 10:38

1 Answers1

0

Ok, i understand. Beckhoff place restrictions on both how the code is put together and how much of the language / frameworks you can use. You can't use third party dlls either (so the wrapper idea is out). You can import modules that have been put together in the TwinCAT way.

To start with, you will need to port your code into TwinCAT C++ directly, following the method of putting modules together, as per the instructions you followed. How much you'll actually need to change depends on the complexity of the c code, of course. A lot is syntactically identical. You can Google "compile c code for c++" for the main differences.

I'm no expert on the c++ bit of TC3, but this is my understanding. All the best with it!

LazzMaTazz

Mark Lazarides
  • 366
  • 2
  • 13