cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Real Time C/C++ Application

bclapperton
Member

Real Time C/C++ Application

I have a customer who makes a motion controller with step and direction drive output. I am looking to see if they could change to ctrlX CORE and be able to use EtherCat instead. Typically their machines have 4 to 5 axes.

Their current system has a microcontroller which receives motion commands via an ethernet port. I don't know the protocol but it is probably their own. The microcontroller is programmed in C. The microcontroller runs with a very fast interrupt to generate individual steps. There is no operating system. 

I am thinking that they could port their C code using the C/C++ SDK and build it into a snap. The snap would need to run in real time synchronised to the EtherCat communications cycle. I have some questions about this...

Is it possible to do online debugging of the C/C++ snap?

Will there be a motion command to synchronously feed position commands to the axes? eg. WriteCyclicPosition. Or can this only be done through DataLayer real time access?

What is the minimum CtrlX configuration needed for this......

EtherCat Master - Yes

Motion - ? Or can the snap send position commands direct to the EtherCat Master?

PLC - Not required. But does this always have to be included?

Data Layer (Non Real Time)  - ? 

Data Layer (Real Time) ?

 

 

 

3 REPLIES 3
CodeShepherd
Community Moderator

Re: Real Time C/C++ Application

Is it possible to do online debugging of the C/C++ snap?
Yes. You can e.g. run your code in or connect to the running process with the visual studio code programming environment.

Will there be a motion command to synchronously feed position commands to the axes? eg. WriteCyclicPosition. Or can this only be done through DataLayer real time access?
When setting up an own motion kernel it would be the best way to write cyclically to the command value of the drive. Then no Rexroth motion package is needed.

What is the minimum ctrlX configuration needed for this......
Basic hardware with EtherCat app extension and the SDK (Software Development Kit)

PLC - Not required. But does this always have to be included?
No.

Data Layer (Non Real Time) - ?
Access via SDK (c/c++ functions) already possible.

Data Layer (Real Time) ?
Access via SDK (c/c++ functions) in preparation. Release planned for the 20.11 milestone. If more information, trainings or early test version are needed please get in touch with the application support team.

Tags (1)
matthew
New Poster

Re: Real Time C/C++ Application


@CodeShepherd wrote:

Will there be a motion command to synchronously feed position commands to the axes? eg. WriteCyclicPosition. Or can this only be done through DataLayer real time access?
When setting up an own motion kernel it would be the best way to write cyclically to the command value of the drive. Then no Rexroth motion package is needed.

 


@CodeShepherd, could you expand a litte on how to do this? Also, would you be able to point me in the direction of code level developer documentation?

 

Thanks!

CodeShepherd
Community Moderator

Re: Real Time C/C++ Application

For the functionality:
The drive puts its status and control word as well as actual and set position in the cyclic channel of the fieldbus. Now you write cyclically from your c++ app to this values and drive will follow in cyclic positioning mode.

Information can be found in the ctrlX SDK acutal downloadable via the collaboration room after registration. There are examples of how to read and write real time data in the system (com.boschrexroth.sdk.control-1.6.1\public\samples-cpp\datalayer.realtime\) and also EtherCat variables (com.boschrexroth.sdk.control-1.6.1\public\samples-cpp\datalayer.ecat.io\).

Tags (1)
Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist