Jump to content
OMRON Forums

leandro.martins

Members
  • Posts

    91
  • Joined

  • Days Won

    6

Everything posted by leandro.martins

  1. You're right, I've misread as 0x0b1111. 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. Hello Rafael, Are you getting the expected value in pfm_clock_div? It's not clear to me why you are masking with 0b1111, instead of getting the first 4 bits (0xF) after the right-shift getting the bits 16-19 of HardwareClockCtrl.
  3. 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.
  4. 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 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
  5. 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
  6. 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.
  7. 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
  8. 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);
  9. 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.
  10. Hello @HJTrost Your problem seems similar to the described on this topic: It might worth to try increase the ClientAliveInterval setting, or setting to 0 to disable the timeout.
  11. 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.
  12. 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 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
  13. From the manual, the command "p" is described as 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.
  14. Thanks Steve, I'll keep that in mind and maybe think about some sanity check for the cases that the value assigned is calculated from other data-structure elements.
  15. The DesPos is calculated at each servo interruption. You can check the coefficients of cubic equation used for the calculation in the "Motor[x].New[i]." structure. How did you design your tracking filter (cutoff frequency, damping and sample rate)?
  16. 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.
  17. 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.
  18. 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?
  19. It seems that the problem is solved with the release 2.7.1. The snippet of the release notes below:
  20. @Vit_SA What exactly happens when you try to download the project? Does it fails or is it successfully downloaded and the Motor[5] behaves unexpectedly?
  21. Hi @steve.milici, That happens after the login. A snapshot of the full-screen: 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?
  22. I've tried to access this content and had the same 403 error, but with this description about the required permission: Is that really necessary to be a Omron distributor/employee to have of that sort of information?
  23. 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
  24. Hello @DaveBarnett There is a problem with PVT having an ARM in the FW 2.6.1, could it be your case? In that case, have a look at this topic for more details. The problem is also present in the release notes in the Software Reference Manual.
×
×
  • Create New...