Hi Mohsen,
Why don't you program using a PC based motion controller. One option is the RMP EtherCAT PC motion controller. The languages supported are C++, C#, and VB. NET. The API is called RapidCode, which is powerful and simple to use.
Here is a link if you want to learn more:
RMP EtherCAT PC motion controller: https://roboticsys.com/rmp-ethercat-motion-controller/
RapidCode API: https://rapidcode.roboticsys.com/