Jump to content
OMRON Forums

leandro.martins

Members
  • Posts

    91
  • Joined

  • Days Won

    6

Posts posted by leandro.martins

  1. 22 hours ago, RafaelFalcaro said:

    Yes, the pfm_clock_div value is correct. Making the mask with 0b1111 or 0xF don't give the same result?

    You're right, I've misread as 0x0b1111.
     

    15 hours ago, RafaelFalcaro said:

    Or even, a register that configures the controller to only use the new return value of the servo loop in the next Servo Interrupt?

    Maybe you can do this using a static variable.
    I've never tried to use in a Real-time routine on powerpmac, so, I'm  not sure if work.


    If you want to try, it would be something like this:
     

    double custom_pfm(struct MotorData *Mptr) {
    
        // Auxiliar variables
        double servo_out, servo_period, pfm_clk_freq, pos_error;
        static double servo_out_nxt = 0;
        unsigned int pfm_clock_div;
        volatile GateArray3 *Gate3;
    
        // If closed loop is enabled
        if (Mptr->ClosedLoop == 1) {
    
            servo_out = servo_out_nxt;
    
            // Calculates position error relative to JogPos
            pos_error = ((Mptr->JogPos) - (Mptr->HomePos)) - ((Mptr->ActPos) - (Mptr->HomePos));
    
            // Calculates PFM clock frequency
            Gate3 = GetGate3MemPtr(0);
            pfm_clock_div = ((Gate3->HardwareClockCtrl) >> 16) & 0b1111;
            pfm_clk_freq = 100e6 / pow(2, pfm_clock_div);
    
            // Calculates Servo Period
            servo_period = (pshm->ServoPeriod) / 1000;
    
            // Calculates Servo Out
            servo_out_nxt = ((pos_error / servo_period) * 65536) / pfm_clk_freq;
    
            // Saturates at 5 MHz
            if (servo_out_nxt > 3276.8) {
                return 3276.8;
            } else if (servo_out_nxt < -3276.8) {
                return -3276.8;
            }
    
            // Return Servo Out
            return servo_out;
        } else {
          	servo_out_nxt = 0;
        }
    
        // Return 0 if closed loop is not enabled
        return 0.0;
    }



     

  2. 2)
    I vaguely know how Sys.IData[x]/Sys.UData[x] works.

    Both of the elements points to the same memory address, being just interpreted in different format depending on what element you consult.

    Negative values are stored in two's complement, so for converting you'll need to invert all of bits of the integer, then add 1.
    When you query for Sys.Udata[x], the bits in that address would be interpreted as an unsigned integer:
    bit0*2^0 + bit1*2^1+bit2*2^2...+bit31*2^31

    e.g.
     

    Sys.IData[0]=1
    
    Sys.IData[1]=-1

    Then

    Sys.UHex[0]=$1
    Sys.UData[0]=1
    
    Sys.UHex[1] = $ffffffff // Inverting $00000001 --> $fffffffe, then add 1 --> $ffffffff
    Sys.UData[1] = 4294967294

    I don't know if that was exactly the question, but I hope that helps.
    I'm sure that Gregs can complement my answer if necessary.

    • Thanks 1
  3. Hello @xuantran,
    I believe that commanding out0 or j/ in any of the motors should clear the fault when the input signal is in a healthy signal.

    You can test that doing the following

    Sys.pAbortAll=Sys.Idata[10].a	// Sys.Idata[10] as Abort input
    Sys.Idata[10]=1 		// Abort State
    Sys.Idata[10]=0			// Healthy State
    #1j/				// Clears Sys.AbortAll

    In case that you don't want to use a real motor, you can use the Motor[0] for that, being necessary to set Motor[0].ServoCtrl=1.

    [EDIT]
    Complementing the answer, as described in the Software Reference Manual, the "abort all" state is cleared after the abort input is 0, and any motor or coordinate system is commanded

    Quote

    Sys.AbortAll is set back to 0 when the input is not set and any motor or coordinate system is
    commanded to exit its final “abort all”

    As you have a NC switch, depending on how it's connected it might be necessary to invert the logic: ideally changing the electrical connections; or by software.
    One way of doing by software would be something like this:

    #define _AbortInput 	Gate3[0].GpioData[0].a
    Sys.pAbortAll = Sys.Idata[10].a
    
    open plc 1
    	if (_AbortInput) {Sys.Idata[10] = 0} 
    	else {Sys.Idata[10] = 1}
    close

     

    • Like 1
  4. Thank you for checking Steve.

    We're already thinking in keep the submodules in a different location and automate the process to include in the project structure.

    Anyway, if your permit me, I'd like to let this as suggestion to be considered for future IDE releases.
    I think it could be pretty useful, and my ingenuity make me think that it wouldn't be a very hard to recursively generate the "pp_proj.ini" from a project with more levels then now.
    But I also understand if that doesn't fit in the roadmap.

     

    Thank you again

  5. I tested in FW version 2.5.0.4 and compared with FW version 2.7.0.0.

    For the Gate3 structure, the behaviour is the same on both.

    User variables (e.g. P variables) it's allowed to assign as "nan" in the latest version.

  6. I have been investigating if there is a way to include git submodules in the project.

    Initially, we'd like to keep tracking of the version of each PLC in a git repository, but that could be useful for other instances (e.g. motion programs, kinematics).

    I have edited the .ppproj to include the new folder created by the submodule, the same approach described in the topic:


    I got the same problems, however I figured that if I add the whole path (including the new folder) to the pp_proj.ini, then the PLC is recognized by the PowerPMAC, and could be executed just like any PLC.

    Unfortunately, on the next time that did a download on the IDE, the pp_proj.ini is overwritten, ignoring the submodule folder.


    I'd like to know if there is a way of doing that without have any conflict with the IDE.

    Thank you in advance.

    Leandro

    • Like 1
  7. Checking the header opt/ppmac/libppmac/gplib.h, I got this:
     

    /// Previous modal commands will be retained
    /// The input string must have PMAC compatible commands
    /// Note: Doesn't handle "gpascii" commands like "$$$" or "reboot"
    /// \param[in] *pinstr  - ptr to input string
    /// \param[in] outlen  - max length of output string
    /// \param[in] EchoMode  - PMAC "echo" parameter which determines the format of the response
    /// \param[out] *poutstr  - ptr to output string
    /// \return 0 == OK, - == error number, 1 = ESC character was sent
    int GetResponse(char *pinstr, char *poutstr, size_t outlen, unsigned char EchoMode);

     

  8. 10 hours ago, HJTrost said:

    If I power-cycle the PMAC, the uploaded version of sshd_config has reverted to the old original (imported from /.readonly/etc/ssh/sshd_config ?). 

    Yes, to make it permanent it will be necessary to apply those changes in the .readonly.

    I'm without ideas, maybe someone from ODT will help you more.

    Anyway, I would suggest to send an email to the support, since it could be a problem of incompatibility between the Power PMAC FW and the SSH application.

  9. The motion program that I'm using to test
     

    open prog 1
    	abs
    	linear
    	tm(Q70);
    	A(Q71);
    	dwell 0;
    close

    Running from the terminal
     

    &1 Q70=1000 Q71=100 b1r Ldata.Lindex

    I got Ldata.Lindex=0

    Also let Coord[1].Ldata.Lindex in the watch table and getting 0 as well.

  10. Actually, as I'm just investigating if it's possible to use the L-variables like the manual says, I have just made a very simple test commanding the movements using the cpx command via terminal.

    Is there a call/callsub behind the cpx command?

    [Edit]
    I have tested with a motion program instead of using the cpx
     

    Quote

    open prog 1     

        abs  linear     

        tm(Q70) A(Q71);     

        dwell 0;

    close

     

    And I got the same behaviour:

    • Coord[1].Ldata.L[288] statys as 0, it doesn't matter the value of &1Q71 that use
    • Coord[1].Ldata.L[512] updates to the target position at the moment that I run the program
    • &1p updates with the current value for the whole movement, as expected
    • Using a plc containing the pread is possible to watch the axis A position updating
  11. From the manual, the command "p" is described as
     

    Quote

    Power PMAC leaves the values for each axis whose position is computed due to this
    command in local variable for the communications thread L(256+Sys.MaxMotors+n), where n is
    the “axis index” value 0 to 31 (0 for A, 1 for B, etc.)

     

    With Sys.MaxMotors=32, I'd expect that the position of axis A would be stored in Coord[x].Ldata.L[288], however the target position (not the current) is present in Coord[x].Ldata.L[512].

    It happens in FW 2.5.0.4, cpu PowerPC,APM86xxx.

    Is that an error in the manual or am I missing something?
    Is there any L variable that keeps the current position for each axis reported like the command "p", or the only way is using the pread and D-variables?

    Thanks in advance.

  12. Maybe that might happen because at the moment you command "jog/", your motor has a non-zero velocity, then when you issue the command, the controller will decelerate it before going to the initial position.

    You can try to set Motor[x].JogTa and Motor[x].JogTs to 0, to see if that effect is reduced.
     

  13. Thank you Steve, a description including this information would be great.

    In my opinion, would be interesting evaluate if it's possible to show a warning during the download process as well, since a typo in some situations could lead to that.

     

     

  14. I have noticed that if a 'nan' value is assigned into a Gate3[i].Chan[j].PwmFreqMult, then 0 is set to it.

    Also, the IDE doesn't showed me any kind of error or warning when downloading.

    Tested on:

    • FW: 2.5.0.4
    • CPU: PowerPC,APM86xxx
    • IDE: 4.6.0.14

    Is this behaviour expected?

     

  15. It seems that the problem is solved with the release 2.7.1.

    The snippet of the release notes below:

    Quote

    8. Prevented possibility that closing the IDE on the host computer could stop EtherCAT communications. (With IDE 4.6, if IDE issued ecat reset command and was closed before issuing a $$$ PMAC reset command, EtherCAT network communications could be terminated.)

     

    • Like 1
  16. 16 hours ago, steve.milici said:

    You must sign up for an OmronNow account - in the top right corner.

    Hi @steve.milici,

    That happens after the login.

    A snapshot of the full-screen:
    image.thumb.png.e214da8ef26f473781330d33b0ec6966.png


    Besides this problem in accessing the Omron website, do you have any news about the simulator? Can we still expect some release in that way at the end of this year?

  17. On 3/24/2023 at 5:59 PM, steve.milici said:

    Go here:

    https://automation.omron.com/en/us/omronnow/products-updates/product-launches/

    Select the “Filter By” box for “Motion and Drives”. You must be logged into OmronNow for this link to work.

    I've tried to access this content and had the same 403 error, but with this description about the required permission:
    image.png.5e8ebfee99dc115838fd53447d6e9d42.png

    Is that really necessary to be a Omron distributor/employee to have of that sort of information?

  18. On 5/2/2023 at 2:05 PM, nelukow said:

    4.6.0.14 May 2022 from https://automation.omron.com/en/us/products/family/PMAC IDE gave me a issue where the PMAC HELP file was empty and I could not get it to manually install. 

    4.6.1.12 Jan 5, 2023 from https://www.ia.omron.com/product/tool/pmac-software/index.htm fixed the help file issues and installed properly...but the databases lists of motors and encoders appear to be empty...no motors/encoders are populated by default and user must build their own library one by one.

    The default library of amplifiers is populated by Delta Tau and Omron devices...but the motor and encoder lists remain empty irrespective of amplifier selection.

    Can we get a single download that installs the HELP and product lists? Is there a way to install a default library of motors and encoders?


    Can I find the release notes of the version 4.6.1.12 somewhere?

    Also, it would be great to have an estimated schedule of the next releases, if possible.
    Thanks

×
×
  • Create New...