Jump to content
OMRON Forums

RaphaelM

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by RaphaelM

  1. Hello,

     

    I'm using an ACC-24M2A connected to a Power PMAC CPU (in UMAC rack) by MACRO RING.

     

    I drive an external driver by PFM signals.

     

    I have a stepper motor with incremental encoder (quadrature) on the ACC-24M2A.

     

    When I look at the encoder feedback I find that it is different compared to the normal encoder resolution (exactly by a factor of 16).

     

    With the same configuration on an ACC24E2S (in the UMAC), I have a good resolution.

     

    I have checked my pinout. I think that it's a problem of configuration.

     

    /* ###ACC24M2A encoder configuration### */

     

    MI910 = 3 // x4 quadrature decode CW

     

    /* ###ECT configuration### */

     

    EncTable[9].Type = 3

    EncTable[9].pEnc = Acc5E3[1].MacroInA[0][0].a

    EncTable[9].pEnc1 = Sys.pushm

    EncTable[9].ScaleFactor = 1/512

    EncTable[9].index1 = 8

    EncTable[9].index2 = 8

    EncTable[9].index3 = 0

    EncTable[9].index4 = 0

     

    Somebody has any thoughts/solutions regarding this problem?

     

    Regards.

     

    RM

  2. Are you sure? For now, I have a TTL signal 0 - +5 Volts.

     

    There is just something strange concerning the duty rate.

     

    If I make an inversion as you say, I will have a negative signal 0 - -5 Volts.

     

    Regards,

     

    Raphael Millet

  3. Hello,

     

    I'm trying to drive a stepper motor with encoder on an ACC-24M2A by MACRO ring.

     

    I work on a UMAC rack with a Power PMAC CPU and an ACC-5E3 card.

     

    The communication by MACRO works. I can see the encoder feedback in the IDE.

     

    I have added the jumpers E5 and E6 to generate PFM signal on J11 & J12 connectors (Pinout : Pulse+ 9 / Pulse- 22 / Dir+ 8 / Dir- 21).

     

    Motor[9].pDac = Acc5E3[1].MacroOutA[0][2] // PWMC to drive in PFM

     

    The Pulse signal seems be wrong. It's a TTL signal but it's to the high level during 95% of the time. It's as if there was an inversion between low and high levels.

     

    The PFM_CLK is at 305.72 kHz (M993 = 2298).

     

    I have checked the *.PwmDeadTime (MI994) of the acc-24M2A, but it seems be ok (=15, so PFM Pulse width = 49 us).

     

    To conclude, the Driver can't detect the edges.

     

    Anybody have any idea? I can give more details.

     

    Thanks for your help,

     

    Raphael

  4. Raphael,

     

    In order to write to gate structures in C, you must first define the gate pointer. Pages 483 and following of the Power PMAC User Manual describe this in detail. To get that manual, click "FileDepot" near the top right of the forum page and then go to Power PMAC-->Manuals.

     

    Basically for your card, a GateIO card, define a pointer like this:

     

    volatile GateIoStruct *MyFirstGateIoIC;

     

    Then, assign the pointer to your card's memory address. Since you wrote in your post that you're using GateIo[0], you can use the 0th index in the GetGateIoMemPtr() function as follows:

     

    MyFirstGateIoIC = GetGateIoMemPtr(0);

     

    Then you can access DataReg[3] like this:

     

     

    MyFirstGateIoIC->DataReg[3]=value;

     

    where value is the value you want to write to DataReg[3].

     

    Is that clear?

     

    Charles,

     

    I have follow the user manuel like you wrote.

     

    I don't understand why, but I have a syntax error on the declaration of the pointer in red.

     

    See my code:

    ____________________

     

    #include

    #include

    #include

     

    #define _EnumMode_

    #define _PPScriptMode_

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

     

    void realtimeinterrupt_plcc()

    {

    volatile GateIoStruct *MyFirstGateIoIC;

     

    MyFirstGateIoIC=GetGateIOMemPtr(0);

     

    MyFirstGateIoIC->DataReg[3]=1;

     

    }

    ____________________

     

    Thanks for your help.

    [/align]

    RM

  5. Like I said in introduction of my post, I have created a new project to isolate the problem. So there is nothing which can change the outputs.

     

    In addition, if I start the program without the red equation of my code, there is no error on the outputs.

     

    When this error appears, the execution of the CPLC is stoped (normally, the cplc is executed in infinite loop).

  6. Hello,

     

    I have a strange problem in a CPLC.

     

    To understand this problem, I have created a new project with just my CPLC and defined a global variable in Global Includes.

     

    I try to evaluate the speed of treatment for equation loops.

     

    When I start my CPLC with certain equations, all my outputs are set to 1 and can't be changed no matter what I do.

     

    I don't understand because my equations include only local variables.

     

    See my code :

     

    /* ******************************** */

     

    #include

    #include

    #define _EnumMode_

    #define _PPScriptMode_

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

     

    void realtimeinterrupt_plcc()

    {

    int i1=0, i2=0, val_1=4;

    double timer1=2.0, timer2=5, alpha=0, beta=0;

     

    timer1= GetCPUClock();

     

    for(i1=0; i1<100; i1++)

    {

    for(i2=0; i2<100; i2++)

    {

    val_1 = val_1 + (i1+1)*(i1+1);

    //alpha = val_1 / (val_1 + i2);

    //beta = val_1 / (val_1 + i1);

    //alpha=cos(beta);

    }

    }

    timer2= GetCPUClock();

    delta = timer2 - timer1; // delta is defined in Global Includes

    }

     

    /* ******************************** */

     

    If I start the CPLC with the red equations, all outputs are set to 1.

     

    Thanks for your help,

     

    RM

  7. Hello,

     

    I would like to change the value of an output in a CPLC.

     

    In a PLC, I write in GateIO[0].DataReg[3], but I can't do that in a CPLC.

     

    I can do that with pointers but it's a PLC script which upload the outputs with the pointers values. So the speed of my process is impacted by speed of the PLC.

     

    I search the best solution to synchronise a moove on an edge signal.

     

    Thanks for your help.

     

    RM

×
×
  • Create New...