Jump to content
OMRON Forums

MoMo

Omron
  • Posts

    36
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by MoMo

  1. The simplest way is to create a virtual motor #1, and then let real motor #2 and real motor #3 follow the virtual motor. Then set Motor[2].JogSpeed and Motor[3].JogSpeed And use the Jog+ or Jog- command for real motor #2 and #3. The motion speed of the real motor is the speed of virtual motor #1 + the speed of real motor JogSpeed.
  2. can this still use pDAc = pEnc + Mtr2VelOffset from your rticplc? No PMAC always controls the motor in position mode, so if you want to control a certain motor for speed offset, you must convert the speed offset into position. This has nothing to do with whether you use CSV mode or not. It can still be achieved using CSP mode. And using CSV mode in the EtherCAT system does not bring good servo performance. The only way to achieve this is to let the real motor follow the virtual motor. You can see in my example, I'm not tampering with any motor output values, I'm letting the other motors follow. Motor2 and Motor3 follow the modified Motor1 position. Position and velocity are the same at a given time. Just like your monthly income of $5,000 represents speed, then you have earned $25,000 this year, which represents position. If you go to a bank for a loan, the bank needs to confirm your monthly income, but PMAC is a special bank. It only confirms how much you earned this year. The most important thing is how to convert the offset speed into position information. In my example, this is achieved through the encoder conversion table.
  3. Normally, when EtherCAT works in CST mode, the driver will complete the current loop control and motor commutation control by itself. You can place speed loop and position loop control in the controller using user-defined servo algorithms. But due to the huge delay of the EtherCAT bus, your control performance will be far worse than that of the servo drive working with CSP mode.
  4. Because the scripting language of PMAC is not an object-oriented language, it will be more difficult to program in an object-oriented way. Regarding blocking issues, Switch case can be used in scripting languages to replace the delay method of Call Timer, including using Sys.CdTimer[i]. Instantiation can only be implemented using base address + offset address addressing for the variables in it. Or you can consider using CPLC, there are many explanations and instructions on how to program C language in an object-oriented way. Even in a single thread, multi-threaded operations are implemented. All in all, other methods are more complex than using multiple PLCs. Of course, if you are very willing to pursue the elegance of programming, you can consider the above methods.
  5. The following is a simple demonstration using CPLC and virtual motor. There are many ways to achieve similar effects, including not using CPLC. The difficulty in using it on a real motor is the control of acceleration and deceleration. Since you did not specify an explicit application, this method does not guarantee that your device can be used. VelocityOffset.mp4 VelocityOffset.zip
  6. Can you answer a few questions for me? ① Do you want motor #2 and motor #3 to have a fixed speed deviation from motor #1? And this deviation will change at any time? ② If the motor changes speed while it is moving, positional alignment cannot be guaranteed, or there is a speed change process when changing speed online.Is this acceptable? ③When motor #1 is moving forward, its speed minus the deviation is less than zero, is motor #2 or motor #3 moving in reverse?
  7. We have not received similar reports from other customers. In the case that we can't reproduce your issue on our end, we can't be sure it's a bug. Please provides the necessary conditions to reproduce the failure, ensuring that we can reproduce yours.
  8. 1.You can use the free directive to see the remaining cache size 2.You can use the "Clear Prog N" command to clear the specified motion program, where N represents the motion program sequence number.
  9. According to the Power PMAC Software Manual, there is no vcross in the scripting language, so its use in the scripting language environment is not supported.
  10. PMAC actually only controls the position of the motor (closed-loop control). When you plan a position-time motion curve, the velocity-time curve is also determined. Because speed is the derivative of position, if you just want to change the speed without updating the program, you can use TimeBase. No, because PMAC is a closed-loop control that controls the motor position. If you use CST or CSV mode, PMAC's PID algorithm will correct the offset you apply. Give a simple example: If you are a boiler worker, you have a supervisor who monitors the boiler temperature and tells you how much coal to add. You want to get off work early and speed up adding coal to the boiler. At this time, your supervisor finds that the boiler temperature rises too fast and will start to order you to reduce the coal addition. If you do not obey your supervisor's orders, your supervisor will think that there is a risk of the boiler losing control and will open the boiler's pressure relief valve and shut down the boiler directly (PMAC kill the motor). This is similar to if you have two bosses in the company and give you two opposite instructions, how should you execute them? I suggest you tell us your project requirements, because your idea is basically impossible to implement now, and this is not a limitation brought by PMAC.
  11. I think DaveBarnett's method is actually a good method. You can ensure precise synchronization of the two coordinate systems through TimeBase and achieve precise delay through PLC0. First set Coord[x].DesTimeBase=0 in the two coordinate systems, and then run the running program. At this time, the motor will remain stationary. Then first restore the Coord[x].DesTimeBase of the first coordinate system to Sys.ServoPeriod, and start the countdown, and then restore the Coord[x].DesTimeBase of the second coordinate system.
  12. First you must clarify the following: ①No matter what mode your motor uses in PMAC, CSP, CSV or CST, PMAC will eventually change it to position control mode. ②When you use a motion program, the controller plans a position-time curve, so its speed-time curve is also determined. ③If you want to simply offset the motion speed through DacBias, this is only possible when the motor is in open loop mode, which for your current situation means that you cannot control the position. ④The easiest way for your current situation is to use the TimeBase or Coord[].SegOverride mentioned above to change the speed. The premise of using Coord[].SegOverride is that Coord[].SegMoveTime is not 0
  13. I think the IDE cannot run on WinXP because the IDE was developed and tested without considering WinXP at all. Even if you install it successfully, there is no guarantee that it will work properly.
  14. Thank you very much for your information
  15. I use the following RS232 to Ethernet module. About $30 /*For more information see notes.txt in the Documentation folder */ #include <gplib.h> #define _PPScriptMode_ // for enum mode, replace this with #define _EnumMode_ #include "../../Include/pp_proj.h" #include <gplib.h> #include <stdio.h> #include <sys/socket.h> #include <arpa/inet.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <netinet/in.h> #define PORT_NUM 9739 //端口号 int main(void) { InitLibrary(); // Required for accessing Power PMAC library int server_sockfd = -1; int server_len = 0; int client_len = 0; char Cmd[256],Recv[256]; int result = 0; int i,length_of_Cmd_Recv; struct sockaddr_in server_addr; struct sockaddr_in client_addr; // 创建数据报套接字 server_sockfd = socket(AF_INET, SOCK_DGRAM, 0); // 设置监听的端口、IP server_addr.sin_family = AF_INET; server_addr.sin_addr.s_addr = htonl(INADDR_ANY); server_addr.sin_port = htons(PORT_NUM); server_len = sizeof(server_addr); client_addr.sin_addr.s_addr = htonl(INADDR_ANY); client_addr.sin_port = htons(0); client_len = sizeof(client_addr); // 绑定(命名)套接字 bind(server_sockfd, (struct sockaddr *)&server_addr, server_len); length_of_Cmd_Recv=sizeof(Cmd); for(i=0;i<256;i++) { Cmd[i]=0; Recv[i]=0; } while (1) { // 接收数据,用 client_addr 来储存数据来源程序的IP端口 result = recvfrom(server_sockfd, &Cmd, length_of_Cmd_Recv, 0,(struct sockaddr *)&client_addr, &client_len); result = GetResponse(&Cmd,&Recv,length_of_Cmd_Recv,0); //发送处理后的数据 sendto(server_sockfd, &Recv, length_of_Cmd_Recv, 0, (struct sockaddr *)&client_addr, client_len); //清空缓存 for(i=0;i<256;i++) { Cmd[i]=0; Recv[i]=0; } } // 关闭套接字 close(server_sockfd); CloseLibrary(); return 0; } The above is the Socket communication code of PPMAC. I recommend using UDP communication because UDP communication is closer to the serial port and is carried out in the form of messages.
  16. According to my experience, if there are two lines of programs at the same position, the above error will occur. You can add line labels to the program so that you can know the approximate location of the error in the program.
  17. I suggest you upgrade your IDE to 4.6.3.6 because the new version of IDE fixes many bugs. The following is the download link https://www.ia.omron.com/product/tool/pmac-software/
  18. Run the IDE in administrator mode? Or turn off anti-virus software?
  19. I suggest you upgrade your IDE to 4.6.3.6 because the new version of IDE fixes many bugs. The following is the download link https://www.ia.omron.com/product/tool/pmac-software/
  20. You can use the script's preprocessing instructions to implement different settings. The example is as follows: Then you can directly modify the predefinition in us'rflash via the sed command in Linux, such as the “_Machine_1” in the example above. Use the instructions below to switch the _Machine_1 to _Machine_2.After that, all you have to do is send $$$ and you'll be able to use the new settings system mount -o remount,rw /opt system sed -i 's/#define _Machine_1/#define _Machine_2/g' /opt/ppmac/usrflash/Project/PMAC\ Script\ Language/Global\ Includes/global\ definitions.pmh system mount -o remount,ro /opt
  21. I think your idea is very creative. I don't know much about your equipment, something like this can be fixed in the controller as a file. Or modify and set through a host computer software. I may not want unrelated personnel to easily change the PMAC controller configuration through DIP switches. I personally prefer to perform this operation through a dedicated host computer software. I think your needs can be met, but it will be a little more complicated.
  22. My personal experience is that I don't trust the settings generated by the IDE software. Usually I write the settings into the Global Includes folder, and disallow PPMAC from using systemsetup.cfg. It is very reliable to use the "fsave" command to temporarily save the contents of certain variables. Our users have been using it without any problems.
  23. Please use English or contact Omron in China for resolution.
  24. Add your slave station in my IDE, PDO can be edited, just add the content is still byte. The content that can be added or modified in PDO is also determined by the ESI file, so you still need to consult Hilscher on this issue. But there is a high probability that it will be what I guessed before, and it won’t be very elegant.
  25. If you are using a direct drive motor (linear motor), you do not need to compensate for backlash. In other words, the reverse error you measure in a laser interferometer cannot be compensated and is due to mechanical precision. The compensation table can only improve the absolute positioning accuracy of the motor, but cannot improve the repeated positioning accuracy.
×
×
  • Create New...