Jump to content
OMRON Forums

Motor control questions: brakes, measuring current & torque, amplifier control


erikj

Recommended Posts

Hi DT Support,

 

I have a few questions regarding motor control and status functions. I have searched through the documentation, including the Turbo-PMAC manual, but am still confused on a few issues. Keep in mind that I don't have a lot of Turbo PMAC experience to apply to these questions for PPMAC:

 

1. Is there any kind of direct support for controlling a brake on a motor (e.g., controlling whether the brakes are engaged or not when opening the servo-loop)? The only thing I could find is a discussion about setting Motor[x].pBrakeOut to the address of a brake-output register, and setting the Motor[x].BrakeOnDelay setting, but no discussion of how to control a brake.

 

2. Is there a way to read the amount of current being applied to a motor at any given time?

 

3. Is there a way to read the current torque produced by a motor, or a simple way to calculate it based on how much current is being applied and knowledge of the motor specifics?

 

4. Is there a way to directly control the power state of an amplifier (e.g., turn the amplifier output on/off)? I have read the discussions of the kill and disable commands and see that they open the servo loop and set the amplifier enable to off, but it also mentions that bias values (voltages?) are still applied. Short of disabling the power input to the amplifier, is there a way to ensure no voltage out of the amp?

 

These functions have been used by members of our design team on previous projects with other motion control HW/SW and they would like to see the same functionality here.

 

Finally, is there any documentation on the various data structures used for PPMAC? I have seen the training slide that discusses this and I have used the pop-up selectors in the IDE, but that only tells you the name of the data structure members. Their meaning and proper use is not always clear or intuitive (at least to me :-)).

 

Thanks in advance for your help,

 

Erik

 

 

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

I'm not from DT, but here is some advice.

 

How are your motors/drives configured? Are you doing torque command from a axis card and/or Macro, or are you having the PMAC close the current loop and commutate the motor? I don't know as if this is documented, but motor[].iq seems to be the torque command (going from memory) when in torque mode. If you're commanding torque and there isn't an amp error this should be fairly accurate representation.

 

If the brake is on a PPMAC address you should be able to assign a ptr var to it to set it to 1 or 0. I am not sure but I would think that the PMAC software would override this every RTI (or servo cycle?) while brake address is assigned. You might have to assign the pointer to zero if you want to take control of your brake. Of course, why would you do this?

 

If you want to enable an individual motor/amp do "#1 j/" and "#1 k" commands. If you want to enable or disable the whole C.S. do "&1 enable" and "&1 disable" (for C.S. 1 that is). I believe the bias voltages you are referring to are just to adjust the DAQ such that the motor sees zero torque, its a calibration thing, don't worry about it if its set properly. "#1 out 0" will enable the amp but request zero torque from the motor and leave the motor in open loop mode. I wouldn't rely on this software if safety is a concern, always use interlocks for this.

 

I too wouldn't mind seeing better documentation on the data structures. Personally I would prefer the saved data structures to be in the same document as the "non saved" ones, but having a complete list somewhere would help me out alot. BTW, the help files in the IDE are pretty handy for the things that are in there. I find myself using the popup help alot, but it isn't always available or complete.

 

KEJR

Link to comment
Share on other sites

Hi KEJR,

 

Thanks very much for your reply. Let me give you some background on my application and then I will answer/comment on your points and questions.

 

Background: We have designed a distributed control system using component-based software to be used to control a telescope and its instrumentation. We are in the process of designing standard motion control SW components for the control system that can be used to control the positioning of optics and other components within the instruments. These motion control components provide an abstraction layer between the user and the underlying motion control hardware. We can, in principle, support several different types of motion control hardware using these components and maintain a standard motion control interface throughout our system. I am writing the software layer that interfaces these higher level components to the Delta Tau hardware and am attempting to provide functionality based on a relatively generic interface (open servo loop, close servo loop, move to a position, park, index, etc.). The interface includes the ability to control the power on/off state of the amplifier, control the brakes, measure the current and torque being applied to the motor, which is the genesis of my questions. These are standard functions our team has used on previous projects with other motion control hardware and software.

 

Now to your questions and comments:

 

