# Cam Profile Master/Slave Axis Position for Output

**URL:** <https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656>\
**Category:** Mechatronics & Motion\
**Tags:** mapp-motion\
**Created:** [October 23, 2024, 9:44am UTC](https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656 "2024-10-23T09:44:45Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![arif.kaya](https://avatars.discourse-cdn.com/v4/letter/a/FF8800/32.png) [@arif.kaya](https://community.br-automation.com/u/arif.kaya)\
**Post date:** [October 23, 2024, 9:44am UTC](https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656/1 "2024-10-23T09:44:45Z")

</div>

Hello,

I am using a cam profile with mappMotion.

I want to give an output from an output module connected to X2X when the Master or Slave axis reaches a certain position.

I want to do this very precisely and quickly.

Which FB do you recommend me to use?

Do you recommend SPT for speed?

Thank you.

---

<div class="post-metadata">

**Author:** ![Martin.Schrott](https://avatars.discourse-cdn.com/v4/letter/m/FF8800/32.png) [@Martin.Schrott](https://community.br-automation.com/u/Martin.Schrott)\
**Post date:** [October 23, 2024, 10:34am UTC](https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656/2 "2024-10-23T10:34:40Z")

</div>

Hello @arif.kaya ,  
this function block should cover your use case:  
[MC\_DigitalCamSwitch](https://help.br-automation.com/#/en/6/motion%2Fmapp_motion%2Fmapp_axis%2Fprogrammierung%2Fkernbibliotheken%2Faxis%2Ffunktionsbausteine%2Fmc_digitalcamswitch%2Ffb_startpage.html)  
It uses SPT function blocks on the drive.  
The fastest outputs would be on a digital output plug-in card in the drive.

---

<div class="post-metadata">

**Author:** ![arif.kaya](https://avatars.discourse-cdn.com/v4/letter/a/FF8800/32.png) [@arif.kaya](https://community.br-automation.com/u/arif.kaya)\
**Post date:** [October 23, 2024, 12:02pm UTC](https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656/3 "2024-10-23T12:02:31Z")

</div>

Thanks Martin,  
So if I use this for a channel on an output module connected to X2X,  
how can I achieve this as quickly and accurately as possible?

---

<div class="post-metadata">

**Author:** ![Martin.Schrott](https://avatars.discourse-cdn.com/v4/letter/m/FF8800/32.png) [@Martin.Schrott](https://community.br-automation.com/u/Martin.Schrott)\
**Post date:** [October 23, 2024, 12:48pm UTC](https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656/4 "2024-10-23T12:48:38Z")

</div>

This function block can only set digital outputs on drive plug-in cards directly, not on X2X modules.  
You have to connect the output “Value” to the X2X IO channel.  
The signal is routed from the drive to the PLC and then to the X2X module.  
If that is not fast enough, a drive plug-in card can be used.  
The delay time can be compensated, so there is no velocity dependent deviation, when the axis is moving at constant velocity.  
“TrackOptions.OnCompensation/.OffCompensation”  
The drive firmware documentation has the info how to set the compensation times:  
[Compensation of the switching delay](https://help.br-automation.com/#/en/4/ncsoftware/acp10_drivefunctions/acopos_funktionsbausteine/camcon/kompensation_der_schaltverzogerung.html)

---

<div class="post-metadata">

**Author:** ![corne.geerts](https://avatars.discourse-cdn.com/v4/letter/c/FF8800/32.png) [@corne.geerts](https://community.br-automation.com/u/corne.geerts)\
**Post date:** [October 23, 2024, 1:35pm UTC](https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656/5 "2024-10-23T13:35:31Z")

</div>

Another possibility is the ASMcDcsPrecisionDigitalCamSwitch fub from the AsMcDcs library.  
[B&R Online Help](https://help.br-automation.com/#/en/4/libraries/asmcdcs/funktionsbausteine/fb_asmcdcsprecisiondigitalcamswitch/asmcdcsprecisiondigitalcamswitch.html)  
Together with X20DS4389 card very precise timing signals can be realized.  
In this case the position of the axis has to be sent to the plc with fub MC\_BR\_ReadCyclicPosition (McAxis library)  
[B&R Online Help](https://help.br-automation.com/#/en/4/motion%2Fmapp_motion%2Fprogrammierung%2Fbibliotheken%2Fcore%2Faxis%2Ffunktionsbausteine%2Fmc_br_readcyclicposition%2Ffb_br_readcycpos.html)

---

<div class="post-metadata">

**Author:** ![corne.geerts](https://avatars.discourse-cdn.com/v4/letter/c/FF8800/32.png) [@corne.geerts](https://community.br-automation.com/u/corne.geerts)\
**Post date:** [October 23, 2024, 1:38pm UTC](https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656/6 "2024-10-23T13:38:52Z")

</div>

The output signal can also be routed directly from Acopos to a digital output card when digital output card is placed in a powerlink bus coupler (X20BC0083). As I remember correctly the digital ouput card must be defined as packed.

---

<div class="post-metadata">

**Author:** ![arif.kaya](https://avatars.discourse-cdn.com/v4/letter/a/FF8800/32.png) [@arif.kaya](https://community.br-automation.com/u/arif.kaya)\
**Post date:** [October 24, 2024, 6:10am UTC](https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656/7 "2024-10-24T06:10:13Z")

</div>

Thanks for the info Martin,  
I installed the ‘8EAC0130.000-1’ card in the P3 Driver but I can’t physically do it right now.  
Can I try this in simulation?

---

<div class="post-metadata">

**Author:** ![Martin.Schrott](https://avatars.discourse-cdn.com/v4/letter/m/FF8800/32.png) [@Martin.Schrott](https://community.br-automation.com/u/Martin.Schrott)\
**Post date:** [October 24, 2024, 9:46am UTC](https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656/8 "2024-10-24T09:46:57Z")

</div>

Drive IO plug-in cards are not simulated, but you can set the output of the digital cam switch to a parameter ID like so:

 ![image](https://europe1.discourse-cdn.com/brcommunity/original/2X/f/f652d9c87874175f13fb2eea0656d1081d9dddbc.png)  
You can see the status of your digital signal on that parameter ID (either trace it with mapp Cockpit or read it with MC\_BR\_CyclicProcessParID\_AcpAx) and on the FB output “Value”.

When you start with tests on the HW change the “Output” parameters in the feature accordingly.

---

<div class="post-metadata">

**Author:** ![kovarj](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/kovarj/32/537_2.png) [@kovarj](https://community.br-automation.com/u/kovarj)\
**Post date:** [October 25, 2024, 6:03am UTC](https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656/9 "2024-10-25T06:03:56Z")

</div>

Hi @arif.kaya, is this topic solved? please marked the reply that helped you the most. Thanks.

---

<div class="post-metadata">

**Author:** ![arif.kaya](https://avatars.discourse-cdn.com/v4/letter/a/FF8800/32.png) [@arif.kaya](https://community.br-automation.com/u/arif.kaya)\
**Post date:** [October 25, 2024, 6:31am UTC](https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656/10 "2024-10-25T06:31:41Z")

</div>

Hi @kovarj,  
Both @Martin.Schrott and @corne.geerts gave me the right answers.  
I will try both methods.  
Thank you very much.

---

<div class="post-metadata">

**Author:** ![kovarj](https://dub1.discourse-cdn.com/brcommunity/user_avatar/community.br-automation.com/kovarj/32/537_2.png) [@kovarj](https://community.br-automation.com/u/kovarj)\
**Post date:** [October 25, 2024, 6:33am UTC](https://community.br-automation.com/t/cam-profile-master-slave-axis-position-for-output/4656/11 "2024-10-25T06:33:03Z")

</div>

thanks for feedback. Maybe in the future you can add here what was your final solution 🙂 thanks
