koustubh_h Posted October 22, 2016 Share Posted October 22, 2016 I understand that with PMAC we can only close the position loop. The velocity loop is integrated inside the position loop. But if i wish to keep the position and velocity loop seperate, can i do it? My application demands the axes to move in position loop based on encoder error and then switch to pure rate loop where instead of encoder error i will get analog errors and i need to close the rate loop based to them. Please help. Link to comment Share on other sites More sharing options...
Clopedandle Posted October 25, 2016 Share Posted October 25, 2016 Can you clarify a bit regarding what you mean by "rate loop"? If I am not mistaken, if you do not want servo effort contributions from the velocity loop, you can set Motor[x].Servo.Kvfb = 0 and Motor[x].Servo.Kvifb = 0. Generally here you would also set Motor[x].Servo.Kvff = 0 and Motor[x].Servo.Kviff = 0 at the time time. You can also choose to use position command output only -- see page 298 of the PPMAC User's manual. It lists various different servo algorithms you can use. Link to comment Share on other sites More sharing options...
curtwilson Posted October 28, 2016 Share Posted October 28, 2016 If you set Motor[x].Servo.MaxPosErr to 0.0, you effectively disable the position loop while keeping the velocity loop active. I think this will provide the performance you are looking for. With this strategy, you will probably want to keep the velocity feedforward term Motor[x].Servo.Kvff non-zero -- this will provide the main driving force for the motor. You are still technically commanding positions in this mode, but allowing errors to build up in the position loop. PPMAC is still monitoring position following error for possible error trips in this mode, so you will probably want to disable this by setting Motor[x].FatalFeLimit to 0.0. You will have to be careful in switching back from "velocity mode" to "position mode", as a very large position error can build up in velocity mode. You may want to use the "jog^0" command before you set MaxPosErr to a non-zero value -- this causes PPMAC to swallow up the following error by slewing the command position to the present actual position. Link to comment Share on other sites More sharing options...
koustubh_h Posted November 5, 2016 Author Share Posted November 5, 2016 Thanks for the answers. Just to add more info, let me describe exactly the requirement. I've an axes which is a servo motor with resolver feedback and a load encoder. I m closing the loop with encoder and for a certain mode of operation there is a program which is running for the particular axes. Now, there is another mode which needs to be switched on the fly, when triggered, the rate loop (velocity) which it has generated during the program run should continue and then the speed should increase or decrease based on analog errors (+/-10V) being generated externally and fed to PMAC through ACC-28E. Earlier, we kept the native position loop running (with encoder feedback) and used a over-riding cascaded loop to correct the analog errors. Now, the requirement has changed and the expectation is that the axes should keep running in the other mode irrespective of whether the encoder feedback is coming or not. Hence, i thought of the rate loop logic. Link to comment Share on other sites More sharing options...
mbalentine Posted November 11, 2016 Share Posted November 11, 2016 This might be a little too simplistic, but have you considered changing out the position feedback device in response to whatever criteria you are using to switch between position / velocity mode? Your comments suggest you are already familiar with doing so. By this I mean to always treat your application as a position loop, but change from the encoder to your analog sensor (and back again) as needed. DT is somewhat unique in allowing this sort of flexibility while the axis is in motion. By integrating the analog signal in the ECT, you can use it to close position, while following whatever velocity is being measured. It might be more appropriate to use the integrated velocity (position) signal as a master command and superimpose it onto your axis command. In this case, you would not change the feedback device, but would command position in response to measured velocity. You'll likely want to change loop gains, etc and perhaps open or disable following error as needed. This does allow you to close the loop with an encoder for stiff and accurate response when (I presume) you are approaching a transition point, and then switch control (or position command) to an analog sensor while measuring or whatever the task is once you are within the transition threshold. I have not personally done this, but it is easy to see how you could approach a surface quickly using encoder feedback, then switch to an analog sensor and follow or map surface contours by commanding 'zero' motion (zero change in the analog position sensor/signal) in , say Y, while traversing in X. The idea being that the Y axis would indeed move as it maintains the analog sensor a constant distance from the surface. The encoder signal does not control the axis in this mode, but would provide the contour map data. I know this example does not match your application very well, but perhaps it is helpful. Link to comment Share on other sites More sharing options...
Recommended Posts