Regarding the configuration of our motors and drives: The groups designing the instruments have not yet specifed their particular motors. For development purposes I have a setup in the lab using a Power PMAC and DT PWM amplifiers to drive brushless DC servo motors from KollMorgen. I am using the PPMAC to do the commutation as well as the servo control. Our particular motors do not have brakes, but I need to understand how to implement that functionality in any case.

 

I understand about enabling/disabling the motors and amps as you discuss and have already used these functions to implement parts of my interface. However, these functions don't seem to be the same as controlling the power on/off state of an amplifier. Perhaps it cannot be done for a DT system, short of using a programmable power supply to the amp.

 

I will look at the motor[].iq and other related variables to see what I can find regarding torque and current.

 

Thanks again for your reply and help.

 

Erik

 

 

 

 

Link to comment
Share on other sites

Erik:

 

Our script for automatically updating the manual files on the forum broke, and did not post the latest revisions for the manuals that came out with the newest firmware. We should have them posted by tomorrow. My apologies for the confusion.

 

A new manual chapter will have 100 pages of documentation on "status" elements -- ones you don't usually write to (and often cannot), but can provide much useful information for the user.

 

1. There are several aspects to brake control. One is the hardware aspect, which is pretty specific to the brake. Somehow, you have to get from the digital output that you select on the PMAC system to the signal that actually turns the brake on (engaged) and off (disengaged). Usually you will not be able to do this directly, and so will need something like a relay in between. Almost always, you will want an "active off" brake that requires power to disengage, so it will automatically engage on a system failure.

 

Next is the issue of how to control the brake from software. Increasingly people want this as automatic as possible, so we have added a firmware feature to do this in the Power PMAC. Motor[x].pBrakeOut and Motor[x].BrakeOutBit allow you to specify which digital output you want to use for the brake control. Motor[x].BrakeOffDelay specifies the time from enabling the amplifier until the brake is released, giving the servo time to establish full control of the motor. Motor[x].BrakeOnDelay specifies the time before disabling the amplifier after engaging the brake in a "delayed disable" (Motor "dkill" command or CS "ddisable" command) to give the brake time to engage fully.

 

There is a new section in the User's Manual "Safety" chapter that explains this fully.

 

 

 

2 & 3.) For motor torque/current, there is Motor[x].IqCmd (the commanded torque-producing current value from the servo), and if you are closing the current loop in direct-PWM mode, Motor[x].IqMeas for the actual torque-producing current value.

 

4.) All serious commercial servo amplifiers have an "amplifier enable" digital input. If this is in the "disable" state, the amplifier should not output anything regardless of what the input command level is. Controlling the amplifier enable signal automatically from the PMAC is a standard part of the firmware, and it is very important that you use this. Enabling a PMAC motor (open-loop or closed-loop) automatically sets the specified amplifier-enable output bit to 1, and disabling the motor automatically sets it to 0. I really don't know of anyone who drops the power input to their amps just to disable them.

 

We also set the command output level to zero as best we can as extra protection. The reason we digitally add in the "DacBias" term even when the amplifier is enabled is to permit you to compensate for offsets in our outputs and/or the amplifier inputs to get an effective zero command -- it's really the digital equivalent of an offset pot.

 

Curt

Link to comment
Share on other sites

Hi Erik,

Please read my response below each question:

1. Is there any kind of direct support for controlling a brake on a motor (e.g., controlling whether the brakes are engaged or not when opening the servo-loop)? The only thing I could find is a discussion about setting Motor[x].pBrakeOut to the address of a brake-output register, and setting the Motor[x].BrakeOnDelay setting, but no discussion of how to control a brake.

Power PMAC firmware has automatic brake control of a motor built-in.

By pointing the Motor[x].pBrakeOut to the output register which is connected to the motor brake circuit and setting Motor[x].BrakeOutBit to correct bit controlling the brake you can have the firmware automatically engage and disengage your the brake for the motor. The register Motor[x].BrakeOffDelay controls how many milliseconds after closing the servo loop it should release the brake and Motor[x].BrakeOnDelay controls how many milliseconds the brake should be engaged before killing the servo control (this is only true if a delayed kill command is issued, in all other cases [faults] the brake will engage as the servo is killed)

 

2. Is there a way to read the amount of current being applied to a motor at any given time?

