Khal_USL Posted June 26 Share Posted June 26 Hi I have a Stober motor and Drive Controller that I want to control via EtherCAT from a PowerPMAC UMAC in "Cyclic synchronous velocity mode". I got the motor working fine using the Stober DriveControlSuite software (I can jog the motor and get proper feedback) and I created the needed ESI files for the controller to be used in the PowerPmac IDE. On the PMAC side I have added the device to the EtherCAT topology and all correct PDOs are there and the EtherCAT Master can be activated without any issues. Then I added a new motor to the project and set it up to have "Cyclic Velocity" as Control Type and set the PDO sent to the drive controller to 9 which corresponds to "Cyclic synchronous velocity mode". For the Hardware Configuration I've set the following: When I get to the Basic Tunning step The motor will get enabled and disabled few times without actually moving. Then I get an error message that tunning failed. If I try to run the motor manually via jog commands I just get following error and the target velocity received by the controller is "65536000 inc/s" regardless of the jog speed or jog direction. Is there any other setup steps or settings I'm missing to get this working? I've also tried setting the motor in Cyclic position mode and I'm getting similar behaviour with the target position being "-59215697 inc". Quote Link to comment Share on other sites More sharing options...
MoMo Posted June 26 Share Posted June 26 (edited) If you want to use CSV mode to control EtherCAT motors, you need to pay attention to the following points: ①The EtherCAT synchronization period is at least 500us ②Make sure the motor driver is working in velocity mode, i.e. 0x6060=9 ③The torque limit and maximum speed limit of the motor drive are all set correctly ④Some brands of motors need to be shielded for positive and negative limits For CSP mode, or CSV mode, the PMAC will only issue enable commands and position or velocity commands, and if the parameters in the motor drive are incorrect, or if they are overridden to incorrect values during the activation of the Ecat network, the motor will not operate normally. As a simple example, if you have 6060 in your PDO but you don't assign it a value, 6060 will be flashed to 0 when the ECAT network is activated. Similarly, there is a maximum torque limit, as well as a velocity limit. Edited June 26 by MoMo Quote Link to comment Share on other sites More sharing options...
Khal_USL Posted June 27 Author Share Posted June 27 Hi MoMo, Thanks for your reply. I have an init command that sets 0x6060 to 9 in the Ecat slave settings, and I'm also setting the corrosponding mapped ECAT variable to 9. And I can see it is set correctly in the controller software. I've also set the JogTa and JogTs values to be very slow acceleration (0.1 mu per sec2 and 0.1 mu per sec3). I've plotted the data in the PMAC IDE and the Stober DriveControllerSuite and the PMAC is always sending a very high demanded velocity regardless of the jog speed setting and even when just enabling the motor with a j/ commad. Quote Link to comment Share on other sites More sharing options...
MoMo Posted June 28 Share Posted June 28 17 hours ago, Khal_USL said: Hi MoMo, Thanks for your reply. I have an init command that sets 0x6060 to 9 in the Ecat slave settings, and I'm also setting the corrosponding mapped ECAT variable to 9. And I can see it is set correctly in the controller software. I've also set the JogTa and JogTs values to be very slow acceleration (0.1 mu per sec2 and 0.1 mu per sec3). I've plotted the data in the PMAC IDE and the Stober DriveControllerSuite and the PMAC is always sending a very high demanded velocity regardless of the jog speed setting and even when just enabling the motor with a j/ commad. If the motor is in CSV mode, the position loop of the motor needs to be tuned in PPMAC to be controlled using jog commands. You can do an open-loop test in the tuning tool, and if the open-loop test curve is normal, your basic settings are correct. Quote Link to comment Share on other sites More sharing options...
Khal_USL Posted June 28 Author Share Posted June 28 Hi MoMo, I can move the motor using the open loop test in the tuning tool and also using the out commands. However, when using out commands if I change the value by more than 3-5% I get the same error on the drive. Quote Link to comment Share on other sites More sharing options...
MoMo Posted June 29 Share Posted June 29 According to your description, if the open-loop command is given, the motor can be moved. I think the PMAC settings may be correct. The problem may lie in your driver-related parameter settings. You can check if the Motor[].DacShift setting is correct, it should be set to 16. Quote Link to comment Share on other sites More sharing options...
Khal_USL Posted July 1 Author Share Posted July 1 Hi MoMo Thanks again for all your help. Changing DacShift seems to have fixed the issue with the excessive jump error I was getting. I have a question regarding speed scaling, after setting the DacShift to 16 the target velocity is now limited to +-32767 mu/sec, which is very low for the scaling used in the drive controller. Is there a way to change the scaling on the PMAC side or is it better to change it on the Drive controller side? Also while looking at the Software Refrernce Manual I've seen a couple of elements that need to be set to ECAT addresses (pAccOut and pVelOut) Is there a list of all the parameters that need to be set for an EtherCAT motor to work in CSV? Quote Link to comment Share on other sites More sharing options...
MoMo Posted July 1 Share Posted July 1 I can only use the Omron G5 driver as an example. In the G5 drive the target speed is 0x60FF and its unit is Command units/s, and it is an INT32 number. So for Omron G5 servo DacShift=0, this will reach the maximum value. I personally think your problem is due to your drive settings. There is no problem with the settings on PMAC. It should be that your drive has a maximum speed limit. Quote Link to comment Share on other sites More sharing options...
Khal_USL Posted July 1 Author Share Posted July 1 Hi MoMo, The driver is expecting a 32 bit DINT value for the target velocity and the PDO shows that the value is 32 bit, and the speed limit of 32767 is applied on the PMAC side (No matter what value of JogSpeed I set the maximum the PMAC sends is +-32767). Why do I need to apply the bit shift using the DacShift when both devices are expecting a 32 bit value? The Drive Controller does have a speed limit but the 32767 being sent by the PMAC is less than 0.02% of the set value. There are no settings in the drive controller that would affect what the PMAC is sending. And I can change the scaling on the drive to make the 32767 value match the motor top speed but that means losing fine speed control. Quote Link to comment Share on other sites More sharing options...
MoMo Posted July 1 Share Posted July 1 (edited) PMAC will set DacShift=0 by default, which means that PMAC will store the output value in the high 16bits. Therefore, the corresponding value in the actual PDO of +-32768 is +-2147483647. If DacShift=0 and MaxDac=32767, can your motor receive a speed as fast as +-2147483647? If not, you should adjust your MaxDac. According to what you said, 0.002%, I think DacShfit=0, MaxDac=24998. If you can use the Out100 command without activating EtherCAT, make sure your PDO gets the maximum speed value. In addition, there are maximum current and maximum acceleration limits in the driver. If your acceleration is too high, PPMAC may follow the error alarm, or the driver may alarm. In CSV mode, position loop tuning must be done in PMAC. In addition, using CSV mode in EtherCAT is not a wise choice. Its control effect will be inferior to CSP mode due to the delay of the EtherCAT communication cycle. Edited July 1 by MoMo Quote Link to comment Share on other sites More sharing options...
Khal_USL Posted July 1 Author Share Posted July 1 I think I found the problem. The default Position loop gains were too aggressive (Especially the Velocity feed forward) they were causing a massive jump in the commanded velocity whenever I tried to move the motor. By detuning the position loop I'm getting a better response from the motor and I can control it without any issues at the full speed range. Quote Link to comment Share on other sites More sharing options...
MoMo Posted July 1 Share Posted July 1 (edited) 49 minutes ago, Khal_USL said: I think I found the problem. The default Position loop gains were too aggressive (Especially the Velocity feed forward) they were causing a massive jump in the commanded velocity whenever I tried to move the motor. By detuning the position loop I'm getting a better response from the motor and I can control it without any issues at the full speed range. All I can say is that generally when using EtherCAT, you will not choose CSV, usually CSP, which will give you better control. Unless there are some special circumstances, such as the need to use a second sensor for fully closed-loop control. For CSV mode, the motor needs to be tuned in PPMAC, the main parameters are Kp and Kvff. If there are no special circumstances, I really do not recommend you to use CSV mode. Edited July 1 by MoMo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.