Jump to content
OMRON Forums

leandro.martins

Members
  • Posts

    91
  • Joined

  • Days Won

    6

Posts posted by leandro.martins

  1. 3 hours ago, David Jan said:

    I really can't understand your method of converting offset velocity to position information by means of an encoder conversion table

    I think the trick is done because the velocity offset is being applied on the IqCmd, which is used as the EncTable[n].pEnc.

    With the EncTable[n].Type=11 and EncTable[n].index<32, the EncTable[n].index4 controls how many times the IqCmd (which represents the velocity) will be integrated.
    In this case, as index4=1 the velocity will be integrated once, resulting in a position value.

  2. @DaveBarnett

    You're right,  It wasn't clear to me that the PLCs have to be running in parallel.

    My suggestion was thinking in prevent the "cut and paste" process.
    The subprograms can be used for that, and in your case, could be used in multiple PLCs to run the same logic in parallel, having a single source of truth, which could be useful for maintaining the code.


     

  3. You might be able to create a subprogram for that.
    Something like:
     

    OPEN SUBPROG IO_Logic(index1, index2)
    	// Add Logic here ...
    CLOSE


    And call that from a single plc using

    CALL IO_Logic(0,1)
    CALL IO_Logic(2,3)


    However, I don't see any harm in using the motion program, but I could be wrong.

  4. 20 hours ago, Unicornai said:

    then ,i have other question,if i  want to execute the motion, but there is only one motor in the coordinate system,actully,ihaving done it,but i used two coordinate,one only have z-axis,anther only have x-axis,but the F command only Only effective on the Z-axis ,Z means &1#2, X means &3#1,I don't know how to make the F command work on the X-axis, I just mentioned it separately in a separate coordinate system. Their X-axis and Z-axis are originally in the first coordinate system. When they are together, even if they move separately, the F value will not fluctuate significantly. However, if the X-axis is mentioned separately in the third coordinate system, the F command seems to be ineffective and its fluctuations will increase. I searched for an explanation but did not get a detailed explanation. Please help me, thank you! 

    Some things can interfere in F command (vector feedrate):

    • Axis not within the axes defined by the frax - If you haven't defined anything, you might be okay with that, since by default the axes X, Y and Z are defined.
    • Limitation by Coord[x].MaxFeedRate
    • Limitation by Motor[x].MaxSpeed

     

    Have a look at "F{data}" section in the Software Reference Manual.

  5. I have noticed that in the rtpmaclib.h there is vcross function for the cross product operation between vectors

    As the vcopy, vmadd and vscale can be used also in the script language, I would like to know if in fact the vcross isn't available for script language, or if it's just not documented.

    Thanks

  6. I have found this disclaimer at the header of the gplib.h:

    /// \file   gplib.h
    ///
    /// These functions are for use as an API for linux "C" APPs.
    /// \warning They are NOT available to user written real time "C" PLCs.

    Therefore, it looks that it's not possible to use the Command() in the Realtime Routines.

    I couldn't find anything with the same function of the online command "run" in the rtpmacapi. There is a function for cheching the CS status though.

    //-------------------------------------------------------------
    /// Returns enum of Coord Program Status
    ///
    /// \param[in] num - number
    /// \return enum progstatus
    enum progstatus  CoordStatus(int num);

    My impression is that the C code generation is intended only for control loops purposes, not general logic.

    Sorry for not being able to help more.

  7. The best thing would be consult the PowerPMAC C Help documentation

    It is attached into this another topic


    Probably this is the function that you are looking for

    //-----------------------------------------------------------------------------------------------
    /// Sends a command to the Pmac Command Processor
    ///
    /// Previous modal commands will be retained
    /// The input string is converted from symbolic to PMAC compatible commands and variables
    /// \param[in] *pinstr  - ptr to PMAC input string
    /// \return 0 == OK, - == error number
    int Command (char *pinstr);

    or
     

    //-----------------------------------------------------------------------------------------------
    /// Sends a command to the Pmac Command Processor
    ///
    /// Previous modal commands aren't retained, thus the function is Thread Safe
    /// The input string is converted from symbolic to PMAC compatible commands and variables
    /// \param[in] *pinstr  - ptr to PMAC input string
    /// \return 0 == OK, - == error number
    int CommandTS (char *pinstr);

     



  8. In my opinion your plc is doing exactly the same thing if you set

    Motor[1].pDac =ECAT[0].IO[1].Data
    Motor[1].DacBias = 100

    but your plc is being executed in a different task, with a different interruption.
    I assume that can make the motor to use the ECAT[0].IO[1].Data before the offset being applied.

    My best suggestion would be changing the motion program to

    open prog1
    f(50+Q1)
    x300
    x0
    close

    being possible to use the Coord[x].Q[1] as your veloffset.

    As that isn't an option, I don't think that I have more suggestions.

    I hope someone else can help you.

  9. The simplest way of doing that should be using the "%{constant}" online command, which overrides the motion program time-base.

    In that way you can increase up to two times the velocity described in motion program, sending via terminal the  command

    %200

    To return to default time-base
     

    %100


    If your application really needs as an offset, and the relation between Motor[x].ServoOut and the velocity is well-known, probably you can use the the variable veloffset in Motor[x].DacBias.

  10. I have used the MATLAB library only on older version, so just a guess:

    image.png.9950275c408c5d405e521706671b5598.png


    Is this the "DeltaTau" menu that you're looking for, by any chance?
    In other versions it used to be next to the "C code", but I assume that changes in the simulink layout along the versions might be  making the "DeltaTau" menu to be placed in an awkward place.

    • Like 1
  11. I have a similar issues when I try to download a project saved in a drive different (a network drive in my case) from the one where the IDE is installed.

    The problem happens at version 4.6.0.14.
    I didn't have the opportunity to check if I can reproduce that is the latest IDE release though.

    Also, I should say that I don't have admin permission in the PC, so cannot test if it's a windows permission issue.

     

  12. The latest Matlab version supported by the PowerPMAC IDE 4.6.0.14 is the 2020b.

    You can check all the supported versions on the path:
    C:\DeltaTau\PowerPMAC\4\IDE\MATLAB Component
     

    Another option would be checking if there were any updates about Matlab support on the latest IDE release.

  13. Not much related, but it might be interesting to add for discussion.
    Recently I have faced some differences on Sys.Cdata[i] structure between different firmware versions.
    I can't say if the difference is due to firmware version, or is something more intrinsic to the cpu (since the PowerPC endianess diverge from the ARM).

    While in fw 2.5.0.4 the Sys.Udata[0] points to the same region of Sys.Cdata[3], in fw 2.7.1.0 Sys.Udata[0] points to the same location of Sys.Cdata[0].

    image.png.be6db6d9640c37005d35937e08603e50.png

    image.png.5961dd1a647b7cca0d102c94cd4567ff.png

     

    About the roll over, I have tested and both of the versions presented the same behaviour that Dave described.

     

     

  14. For the Sys.Udata[x] stucture this seems to work
     

    ptr pUdata(8)->u.user:$24.0.32+ 
      	// OR u.user:36.0.32+
      	// OR u.user:36+ ,if not using offset or setting the maximum size

     

    pUdata(0),8
    M8192=0
    M8193=0
    M8194=0
    M8195=0
    M8196=0
    M8197=0
    M8198=0
    M8199=0
    M8192,8->
    M8192->u.user:$24
    M8193->u.user:$28
    M8194->u.user:$2c
    M8195->u.user:$30
    M8196->u.user:$34
    M8197->u.user:$38
    M8198->u.user:$3c
    M8199->u.user:$40
    
    Sys.Udata[9]=9,10,11,12,13,14,15,16
    pUdata(0),8
    M8192=9
    M8193=10
    M8194=11
    M8195=12
    M8196=13
    M8197=14
    M8198=15
    M8199=16

     

    • Thanks 1
  15. As just an educated guess, to set correctly the Motor[x].HomePos in that case, it's necessary to consider the current HomePos.

    Since the queried position on the position window is equivalent to Motor[x].ActPos-Motor[x].HomePos, so setting a position to zero should look like something like
    Motor[x].HomePos={commanded position}-Motor[x].HomePos

    As far as I know, the PSET also exists for PowerPMAC, that I suppose that does exactly the same operation manipulating the HomePos.

    I hope that helps.
     

    • Thanks 1
  16. Hi @DaveBarnett,

    What I know about that kind of syntax is this equivalence
     

    Sys.Udata[0] // u.user:0
    Sys.Udata[1] // u.user:4
    Sys.Udata[2] // u.user:8
    Sys.Udata[3] // u.user:c

    The same applies for Idata, Fdata and Ddata (respecting the data structure organization)

    The u.user structure follows something like this
    u.user:{Beginning of that memory}:{Number of bits shifted}:{Number of bits}.
    Haven't been able to find the purpose of the "+" on your example, maybe is something specific for the BufIO.

    I'm also interested if there is anyway more elegant of handling those structures.


     

    image.png

  17. Indeed, the firewall was blamed.

    For anyone that might have the same issue, the firewall configuration can be checked in:
    Control Panel > System and Security > Windows Defender Firewall > Allowed applications

    Here, it should exist an entry for DeltaTauGatherProgram, if there isn't it can be added with "Allow another app" option and pointing the path that should be something like :
    C:\DeltaTau\PowerPMAC\4\IDE\PlotControl\DeltaTauGatherProgram


    Notice that the permission is defined for each: Domain, Private and Public.

  18. It might be related with the issue described in:
     


    My suggestion would be: try to query  Sys.RtIntErrorCtr to check its value, then set it to 0, and check it again.
    If possible repeat the same steps without using the IDE (ssh'ing the controller, and opening a gpascii connection)


    If the error is not recurrent, then it is possible to include in the PLC that runs after a power-on/reset, setting it to 0.

  19. Since you want a high-frequency pulse generator, it might help to use PhaseCtrl = 8.

    In that way, I suppose that with your servo routine being executed at the phase interruption, obtaining the same effect as a motor being commuted (without closing the current loop).

    If I'm right in supposing that, you will need to :

    • Consider the Sys.PhaseOverServoTime in your servo routine.
    • Set your feedback properly to this mode by configuring the Motor[x].pPhaseEnc/PhaseEncLeftShift/PhaseEncRightShift

    I hope that helps.

×
×
  • Create New...