Jump to content
OMRON Forums

hannsx

Members
  • Posts

    102
  • Joined

  • Last visited

Posts posted by hannsx

  1. For the PWM-Frequency, I had it set to 30kHz, I think. I unfortunately won't be able to investigate that matter any further as I am not going to work on that experiment any more. However, I instructed my successor about it.

     

    It could be a consequence of the problem we had in tuning the current loop. And I did not retune the current loop after having changed the the pwm-frequency multiplicator. I think that is the explanation for this problem.

  2. Hi Eric, I am sorry for not having answered earlier. I just a minute ago found out what caused the problem when tuning the motors.

    It is the routine for setting the hold-current of the motor. It runs in the phase routine of motor[0]. When we turn it of, the current-loop tuning is much easier and draws a nice graph in response. That has been a big problem for me and I am happy that we finally solved that. On the other hand we have not had the time to test different pwm-frequency multiplier on the setup in question. I may not be able to report on that any more because I am leaving my current company and won't be able to work with the PowerBrick any more.

  3. Hi Eric,

    since I have your attention and you are the most knowledgeable man on these controllers, I would like to ask about the current-loop tuning.

    I did not find another thread about it. I am often not able do tune the current-loop of small stepper motors apropriately with the tuning tools. In these cases I just go with trial and error. However I realize that this is far from ideal. My guess has been that it might be due to high impedances and bad wiring. But I wonder if you know anything about that problem in general and solutions to it,

    best regards,

    hannsx

  4. Hi Eric, thank you. I never payed notice to that. So if I set the value to high I run into problems like that. So does the PowerBrick then actually try to accomodate for the the value I set and makes it cause electrical problems or does it kind of rollover into another value below 30kHz?
  5. Hi, I am operating a PowerBrickLV with 5/15A on all 8 Channels.

    I am trying to find the optimal setup for our experiment with 7 motors.

    I wanted to set different pwm-frequencies for the motors.

    When I leave the multiplier for the motor the same, but change it for other motors

    it affects the motor for which I have not changed it. Is that possible?

     

    This works fine for motor on Chan[2]:

     

    PowerBrick[0].Chan[0].PwmFreqMult = 1

    PowerBrick[0].Chan[1].PwmFreqMult = 1

    PowerBrick[0].Chan[2].PwmFreqMult = 1

    PowerBrick[0].Chan[3].PwmFreqMult = 1

    PowerBrick[1].Chan[0].PwmFreqMult = 1

    PowerBrick[1].Chan[1].PwmFreqMult = 1

    PowerBrick[1].Chan[2].PwmFreqMult = 1

    PowerBrick[1].Chan[3].PwmFreqMult = 1

     

    Now the same motor on Chan[2] doesn't work any more:

     

    PowerBrick[0].Chan[0].PwmFreqMult = 1

    PowerBrick[0].Chan[1].PwmFreqMult = 1

    PowerBrick[0].Chan[2].PwmFreqMult = 1

    PowerBrick[0].Chan[3].PwmFreqMult = 2

    PowerBrick[1].Chan[0].PwmFreqMult = 2

    PowerBrick[1].Chan[1].PwmFreqMult = 2

    PowerBrick[1].Chan[2].PwmFreqMult = 1

    PowerBrick[1].Chan[3].PwmFreqMult = 1

     

    Any ideas or explanations?

    Best,

    hannsx

  6. Hi, I found a problem that may bug other users as well and I wanted to share that issue. I have a project with 2 user-written phase routines and a CCISR.

     

    Out of no special reason I set up the usrcode.c-file like this:

     

    |phase routine 1

    |CCISR

    |phase routine 2

     

    When I wanted to declare a double-type variable I got the notice:

    "Double type is not allowed in this context" .

     

    I searched the manuals for explanations but could instead find examples which use double data-types. Turns out that all is fine when I change the order the routines to:

     

    |phase routine 1

    |phase routine 2

    |CCISR

     

    I know I am not allowed floating point math in the CCISR. But when I declare double variables there I do not even get an error - notice.

  7. Hi Eric, thank you for answering the Question. I think I stumbled upon the cause for my problem when the parameter for Gate3[0].Chan[2].EncCtrl is not being set properly at the project download. When I looked into the newest IDE-Manual out of interest I saw the recommendation for manual system setups to deactivate the download of the system.cfg-file in the project properties. I have not carefully tested it, but I suspect that has messed with some of my setups all along. Since I deactivated that property I have not experienced any 'mysterious' problems with values not being what I set up in my files.
  8. Hi, I wanted to ask how you calculate the Adress for the Gate3[0].HomeCapt[1] Register. My Problem ist that I just do not seem to get it right when I use it in the Interrupt Service Routine.

     

    Here is how I calculate it:

     

    int Gate3ZeroAdress;

    int *G3ZhomeCapt ;

     

    Gate3ZeroAdress = pshm -> OffsetGate3[0] ;

    G3ZhomeCapt = (int*)piom + ((Gate3ZeroAdress + 0x80 + 0x74) >> 2) ;

     

    0x80 Is the Offset for Chan[1]

    0x74 Is the Offset for HomeCapt

     

    The use of the Gate-Array structure

    volatile GateArray3 *MyFirstGate3IC;

    MyFirstGate3IC = GetGate3MemPtr(0);

    and consequently

    MyFirstGate3IC -> Chan[1].HomeCapt

    in the Interrupt Servo Routine clears the register and rearms it for the next Interrupt when I read that Register out.

     

    When I read out G3ZhomeCapt it does not rearm clear the register or rearms it. Can someone tell me why

    G3ZhomeCapt != MyFirstGate3IC ->Chan[1].HomeCapt ?

     

    Best regards,

    hannsx

  9. Hi, I operate a PowerPMAC BrickLV PBL8-H23-000-5E00V00. IDE version: 4.3.2.19. Firmware version: 2.3.2.5.

     

    I want to use the CCISR on the high flag from channel 2 and capture the position from that channel.

    I use the following commands to set up the CCISR:

    Gate3[0].Chan[1].CaptCtrl = 2 ;

    Gate3[0].Chan[1].CaptFlagChan = 1 ;

    Gate3[0].Chan[1].CaptFlagSel = 3 ;

    Gate3[0].Chan[1].TimerMode = 0 ;

    Gate3[0].IntCtrl = $00020000 ; //Unmasking position capture on channel 2 as source of CCISR

     

    I too have a phase_interrupt function on motor[0] controling holding current for my stepper motors. So my C-code looks like this:

     

    header.c

    ------------------------------------------------------------------------------------------------

    #ifdef __KERNEL__

    #include

    #else

    #define EXPORT_SYMBOL(x) // x

    #define KERN_ALERT

    #define printk printf

    #include

    #endif

    #include // Global Rt/Gp Externals and structures

    #include

     

    void CaptCompISR(void);

    EXPORT_SYMBOL(CaptCompISR);

     

    void user_phase( struct MotorData *Mptr);

    EXPORT_SYMBOL(user_phase);

    ------------------------------------------------------------------------------------------------

    ------------------------------------------------------------------------------------------------

     

     

    usercode.c

    ------------------------------------------------------------------------------------------------

    #include "usrcode.h"

     

    #define _PPScriptMode_

    #include "../Include/pp_proj.h"

     

    void user_phase( struct MotorData *Mptr){

     

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

     

    if(pshm->Motor[1].DesVel==0){

    // Stromeinstellungen Runtersetzen

    pshm->Motor[1].MaxDac = Ch1PeakCur * 28378 / Ch1MaxAdc;

    pshm->Motor[1].I2tSet = Ch1HoldCur * 28378 / Ch1MaxAdc;

    pshm->Motor[1].IdCmd = (pshm->Motor[1].I2tSet)/2;

    pshm->Motor[1].I2tTrip = ( pow((pshm->Motor[1].MaxDac),2) - pow((pshm->Motor[1].I2tSet),2) ) * Ch1TimeAtPeak;

    }

    else{

    // Stromeinstellungen hochsetzen

    pshm->Motor[1].MaxDac = Ch1PeakCur * 28378 / Ch1MaxAdc;

    pshm->Motor[1].I2tSet = Ch1ContCur * 28378 / Ch1MaxAdc;

    pshm->Motor[1].IdCmd = (pshm->Motor[1].I2tSet)/2;

    pshm->Motor[1].I2tTrip = ( pow((pshm->Motor[1].MaxDac),2) - pow((pshm->Motor[1].I2tSet),2) ) * Ch1TimeAtPeak; }

     

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    }

     

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    }

     

    void CaptCompISR(void) {

    //-----------------------------------------------//

    // Determine IO-Pointer Adresses //

    //-----------------------------------------------//

    int MyFirstGate3Adr = pshm -> OffsetGate3[0] ;

     

    volatile int *MyFirstGate3IntCtrl = NULL ; // InCtrl direct register pointer declaration

    MyFirstGate3IntCtrl = ( unsigned int * ) piom + ( ( MyFirstGate3Adr + 0x224 ) >> 2 ) ; // IntCtrl register adress calculation 4bytes Per Word

    //-----------------------------------------------//

    int *UshmIntCtrl_isr ;

    UshmIntCtrl_isr = (int *) pushm + 18 ;

    *UshmIntCtrl_isr = 84 ;

     

    }

    ------------------------------------------------------------------------------------------------

    ------------------------------------------------------------------------------------------------

     

    The phase-routine works without problems. However, when I enable the CCISR by entering {UserAlgo.CaptCompIntr=1} and trigger it by a position capturing event, my BrickLV crashes. I have only used a simple operation of writing a figure to a register which I can access in the watch-table to monitor the succesful execution of the CCISR. When I know that it works, I will use it to store the captured positions to an array in the ushm. I have made use of the CCISR two years ago and cannot remember any issues back then. I guess it might be caused by incomatible soft- and firmware or a known bug. I have not installed the newest soft- and hardware because I have run into issues several times with being able to open my legacy projects. I wanted to ask any reader to see if he sees an error in my CCISR setup,

    kind regards,

    hannsx

  10. I think I found the problem. For some reason PowerPMAC does accept me changing the value Gate3[0].Chan[0].EncCtrl from 3 to 7 at startup. When I then correct that, I can phase and jog in reversed direction. I searched for places I might mess with that parameter and set it to 7 again but I the search function does not come up with other instances of it. .... I have the same trouble with stepper motors, which is that PowerPMAC sometimes gives Motor[x].IdCmd the value 0.
  11. PowerBrickLV with 5/15A and 8 axes. Driving stage with brushless motors and using quadrature encoder signals for feedback.

     

    Hi,

    I wanted to reverse the jogging direction on my brushless motor.

    When I do that I am not able to establish the phase reference any more

    which worked fine before. I reversed the jogging direction according to

    the PowerBrickLV hardware reference manual, changing signs on

    Motor[x].PhaseOffset, Motor[x].PwmSf and changing PowerBrick[0].Chan[0].EncCtrl.

    Does anyone know a possible explanation or solution for this?

    Regards,

    hannsx

  12. When I turned to the support they pointed out that a bad adjustment of the phase-frequency to the biss-c encoder processing time may also cause some of my problems. Indeed I got rid of the wrong position offsets. However one Channel seems to be broken.
  13. PowerBrickLV, model-number: PBL8-H23-000-5E00V00

     

    I have some problems with biss-c some Channels on two of our PowerBricks.

    On the one PowerBrick it's the following:

    Channel 1: Random absolut position but readout of change in position.

    Channel 4: No Readout at all.

    Channels 5&8: Absolut position sometimes shows zero, sometimes shows correct value. Correct readout of change in position.

    Other Channels are ok.

     

    On the other PowerBrick the problems are:

    Channels 6&7: Absolut position sometimes shows zero, sometimes shows correct value. Correct readout of change in position.

    Other Channels are ok.

     

    Because I do not get the same problems on both PowerBricks I gues I can rule out a wrong setup. Therefore I conclude that there is a hardware-problem. How should I proceed?

  14. I have a question about the "four-guess" method:

     

    The manual says that it can adjust for external loads. It seems that it would be applicable where the "stepper-motor" method would fail. Is that correct?

    Is it also able to adjust for friction?

    Best regards,

    hannsx

  15. If phasing the motor manually works, you probably just need to increase the settings Motor[x].PhaseFindingDac and Motor[x].PhaseFindingTime.

     

    I suppose it is possible Motor[x]. AbsPhasePosOffset is set incorrectly. This is checked against the distance between the two locations the motor locked to in units of PhasePos. It is typically set to 2048/5 and if it the motor does not move far enough the phasing attempt will be considered a failure.

     

    Hi Eric Hotchkiss, I was going after my problems with the "stepper" phasing-search method with a brushless test motor not connected to any load. It would just not phase although I was able to phase it manually and jog it when I changed the sense of direction of commutation. So I thought it should work. After thoroughly going through everything bit by bit and reading up on the parameters I thought that something has to be wrong. I went back to the manual and read the line: "Try swapping two motor leads." In case it does not work. That was my remedy. In hindsight it is seems sensible that I had to change the sense of direction of commutation to be able to run the motor. Because that is what I achieved by swapping two leads. Before I assumed the algorithm would work that out for me.

  16. Serial encoder: Renishaw RESOLUTE RL36B VS 001C 05 V

    PowerBrickLV PBL8-H23-000-5E00V00

     

    So we have the Acc84B which enables us to the use Biss-C serial protocoll.

    We used it on a VoiceCoil and a Stepper Motor, maybe the VoiceCoil is more interesting as a drive.

    It is a MotiCont LVCM-038-038-02.

     

    These were my setup-files:

    1. pp_disable.txt:

    #*k

    &*A

    disable plc 0..31

    undefine all

    clear all buffers

     

    2.pp_startup.txt

    Sys.WpKey = $AAAAAAAA

    Sys.pAbortAll = 0

    Sys.MaxCoords = 8

    Sys.MaxMotors = 16

     

    Gate3[1].PhaseFreq = 30000.00

    Gate3[1].ServoClockDiv = 4

     

    Gate3[1].EncClockDiv = 4

    Sys.RtIntPeriod = 2

    Sys.ServoPeriod = 1000 * ( Gate3[1].ServoClockDiv + 1 ) / Gate3[0].PhaseFreq

    Sys.PhaseOverServoPeriod = 1 / ( Gate3[1].ServoClockDiv + 1 )

    Gate3[0].AdcAmpClockDiv = 4

     

    //Serial encoder setup elements

    Acc84B[1].Chan[2].SerialEncCmd = $2114A4

     

    Gate3[1].Chan[2].PwmFreqMult = 2

    PowerBrick[1].Chan[2].PackInData = 0 //

    PowerBrick[1].Chan[2].PackOutData = 0 //

    BrickLV.Chan[6].TwoPhaseMode = 0

    BrickLV.Chan[6].I2tWarnOnly = 0

     

    EncTable[7].Type = 1

    EncTable[7].pEnc = Acc84B[1].Chan[2].SerialEncDataA.a

    EncTable[7].index1 = 8

    EncTable[7].index2 = 8

    EncTable[7].ScaleFactor = 1/256

     

    enable plc 1

    //I omitted the setup of all all other motors and gate3[0] for simplicity

     

    3.Global Includes

    a. Global Definitions with variable definitions for motor power and motion

    global DcBusInput = 48

    global Mtr7DcVoltage = 48

    global Mtr7PhasingTime = 1000

    global Ch7MaxAdc = 33.85

    global Ch7PeakCur = 4.55

    global Ch7ContCur = 1.44

    global Ch7TimeAtPeak = 0.5

    global Mtr7MaxJogSpeed = 1000

    global Mtr7MaxAccel = 0.05

    global Mtr7MaxJerk = Mtr7MaxAccel

    global Mtr7JogSpeed = 0.5 * Mtr7MaxJogSpeed

    global Mtr7Accel = 0.5 * Mtr7MaxAccel

    global Mtr7Jerk = 0.5 * Mtr7MaxJerk

     

    b.Motor[7] Setup

     

    Motor[7].AbsPosFormat = $00082408

    Motor[7].HomeOffset = 0

    Motor[7].pAbsPos = Acc84B[1].Chan[2].SerialEncDataA.a

    Motor[7].AbsPosSf=1

    Motor[7].pLimits = PowerBrick[1].Chan[2].Status.a

    Gate3[1].Chan[2].EncCtrl=3

    Motor[7].pLimits = PowerBrick[1].Chan[2].Status.a

    Motor[7].AdcMask = $FFFC0000

    Motor[7].AmpFaultLevel = 1

    Motor[7].PhaseCtrl = 4

    Motor[7].PhaseMode = 3

    Motor[7].PhaseOffset = 512

    Motor[7].PhasePosSf = 0

    Motor[7].pAbsPhasePos = Sys.pushm

    Motor[7].PowerOnMode = 2

    Motor[7].PwmSf = 0.95 * 16384

    global Mtr7ScaleFactor = Motor[7].PosSf

    Motor[7].PhaseFound=1

    Motor[7].PhaseTableBias = 0

    Motor[7].pAmpFault = PowerBrick[1].Chan[2].Status.a

    Motor[7].MaxDac = Ch7PeakCur * 28378 / Ch7MaxAdc

    Motor[7].I2tSet= Ch7ContCur * 28378 / Ch7MaxAdc

    Motor[7].I2tTrip= ( pow(Motor[7].MaxDac,2) - pow(Motor[7].I2TSet,2) ) * Ch7TimeAtPeak

    Motor[7].IiGain= 0.0

    Motor[7].IpfGain = 3.0

    Motor[7].IpbGain= 0.0

    Motor[7].Servo.Kp = 0.4

    Motor[7].Servo.Kvfb = 0.05

    Motor[7].Servo.Kvifb = 0.85

    Motor[7].Servo.Ki = 0.004

    Motor[7].Servo.Kvff = 0.0

    Motor[7].Servo.Kviff = 0.95

    Motor[7].Servo.Kaff = 50

    Motor[7].Servo.Kfff = 75

    Motor[7].InPosBand=10

    Motor[7].Servo.BreakPosErr = 0

    Motor[7].Servo.Kbreak = 0.0

    Motor[7].servo.swzvint=1

    Motor[7].WarnFeLimit=200000

    Motor[7].FatalFeLimit=30000

    Motor[7].Servo.MaxPosErr=100000

    Motor[7].Servo.MaxInt=100000

    //After having defined my motion parameters in I multiply/divide by thousand.

    Motor[7].jogspeed= (Mtr7JogSpeed ) / ( 1000 )

    Motor[7].JogTa= 1000 * Mtr7Accel

    Motor[7].JogTs= 1000 * Mtr7Jerk

    Motor[7].MaxSpeed= ( Mtr7MaxJogSpeed ) / ( 1000 )

    Motor[7].InvAmax= 1 / ( Mtr7MaxAccel * 1000 )

    Motor[7].InvDmax= Motor[7].InvAmax

    Motor[7].InvJmax= 1 / Mtr7MaxJerk

     

    Best regards,

    hannsx

  17. Hi Jeff, thanks a lot for your response. I found my mistake.

    I thought I needed to enable the serial encoder function on the PowerBrick. So I set

    PowerBrick[1].Chan[1].SerialEncEna = 1

    as was written in the PowerBrickLV Manual. I realized that the following commands

    Acc84B[1].SerialEncCtrl=$B010B

    Acc84B[1].Chan[1].SerialEncCmd =$2114A4

    were available for the Accessorie 84B and substituted the name. After a long day trying to get to the core of the problem

    together with my colleagues I thought that I may not need to enable that on the PowerBrick.

    Though my colleagues and I thought that it was sensible to enable that function and did not uestioned it before. But that was it....

    I can't say how happy I am to have found the problem.

    It could have messed up the whole experiment scheduled for our scientist at the beamline. Having said that, it is always possible to run into trouble when you setup new systems. I'll post a description of my setup and my hardware when I am done with our Experiment.

  18. Hi, after accepting that this is not a quick issue and having read the section in the User's Manual I think I got the picture. So now I tried to set up my system with the help of an excel spreadsheet I found here. I get a position feedback, that is increasing wildly when I activate the motor. I'll just post my code and hope that someone sees the problem(s). If you could take a look at it that would great - don't take the comments in my code too serious, much of it is outdated and this is an experimental project file. And please excuse my messy formatting. I will keep on looking for solutions in other posts.

     

    Motor[6] has serial feedback, Motor[8] is slaved to Motor[6] and produces quadrature signals.

     

    startup file ------------------------------------------

    Sys.WpKey = $AAAAAAAA

    Sys.MaxCoords = 4

    Sys.MaxMotors = 16

     

    PowerBrick[1].PhaseFreq = 20000

    PowerBrick[1].ServoClockDiv = 1

    PowerBrick[0].PhaseFreq = 20000

    PowerBrick[0].ServoClockDiv = 1

    Sys.RtIntPeriod = 1

    Sys.ServoPeriod = 1000 * (PowerBrick[0].ServoClockDiv + 1) / PowerBrick[0].PhaseFreq

    Sys.PhaseOverServoPeriod = 1 / (PowerBrick[0].ServoClockDiv + 1)

     

    PowerBrick[0].Chan[0].PwmFreqMult = 1

    PowerBrick[0].Chan[1].PwmFreqMult = 1

    PowerBrick[0].Chan[2].PwmFreqMult = 1

    PowerBrick[0].Chan[3].PwmFreqMult = 1

    PowerBrick[1].Chan[0].PwmFreqMult = 1

    PowerBrick[1].Chan[1].PwmFreqMult = 1

    PowerBrick[1].Chan[2].PwmFreqMult = 1

    PowerBrick[1].Chan[3].PwmFreqMult = 1

     

    Sys.WpKey = $AAAAAAAA // Disable Write-Protection

    PowerBrick[0].Chan[0].PackOutData = 0 // Channel #1 Unpack Output Data

    PowerBrick[0].Chan[1].PackOutData = 0 // Channel #2 Unpack Output Data

    PowerBrick[0].Chan[2].PackOutData = 0 // Channel #3 Unpack Output Data

    PowerBrick[0].Chan[3].PackOutData = 0 // Channel #4 Unpack Output Data

    PowerBrick[1].Chan[0].PackOutData = 0 // Channel #5 Unpack Output Data

    PowerBrick[1].Chan[1].PackOutData = 0 // Channel #6 Unpack Output Data

    PowerBrick[1].Chan[2].PackOutData = 0 // Channel #7 Unpack Output Data

    PowerBrick[1].Chan[3].PackOutData = 0 // Channel #8 Unpack Output Data

    PowerBrick[0].Chan[0].PackInData = 0 // Channel #1 Unpack Input Data

    PowerBrick[0].Chan[1].PackInData = 0 // Channel #2 Unpack Input Data

    PowerBrick[0].Chan[2].PackInData = 0 // Channel #3 Unpack Input Data

    PowerBrick[0].Chan[3].PackInData = 0 // Channel #4 Unpack Input Data

    PowerBrick[1].Chan[0].PackInData = 0 // Channel #5 Unpack Input Data

    PowerBrick[1].Chan[1].PackInData = 0 // Channel #6 Unpack Input Data

    PowerBrick[1].Chan[2].PackInData = 0 // Channel #7 Unpack Input Data

    PowerBrick[1].Chan[3].PackInData = 0 // Channel #8 Unpack Input Data

     

    BrickLV.Chan[0].TwoPhaseMode = 1 //

    BrickLV.Chan[1].TwoPhaseMode = 1 //

    BrickLV.Chan[2].TwoPhaseMode = 1 //

    BrickLV.Chan[3].TwoPhaseMode = 1 //

    BrickLV.Chan[0].I2tWarnOnly = 0 // Motor #1 Amp I2T action, kill motor & display fault

    BrickLV.Chan[1].I2tWarnOnly = 0 // Motor #2 Amp I2T action, kill motor & display fault

    BrickLV.Chan[2].I2tWarnOnly = 0 // Motor #3 Amp I2T action, kill motor & display fault

    BrickLV.Chan[3].I2tWarnOnly = 0 // Motor #4 Amp I2T action, kill motor & display fault

    BrickLV.Chan[4].TwoPhaseMode = 1 //

    BrickLV.Chan[5].TwoPhaseMode = 1 //

    BrickLV.Chan[6].TwoPhaseMode = 1 //

    BrickLV.Chan[7].TwoPhaseMode = 1 //

    BrickLV.Chan[4].I2tWarnOnly = 0 // Motor #5 Amp I2T action, kill motor & display fault

    BrickLV.Chan[5].I2tWarnOnly = 0 // Motor #6 Amp I2T action, kill motor & display fault

    BrickLV.Chan[6].I2tWarnOnly = 0 // Motor #7 Amp I2T action, kill motor & display fault

    BrickLV.Chan[7].I2tWarnOnly = 0 // Motor #8 Amp I2T action, kill motor & display fault

     

    //Motor[8] - Quadrature signal output configuration

    PowerBrick[1].Chan[3].PackOutData = 0 // Unpack Output Data

    PowerBrick[1].Chan[3].OutputMode = PowerBrick[1].Chan[3].OutputMode | $8 // Force D PFM

    PowerBrick[1].Chan[3].PfmFormat = 1 // =0 PFM, =1 Quadrature

    PowerBrick[1].Chan[3].PfmDirPol = 0 // Non-Inverted

    PowerBrick[1].Chan[3].OutFlagD = 1 // =0 for halls, =1 for PFM

     

    EncTable[1].type = 11;

    EncTable[1].pEnc = Motor[1].PhasePos.a;

    EncTable[1].index1 = 5;

    EncTable[1].index2 = 0;

    EncTable[1].index3 = 0;

    EncTable[1].index4 = 0;

    EncTable[1].index5 = 255;

    EncTable[1].index6 = 1;

    EncTable[1].ScaleFactor = 1 / (256 * (EncTable[1].index5 + 1) * EXP2(EncTable[1].index1));

     

     

    EncTable[2].type = 11;

    EncTable[2].pEnc = Motor[2].PhasePos.a;

    EncTable[2].index1 = 5;

    EncTable[2].index2 = 0;

    EncTable[2].index3 = 0;

    EncTable[2].index4 = 0;

    EncTable[2].index5 = 255;

    EncTable[2].index6 = 1;

    EncTable[2].ScaleFactor = 1 / (256 * (EncTable[2].index5 + 1) * EXP2(EncTable[2].index1));

     

     

    EncTable[3].type = 11;

    EncTable[3].pEnc = Motor[3].PhasePos.a;

    EncTable[3].index1 = 5;

    EncTable[3].index2 = 0;

    EncTable[3].index3 = 0;

    EncTable[3].index4 = 0;

    EncTable[3].index5 = 255;

    EncTable[3].index6 = 1;

    EncTable[3].ScaleFactor = 1 / (256 * (EncTable[3].index5 + 1) * EXP2(EncTable[3].index1));

     

     

    EncTable[4].type = 11;

    EncTable[4].pEnc = Motor[4].PhasePos.a;

    EncTable[4].index1 = 5;

    EncTable[4].index2 = 0;

    EncTable[4].index3 = 0;

    EncTable[4].index4 = 0;

    EncTable[4].index5 = 255;

    EncTable[4].index6 = 1;

    EncTable[4].ScaleFactor = 1 / (256 * (EncTable[4].index5 + 1) * EXP2(EncTable[4].index1));

     

     

    EncTable[5].type = 11;

    EncTable[5].pEnc = Motor[5].PhasePos.a;

    EncTable[5].index1 = 5;

    EncTable[5].index2 = 0;

    EncTable[5].index3 = 0;

    EncTable[5].index4 = 0;

    EncTable[5].index5 = 255;

    EncTable[5].index6 = 1;

    EncTable[5].ScaleFactor = 1 / (256 * (EncTable[5].index5 + 1) * EXP2(EncTable[5].index1));

     

     

    // Focusing Stepper, Master To Motor 8

    // These Setup-Elements are not necessairy with encoder feedback

    //EncTable[6].type = 11;

    //EncTable[6].pEnc = Motor[6].PhasePos.a;

    //EncTable[6].index1 = 5;

    //EncTable[6].index2 = 0;

    //EncTable[6].index3 = 0;

    //EncTable[6].index4 = 0;

    //EncTable[6].index5 = 255;

    //EncTable[6].index6 = 1;

    //EncTable[6].ScaleFactor = 1 / (256 * (EncTable[6].index5 + 1) * EXP2(EncTable[6].index1));

     

    // Setup for use with encoder

    // 400 Steps per Rotation gives 0.9°per Step.

    // per PowerBrickLV manual that equates to 100 pole-pairs.

    // This number is used for the setup of the ongoing phase-postion.

     

    //Serial encoder setup elements

    Acc84B[1].SerialEncCtrl = $B010B

    Acc84B[1].Chan[1].SerialEncCmd = $1514A4

    Gate3[1].Chan[1].SerialEncEna = 1

     

    // --- Encoder Conversion Table for position/velocity feeback ----------

    EncTable[6].Type = 1

    EncTable[6].pEnc = Acc84B[1].Chan[1].SerialEncDataA.a

    EncTable[6].index1 = 8

    EncTable[6].index2 = 8

    EncTable[6].ScaleFactor = 1/256

     

     

    ///////////////////////////////////////////////////////////////////////////////////

     

    EncTable[7].type = 11;

    EncTable[7].pEnc = Motor[7].PhasePos.a;

    EncTable[7].index1 = 5;

    EncTable[7].index2 = 0;

    EncTable[7].index3 = 0;

    EncTable[7].index4 = 0;

    EncTable[7].index5 = 255;

    EncTable[7].index6 = 1;

    EncTable[7].ScaleFactor = 1 / (256 * (EncTable[7].index5 + 1) * EXP2(EncTable[7].index1));

     

    //Virtual Motor, Quadrature adjustments

    PowerBrick[1].Chan[3].EncCtrl = 8

    PowerBrick[1].Chan[3].TimerMode = 3

     

    // Virtual Motor, Slave to Motor 6

    //EncTable[8].type=11

    //EncTable[8].pEnc=Motor[8].IqCmd.a

    //EncTable[8].pEnc1=Sys.pushm

    //EncTable[8].index1=0

    //EncTable[8].index2=0

    //EncTable[8].index3=0

    //EncTable[8].index4=1

    //EncTable[8].index5=255

    EncTable[8].ScaleFactor = 1/256

    //EncTable[8].ScaleFactor = 1

     

    enable plc 1 ; // initialising power-up-plc

     

     

     

    global definitions file --------------------------

    undefine all ; // Alle Koordinatensysteme deaktivieren (Vorsichtsma\ss{}nahme)

     

     

     

    global DcBusInput = 48 ;

     

     

     

    //=============================================================//

    // Motor[1] - Stepper -----------------------------------------//

    //=============================================================//

    global Mtr1DcVoltage = 48 ;

     

    // For phasing with stepper - method

    global Mtr1PhasingTime = 1000 ; //msec

     

    // Current settings

    global Ch1MaxAdc = 33.85 ; // max adc-gain

    global Ch1PeakCur = 1.5 ; // peak motor-current

    global Ch1ContCur = 1.3 ; // continuous current

    global Ch1HoldCur = 0.6 ; // hold current

    global Ch1TimeAtPeak = 1 ; // time for peak current

     

    //=============================================================//

    // Motor[2] - Stepper -----------------------------------------//

    //=============================================================//

    global Mtr2DcVoltage = 48 ;

     

    // For phasing with stepper - method

    global Mtr2PhasingTime = 1000 ; //msec

     

    // Current settings

    global Ch2MaxAdc = 33.85 ; // max adc-gain

    global Ch2PeakCur = 1.5 ; // peak motor-current

    global Ch2ContCur = 1.3 ; // continuous current

    global Ch2HoldCur = 0.6 ; // hold current

    global Ch2TimeAtPeak = 1 ; // time for peak current

     

    //=============================================================//

    // Motor[3] - Stepper -----------------------------------------//

    //=============================================================//

    global Mtr3DcVoltage = 48 ;

     

    // For phasing with stepper - method

    global Mtr3PhasingTime = 1000 ; //msec

     

    // Current settings

    global Ch3MaxAdc = 33.85 ; // max adc-gain

    global Ch3PeakCur = 1.8 ; // peak motor-current

    global Ch3ContCur = 1.5 ; // continuous current

    global Ch3HoldCur = 0.6 ; // hold current

    global Ch3TimeAtPeak = 1 ; // time for peak current

     

     

    //=============================================================//

    // Motor[4] - Stepper -----------------------------------------//

    //=============================================================//

    global Mtr4DcVoltage = 48 ;

     

    // For phasing with stepper - method

    global Mtr4PhasingTime = 1000 ; //msec

     

    // Current settings

    global Ch4MaxAdc = 33.85 ; // max adc-gain

    global Ch4PeakCur = 1.5 ; // peak motor-current

    global Ch4ContCur = 1.3 ; // continuous current

    global Ch4HoldCur = 0.6 ; // hold current

    global Ch4TimeAtPeak = 1 ; // time for peak current

     

     

    //=============================================================//

    // Motor[5] - Stepper -----------------------------------------//

    //=============================================================//

    global Mtr5DcVoltage = 48 ;

     

    // For phasing with stepper - method

    global Mtr5PhasingTime = 1000 ; //msec

     

    // Current settings

    global Ch5MaxAdc = 33.85 ; // max adc-gain

    global Ch5PeakCur = 1.5 ; // peak motor-current

    global Ch5ContCur = 1.3 ; // continuous current

    global Ch5HoldCur = 0.6 ; // hold current

    global Ch5TimeAtPeak = 1 ; // time for peak current

     

     

    //=============================================================//

    // Motor[6] - Stepper -----------------------------------------//

    //=============================================================//

    global Mtr6DcVoltage = 48 ;

     

    // For phasing with stepper - method

    global Mtr6PhasingTime = 1000 ; //msec

     

    // Current settings

    global Ch6MaxAdc = 33.85 ; // max adc-gain

    global Ch6PeakCur = 0.8 ; // peak motor-current

    global Ch6ContCur = 0.6 ; // continuous current

    global Ch6HoldCur = 0.2 ; // hold current

    global Ch6TimeAtPeak = 1 ; // time for peak current

     

     

    //=============================================================//

    // Motor[7] - Stepper -----------------------------------------//

    //=============================================================//

    global Mtr7DcVoltage = 48 ;

     

    // For phasing with stepper - method

    global Mtr7PhasingTime = 1000 ; //msec

     

    // Current settings

    global Ch7MaxAdc = 33.85 ; // max adc-gain

    global Ch7PeakCur = 1.5 ; // peak motor-current

    global Ch7ContCur = 1.3 ; // continuous current

    global Ch7HoldCur = 0.6 ; // hold current

    global Ch7TimeAtPeak = 1 ; // time for peak current

     

     

    //=============================================================//

    // Motor[8] - Stepper -----------------------------------------//

    //=============================================================//

    global Mtr8DcVoltage = 48 ;

     

    // For phasing with stepper - method

    global Mtr8PhasingTime = 1000 ; //msec

     

    // Current settings

    global Ch8MaxAdc = 33.85 ; // max adc-gain

    global Ch8PeakCur = 1.5 ; // peak motor-current

    global Ch8ContCur = 1.3 ; // continuous current

    global Ch8HoldCur = 0.6 ; // hold current

    global Ch8TimeAtPeak = 1 ; // time for peak current

     

     

    quadrature signal setup file --------------------------------

    GLOBAL MaxPfmFreq = 6.25; // [MHz]

    GLOBAL MinPulseWidth = 1000 / MaxPfmFreq; // 40 [nsec]

    GLOBAL PulseWidth = 4*MinPulseWidth; // 600 [nsec]

    PowerBrick[1].PfmClockDiv = LOG2(100 / (MaxPfmFreq)) // 2

    PowerBrick[1].Chan[3].PfmWidth = PulseWidth * MaxPfmFreq / 1000 // $F (15)

    GLOBAL PfmMaxSpeed = 1000000 / (PulseWidth + MinPulseWidth) // [kHz]

     

    motor[6] setup file ----------------------------------

    // Encoder-Feedback requires setup for ongoing phase-position

    // motor-setup of brushless type.

    // This has to be configured for biss-c serial communication

    // protocoll encoders.

     

    //--- Motor AbsPhase Setup ------------------------

    Motor[6].AbsPhasePosFormat = $00042000 //??...

    Motor[6].AbsPhasePosSf = 2048*1/1000

    Motor[6].AbsPhasePosOffset = 0

    Motor[6].pAbsPhasePos = Acc84B[1].Chan[1].SerialEncDataA.a

    Motor[6].PhaseFindingTime = 4

     

    //--- Motor Abs Position Setup ---------------------

    Motor[6].AbsPosFormat = $00002400

    Motor[6].AbsPosSf = 1

    Motor[6].HomeOffset = 0

    Motor[6].pAbsPos = Acc84B[1].Chan[1].SerialEncDataA.a

     

    // --- Commutation ----------

    Motor[6].PhaseCtrl = 1

    Motor[6].pPhaseEnc = Acc84B[1].Chan[1].SerialEncDataA.a

    Motor[6].PhaseEncRightshift = 8

    Motor[6].PhaseEncLeftShift = 8

    Motor[6].PhasePosSf = 2048*1/(256*1000) //because of 8-bits shift, result is 256x bigger.

     

     

    // If motor does not move, reverse PhaseOffset and Pwsfm!!!

     

    Motor[6].pEnc = EncTable[6].a

    Motor[6].pEnc2 = EncTable[6].a

     

    Motor[6].ServoCtrl = 0

    Motor[6].AdcMask = $FFFC0000

    Motor[6].AmpFaultLevel = 1

    Motor[6].PhaseOffset = -512 //Remains for encoder-setup

    Motor[6].PhaseCtrl = 4

    Motor[6].Servo.MaxPosErr = 100000

    Motor[6].Servo.Kp = 0.1

    Motor[6].Servo.Kvff = 0

    Motor[6].Servo.Kaff = 0

    Motor[6].Servo.Kvfb = 0

    Motor[6].Servo.Ki = 0

    Motor[6].Servo.Kvifb = 0

    Motor[6].Servo.Kviff = 0

     

     

    Motor[6].IiGain = 2.0

    Motor[6].IpfGain = 10.0

    Motor[6].IpbGain = 2.0

     

    Motor[6].MaxSpeed=500 //Max Speed = 5 steps/msec

    Motor[6].InvAmax= 1 / (20 * Motor[6].MaxSpeed) //Max Acceleration = 1mu/msec^2

    Motor[6].InvDmax=Motor[6].InvAmax //Max Deceleratiion = 1mu/msec^2

    Motor[6].InvJmax=Motor[6].InvAmax //Max dA/dt

     

    Motor[6].JogSpeed = 200

    Motor[6].JogTa= -1 / (10 * Motor[6].MaxSpeed)

    Motor[6].JogTs= Motor[6].JogTa

     

    Motor[6].pLimits = PowerBrick[1].Chan[1].Status.a

    Motor[6].LimitBits=9

     

    Motor[6].PwmSf = -0.95 * 16384 //Remains for encoder-setup

     

    Motor[6].MaxDac = Ch6PeakCur * 28378 / Ch6MaxAdc

    Motor[6].I2tSet= Ch6ContCur * 28378 / Ch6MaxAdc

    Motor[6].I2tTrip= ( pow(Motor[6].MaxDac,2) - pow(Motor[6].I2TSet,2) ) * Ch6TimeAtPeak

     

    Motor[6].pDac=Gate3[1].Chan[1].Pwm[0].a

    Motor[6].pAdc = Gate3[1].Chan[1].AdcAmp[0].a

     

    // Stepper setup elements

    //Motor[6].pEnc = EncTable[6].a

    //Motor[6].pEnc2 = EncTable[6].a

    //Motor[6].DtOverRotorTc = 0.0 ;

    //Motor[6].IdCmd = Motor[6].I2TSet / 2 ;

    //Motor[6].SlipGain = Sys.PhaseOverServoPeriod / (Motor[6].Stime + 1)

    //Motor[6].AdvGain = 1/16*Sys.PhaseOverServoPeriod*(0.25/Sys.ServoPeriod/Sys.PhaseOverServoPeriod)

    //Motor[6].PhaseMode = 1 //Is deleted for encoder-setup

    //Motor[6].PhasePosSf = 0

    //Motor[6].pAbsPhasePos = PowerBrick[1].Chan[1].PhaseCapt.a

    //Motor[6].PowerOnMode = 2

    //Motor[6].PhaseCtrl = 6 //turns to 4 for encoder-setup

     

     

    motor[8] setup file -----------------------------------------------

    // Virtual Motor following Master Motor

     

    //Quadrature Signal configuration

    Motor[8].pDac = PowerBrick[1].Chan[3].Pfm.a // Command output, point to PFM

    Motor[8].MaxDac = 2 * 32768 / (MaxPfmFreq * 1000 / (1000000 / (PulseWidth + MinPulseWidth)))

    Motor[8].InPosBand=10

    Motor[8].Servo.BreakPosErr=2

    Motor[8].Servo.Kbreak=0

     

    // Slave-Configuration

    Motor[8].pMasterEnc = EncTable[6].a // Master position source address

    Motor[8].MasterPosSf = 1 // Electronic gear scale factor

    Motor[8].MasterCtrl =1 //enabled (normal mode), =0 disabled, =3 offset mode

    Motor[8].SlewMasterPosSf=0.0

     

    Motor[8].Ctrl=Sys.PidCtrl // This can be set to Sys.ServoCtrl for using advanced filters. Sys.PidCtrl adds less CPU load in comparison.

    Motor[8].pAmpEnable=0

    Motor[8].pAmpFault=0

    Motor[8].pLimits=0

    //Motor[8].pEnc=EncTable[8].a

    //Motor[8].pEnc2=EncTable[8].a

    //Motor[8].pDac=Sys.Idata[8].a

    //Motor[8].PosSf=360/(24*exp2(20))

    //Motor[8].Pos2Sf=360/(24*exp2(20))

    //Motor[8].Pos=0

    Motor[8].HomePos=0

    Motor[8].FatalFeLimit=0

    Motor[8].WarnFeLimit=0

     

     

     

    // Adjust the following values based upon the application

     

    Motor[8].MotorTa=-1.5E-6

    Motor[8].MotorTs=-1.5E-6

    Motor[8].MaxSpeed=100

    Motor[8].JogSpeed=10

    Motor[8].InvAmax=1/5.471960662E-4

    Motor[8].InvJmax=1/5.471960662E-4

    Motor[8].InvDmax=1/5.471960662E-4

    Motor[8].JogTa=0

    Motor[8].JogTs=250

    //Motor[8].InPosBand=0.0005

    //Motor[8].InPosTime=9

     

    Motor[8].Servo.Kp=50

    Motor[8].Servo.Kvifb=0

    Motor[8].Servo.Kviff=0

    Motor[8].Servo.Kvfb=0

    Motor[8].Servo.Kvff=50

    Motor[8].Servo.Kafb=0

    Motor[8].Servo.Kaff=0

    Motor[8].Servo.Ki=0.001

    Motor[8].Servo.Kfff=0

    Motor[8].Servo.MaxPosErr=10000

    Motor[8].Servo.MaxInt=28000

     

    Motor[8].Servo.EstMinDac=0

    Motor[8].Servo.NominalGain=0

    Motor[8].Servo.MinGainFactor=1

    Motor[8].Servo.MaxGainFactor=1

     

    Motor[8].ServoCtrl = 1

  19. Hi, I am operating a PowerBrickLV with 5/15A on channels 1-8.

    We have the Biss-C serial encoder option and want to set up two Motors.

     

    1. Direct Microstep with encoder feedback on Gate3[1].Chan[1]

     

    2. VoiceCoil with Encoder feedback on Gate3[1].Chan[2]

     

    To my surprise it Biss-C is the only Protocoll, which is not covered in the PowerBrickLV Manual.

     

    Serial Encoder: Renishaw Resolute with 1nm resolution and 36Bit data. Linear Encoder.

     

    I found a description on other Motors and Resolution of Biss-C serial encoders but I am not sure if I am able to translate that to my needs in short time because we need the encoders running as fast as possible. I am grateful for any help,

    best reagards

  20. In a recent posting you refer to (I assume same mechanism) needing more motor current, in part due to stiff bearings.

    This can affect the success of the two step phase finding algorithm.

    The algorithm looks at rotor (encoder) position and assumes magnetic alignment when a phase is excited, and then validates by checking if the motor moves an appropriate distance when a different phase is excited. If the delta is too big/small, the alignment cannot be trusted and the test fails.

    Causes are generally twofold:

    - physical obstruction, stiff mechanism, bias due to gravity.

    - Magnetic pole irregularities in the motor. This is always present to some degree and can cause random pass/fail results depending on which pole/magnet happens to be in position at start-up.

    Motor[x].PhasePosSf is used to determine the 'correct' movement of the rotor during phase finding. It may be possible to alter this value during phase finding to loosen up the pass/fail criteria but it must be returned to the proper value.

    DT should be consulted.

     

    That is correct, I encountered this issue especially with this motor. However, if I do the phasing manually I there is no algorithm present I would assume. Maybe the changes are made by the algorithm when I try an automatic phasing, do not succeed and then do the manual force phasing. Thx for the explanation.

  21. This could be the result of “insufficient” settings on the following:

    Motor[x].PhaseFindingDac

    Motor[x].PhaseFindingTime

     

    See the section “Automatic Stepper Phasing” in the “Power Brick LV User Manual” for implementation details:

    “http://forums.deltatau.com/filedepot/download.php?f=Power PMAC/Manuals/Hardware Reference Manual/Power Brick LV User Manual.pdf”

     

    Ok-thx for the tip.

  22. I'm a little confused looking at this. It doesn't look like the working version with PosSf=1, it's applied to some places but not to the motor gains.

     

    Does open loop work? PhasePosSf looks fishy to me for serial.

     

    Hi, sorry for not answering. I see that my file looks confusing. In that file I also made the mistake of applying the scaling to the motor[x].ki value. However I corrected this and still had the same problem. So yes, open loop works and the motor moves, but it does not reach the same precision any more. I guess our requirements also are a bit out of the ordinary. We have an ultraprecise actuator for which one Encoder coutn equals 0.325nm. Then we want to operate it on micro meter scale and therefore want it to precise to 0.001 counts.

×
×
  • Create New...