FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
05-11-2023 03:44 PM
Hello,
I am using CtrlXCore RM23.03.
One axis is driven in Velocity Mode with MC_MoveVelocity. ("DriveVelMode" input of the FunctionBlock :=TRUE)
When we execute a MC_Stop :
- the axis is set back to Position control by the ctrlXCore : In my opinion it should be kept in vel mode.
- the commanded position calculated by the IPO of the ctrlXCore is not initialized to the Axis feedback position : In my opinion it should be automatically initialized to the current feedback af the axis as soon as the MC_Stop is done.
nb : In my application I can't use the function "ML_AxsSetIpoPosFromActPos" because the application is to screw with a dedicated torque a part. The torque could fluctuate so the position too. In this case "ML_AxsSetIpoPosFromActPos" will not give to me the result I expect because if the postion of the axis changes inbetween the MC_Stop and the ML_AxsSetIpoPosFromActPos are executed, the core will return a Fault.
05-12-2023 07:05 AM - edited 05-12-2023 07:05 AM
As cyclic position is the the standard for the ctrlX MOTION drive is set back to this mode as long as not especially commanded to do different.
Currently only ML_AxsPower, ML_AxsFixedStop and ML_AxsSetIpoPosFromActPos will sync the actual value to the interpolator.
I will take your remarks an discuss them with our R&D.
Could you tell us more about the error occurring while your tests of ML_AxsSetIpoPosFromActPos in your application?
05-15-2023 11:28 AM
Hi CodeSheperd,
Basically, this is a very simple application for clamping.
We use MC_Move Velocity in both directions with different torque limit (S-0-0092) according to direction.
I can simulate on my desk with my demo as follow:
- start MC_MoveVelocity (Drive in velocity mode) + C1300 (to avoid torque limit warning on Drive).
- hold motor shaft with hand (simulates clamping) => position command still equals to actual position.
- execute MC_Stop to cancel motion in progress (even if axis does not move anymore), followed by ML_AxsSetIpoPosFromActPos once MC_Stop.Done is True to update IPO position with actual axis position.
However, as soon as MC_Stop starts, Drive gets back in Position Control mode and "wants" to follow Position command sent by the Motion App. This induces a jump and Motion trips with following error since S-0-0047 is set to Motion App position (which was still increasing even in Continuous Motion and velocity mode...)
So, for this kind of application, we should keep Velocity Mode while MC_Stop is active to avoid such a jump or Motion App position would not need to be updated since Velocity is in use??
Also, using ML_AxsSetIpoPosFromActPos before MC_Stop is not possible too since this PLC_Open state is currently not in Standstill...
05-15-2023 01:07 PM
How about stopping with MC_MoveVelocity with 0 as command value, and then execute MC_Stop, then you will decelerate to standstill using velocity mode, and then you can change over to positioning without a command value jump?
05-15-2023 02:37 PM
Hello AndreasL,
I tried to do as you mentionned but it is still the same behavior.
As soon as MC_Stop is in use, position command (S-0-0047) recovers position sent by the App Motion and Drive changes to Position control...
As you can see on traces, jump is still there at MC_Stop:
For your information :
- Axis is already stopped (hold by hand in simulation) before using MC_Stop, and I soon as I release shaft, motor catches up positon command.
- Drive is setup in Modulo.
05-16-2023 09:38 AM
We are working on a solution for your topic that will be implemented in the patch for version 1.20 releasing end of July this year. There the actual position will be set to the interpolated position when changing the operation mode (e.g. velocity to position).
For an actual solution please try to use the MC_velocity with position mode setting, then you should not run into your problem. The drive will stay the whole time in position mode but can be commanded in velocity mode from the PLC.
05-16-2023 09:56 AM
Many thanks.
I understand your statement.
However, in case of clamping application, this is not working since position command carries on increasing while axis is at fixed position.
We already tried it but got a jump to catch up position command once part was removed (no more opposite torque). Goal is to keep actual motor position once movement (with velocity or position mode) is ended and part is removed (rotary system to screw a tap on a bottle). As soon as bottle must be removed, Drive is set first in AB but trips in alarm since actual position does not match with command and torque is still on.
This is why we expected using velocity mode to get rid of position command and keep motor at fixed position at the end of movement once MC_MoveVelocity was ended.
So now, let's wait July to make further tests 😉
05-19-2023 10:01 AM
As an adition, are you only switching the axis to AB without first commanding a stop command? Did you check suggested procedure in this post?
05-22-2023 12:10 PM
Hello CodeSheperd,
Yes, I've done few tests with sequence you described.
Unfortunately, this is not enough since behavior is a "bit random". I mean, sometimes with a shock and sometimes not, also sometimes with a Motion App fault and sometimes not.
I add in atatched 3 traces:
Test1 : no fault but we clearly see a jump at MC_Stop, position command is still zero once Modulo is overlapped and felt a shock on the shaft (seen on actual position)
Test2 : no fault, seems to be Ok according to trace but felt a shock on the shaft (seen on actual position)
Test3 : fault on Motion App and felt a shock on the shaft (seen on actual position)
05-24-2023 09:30 AM
Could you share with us the programming code of your command sequence so we can try to reproduce the behaviour? You can also send me a private message if code should not be accessible in the forum.
05-24-2023 11:40 AM
Hallo CodeShepherd,
Many thanks for your involvement.
Basically, sequence is done manually (I mean force / unforce commands by hand) as follow:
1 - CmdPower = true
2 - CmdJogP = true
3 - Hold motor shaft with hand
4 - CmdJogP = false
5 - CmdPower = false
6 - Unhold motor shaft with hand
I've added all needed files in attached (CtrlX Core App Data + PLC file + CtrlX I/O file). Just need to set Drive in rotary modulo scaling with modulo = 360°.
Danke 😉