This only happens when I use the MC_BR_CamPrepare function… If I don’t execute it, I can transfer without any problem…
Therefore, I calculate the CAM and perform a MC_BR_CamPrepare. And everything runs fine, such as the CamIn/CamOut. (I’m nothing using the automat, I prefer to use the MC blocks…).
The only issue is that when I want to transfer new changes, the operation is canceled, as the image above. I press Help, and it leads to nowhere. The logger shows nothing as well.
It seems that some binding is done from the control to the servodrive, and after this binding is done, I cannot transfer anything… Just an assumption…
Is the functionblock executed in initup or cyclic.
It’s in the cyclic task; however, I only call and execute it after I calculate/recalculate the cam. After that I stop to call it.
You write that you can transfer if the Functionblock is not executed. What happens if you execute it during runtime, does it work then?
If I never execute it, I can transfer normally. Once I execute it, I can no longer transfer. I need to perform a warm/cold restart in order to be able to transfer again…
Can you reproduce this with a small sample in ARsim or only with the machine software and real plc
I never tried in the ARsim, only in the machine/real plc.
I just wanted to follow up and let you know that the issue is now resolved.
After reviewing the behavior more carefully, I realized that the root cause was not related to MC_BR_CamPrepare, but rather to MC_BR_CamSaveDataObject.
After calculating the CAM, I was calling MC_BR_CamSaveDataObject to store the CAM data, and only afterwards executing MC_BR_CamPrepare. That approach was mainly because I couldn’t find any examples or documentation on how to handle CAMs without relying exclusively on CamAutomat, so I assumed that saving would be required beforehand.
Once I removed the MC_BR_CamSaveDataObject step — since saving is not required before preparing the CAM, everything started working as expected, and I can now transfer it without any issues.
As a suggestion, I think it could be very helpful to have a short guideline or example in the help explaining how to work with CAMs without using CamAutomat. This would be especially valuable for users coming from Rockwell (proprietary MC Fbs) or Siemens (PlcOpen MC Fbs for S7 and proprietary MC fbs for Simotion), where CAM handling is often done programmatically without using a dedicated tool (CamAutomat).
Thanks for the support, and please let me know if you need any additional details from my side.
PS.: I would like to kindly ask for some expert explanation why it MC_BR_CamSaveDataObject does not let the transfer happen if once executed.
Hello,
i am currently busy with other topics, and can’t make a quick Test.
But also for this Functionblock “MC_BR_CamSaveDataObject” there should not be an influnece to the Transfer.
Can you post your Source Code where you call this Functionblock, so we can quick copy the code when we have time to test.
As far as i understood the DataModule for the CAM is generated.
Problem seems to be solved. But it is not clear if real cause of the transfer issue was found. From my perspective this would need deeper investigation of the project by support or R&D team.