The amount of current being commanded to motor can be read through Motor[x].IqCmd which is in the same units as your I2T calculations and Motor[x].MaxDac and Motor[x].I2TSet values. Motor[x].IqMeas will return the amount of current measured in case of a Direct PWM control of a motor where phase currents are measured and read back through ADCs. Note that for brushless motors, there is no direct current so the value for Motor[x].IdCmd and Motor[x].IdMeas are zero. In case of an AC-Induction motor, the overall current is equal to SQRT(Iq^2+Id^2)

 

 

3. Is there a way to read the current torque produced by a motor, or a simple way to calculate it based on how much current is being applied and knowledge of the motor specifics?

If you have the current applied to the motor and motor torque constant from the manufacturer, you can get a close estimate of torque output of the motor.

 

4. Is there a way to directly control the power state of an amplifier (e.g., turn the amplifier output on/off)? I have read the discussions of the kill and disable commands and see that they open the servo loop and set the amplifier enable to off, but it also mentions that bias values (voltages?) are still applied. Short of disabling the power input to the amplifier, is there a way to ensure no voltage out of the amp?

Once the motor is killed a zero command is being written to motor output (in case of sinusoidal commutation zero command on both DACs and in case of direct PWM, a zero command on all 3 PWM outputs). The bias values which are applied are only on current feedback readings and they won't affect the outputs.

 

These functions have been used by members of our design team on previous projects with other motion control HW/SW and they would like to see the same functionality here.

 

Finally, is there any documentation on the various data structures used for PPMAC? I have seen the training slide that discusses this and I have used the pop-up selectors in the IDE, but that only tells you the name of the data structure members. Their meaning and proper use is not always clear or intuitive (at least to me :-)).

If you type in any structure name in terminal window and hit F1, this will bring up the IDE help which has full manual description of the structure and its units/meaning/syntax.

 

Regards,

 

Link to comment
Share on other sites

  • 1 year later...
2. Is there a way to read the amount of current being applied to a motor at any given time?

The amount of current being commanded to motor can be read through Motor[x].IqCmd which is in the same units as your I2T calculations and Motor[x].MaxDac and Motor[x].I2TSet values. Motor[x].IqMeas will return the amount of current measured in case of a Direct PWM control of a motor where phase currents are measured and read back through ADCs. Note that for brushless motors, there is no direct current so the value for Motor[x].IdCmd and Motor[x].IdMeas are zero. In case of an AC-Induction motor, the overall current is equal to SQRT(Iq^2+Id^2)

 

I am using a PMAC Geobrick controller with brushless motors. How can I monitor the commanded and measured current with a brushless motor?

Link to comment
Share on other sites

In the Turbo PMAC, you can get at these with M-variables. Mxx75 and Mxx76 are the suggested M-variables for actual quadrature and direct current, respectively. Commanded quadrature current is the servo output, suggested Mxx79, and the commanded direct current is Ixx77.
Link to comment
Share on other sites

  • 11 months later...

Hello all,

about question 4. of Erik:

I am doing config test right now with stepper motor control. I am using AmpEnable feature. Sorry if my question has an obvious answer as I am just beginning using PowerPMAC ;-)

Actually it works as I espect for the start of the motion after a "kill" state. AmpEnable is activated and motor moves. Ok but my problem is at the end of the motion: Motor stops. Not absolutely actually as a few steps left or right come out at end point, probably as control loop is still closed. Anyway that is not my exact problem. What I would like is that when motion ends, AmpEnable is automatically set to OFF. I don't want to turn it OFF by programmation or manually with "k" or "Gate3[0].Chan[0].AmpEna=0". Anyone can tell me the config to apply for this ?

 

Thanks

PV

Link to comment
Share on other sites

There is no automatic feature in PPmac to kill a motor at the end of a move. There are several reasons for this, one reason would be that motion programs require all motors in the CS (Coordinate System) to be in closed loop state to execute so if one motor in the CS stops while others are moved by the program it can not be killed. Also servo motors would not like this feature.

 

Even users like yourself who are using stepper motors and eventually the NSLSII system will not usually need to do this. If the stepper is commanded as an open loop system then once the trajectory generator has finished no more commands will go to the motor. If you are using a feedback and working more like a closed loop motor then you can decide with the a position loop deadband how much error to allow from the encoder until the control loop tries to correct.

 

If none of this satisfies you then from a PLC program you can look at a motor's or a CS's desired velocity zero and/or in-position and/or timer enabled status bits to decide when the PLC would kill the motor.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...