YASKAWA robot development

Recently, if you need to engage in robot development, you need to understand the development documents.
Yaskawa Robotics, one of the Big Four. The model of the robot is MPL800, the model of the control cabinet is DX100, and the CPU board of DX100 is YCP01 (this is what needs to be distinguished for robot development, and different control cabinet development IDEs are different). Let me introduce MotoPlus, the full name is Motoman Professional Programming Language, which is compatible C language develops the robot control program on the PC, that is, the customer customizes the user program by himself.

Features supported by MotoPlus:

  • Using C language as the development language, there is a rich standard library;
  • MotoPlus IDE can support offline editing and development;
  • The developed program runs directly on the main CPU with high efficiency
  • Built-in rich API, support data conversion, Ethernet, RS232C serial communication, you can easily connect the robot to an external PC or sensor for control

To sum up, MotoPlus is developed in C language, and has its own Motoman library, which can realize external PC or sensor to control the robot through the program, and the customer can customize the program.

Resources available for MotoPlus
MotoPlus provides users with the following services:

  1. Application task control: start/stop application tasks, transfer data between applications through mailboxes and semaphores, exclusive control and execution synchronization
  2. Robot Control: Control the robot from the app
  3. Job control: The application controls the start and stop of JOBs, data transmission between jobs through variables (bytes, integers, double precision, floating point, strings, position variables), and execution of synchronization
  4. CIO control: I/O between application and CIO, and register read/write
  5. Ethernet communication control: Ethernet (TCP/IP) communication from the application, especially using the socket function library included as API
  6. Programming Widget Communication: Data transmission between the application and the programmer application
  7. Events: send event notifications to the application at each I/O control cycle and interpolation control cycle of the system
  8. RS232C serial communication control: RS232C serial communication from application program
  9. Sensor Control: APIs to transfer data in and out of the job and change operating conditions such as path corrections and speed changes, and commands to transfer data between the job and the MotoPlus app
  10. Memory management: Protected memory management specific instructions malloc and mfree support system managed data areas for MotoPlus.
  11. Servo Control: Servo Control from the App
  12. User Watchdog: The watchdog monitors whether the application is functioning properly
  13. Development environment
    (1) Integrated development environment (MotoPlus IDE) for project management of source files, program editor, compiler and linker, similar to MS Visual Studio (2)
    Installing MotoPlus applications from the programmer's CF/USB memory
    (3 ) to debug using printf() via Telnet

Application Development Environment
MotoPlus applications are written in C on the PC and debugged on the DX100 controller. Write an application using the MotoPlus IDE's text editor, then compile and link it to create an execution object. This is installed and executed on DX100 for debugging.
Program development environment and execution environment
Needless to say about development, the environment is similar to that of a general IDE. After development, compile and generate the corresponding static library and .out files, transfer the program to the control cabinet through the telnet function of the IDE, and load the teaching pendant into the control cabinet program for debugging.

I don’t know how to develop it, I need to gather the following
Environment build
application operating environment

Under normal circumstances, the developed program will be stored in the CF (flash memory) of the robot control cabinet CPU (YCP01), and no other hardware or software is required, but the system software version DS1.2F-03 or above is required.
Program execution environment
When the power of the controller is turned on, the CF application program MotoPlusApi stored on the main CPU will first be loaded into the memory, and then this program will be started as a task on the operating system VxWorks and executed synchronously with the system program. The application can start multiple tasks, and can perform JOB or IO communication, synchronous or asynchronous control, data conversion, etc. through mailboxes or semaphores.

The development process is as follows
Development Process
Install the program in maintenance mode
1. Load the application and install it according to the following instructions (there are some differences between different versions, version node DS3.20-14):
(1) Set the security mode to management mode. Select Main Menu {MotoPlus APL.}. Then {LOAD (User Application)}, {LOAD (System Library)}, {FILE LIST (DX)}, {DELETE (DX)}, {DEVICE}, {FOLDER} and {MotoPlus FUNC.SETTING} appear as sub menu. If the system software version is DS3.20-14 or higher, {LOAD (SYSTEMLIBRARY)} does not appear.
(2) Specify the file location. Use the submenus {DEVICE (to select CF/USB)} and {FOLDER (to select the folder containing the application)} to select the appropriate file location.
(3) Select and load the file. Select the submenu {Load (User Application)}. Then specify the "*.out" files in the folder as shown below.

Install the application via DX100 Installer

  1. Copy the created application "MotoPlusApl.out" to the PC's system software upgrade folder "C:\MotoPlusData\DX100 system software\DS1.2F(JP_US)-03\APPLICATION\".
  2. Modify the upgrade file: modify the following files under "C:\DS1.2F(JP_US)-03".
    (1) "mk_vx.ini" file
    add "\APPLICATION\XXXXX.out (the name of the created output file)
    under "\APPLICATION\dummy.txt".
    (2) "RC_setup.ini" file
    add "\APPLICATION\ XXXXX.out (the name of the output file created)
    is under "\APPLICATION\dummy.txt".
  3. Create and upgrade the CF card.
    (1) Connect the CF card reader to the PC, and insert a CF card (256
    MB or more) to upgrade. (A USB memory can also be used.)
    (2) Start "mk_vx_cf.exe" as shown below.
    (3) The following window appears. Enable the CF card driver (Disk E is in the following window), and set other settings to "Do not use".
    (4) Check "VersionUp CF/USB" and press "Start".
  4. After success, insert the CF card created in step 3 into the programmer. Then, press [INTERLOCK]+[8]+[SELECT] to turn on the DX100.
  5. Select "Software Update" in the pop-up box.
  6. The upgrade is successful, restart DX100

Start the program
Load at most one .out program, otherwise an error will be reported: 1020: “MOTOPLUS APPLICATION LOAD ERROR [1]”
and the available memory is less than 2M, then an error will be reported: 1020: “MOTOPLUS APPLICATION LOAD ERROR [2]”
APPLICATION folder cannot be found in CF , an error will be reported: 1020: "MOTOPLUS APPLICATION LOAD ERROR [3]"
The maximum program size is 2M, otherwise an error will be reported: 1020: "MOTOPLUS APPLICATION
LOAD ERROR [4]"

Exception handling of the startup program
Due to the problem of the application program, the system may hang during the running of the robot, and the DX100 may not be able to start normally. In order to recover, DX100 must be started normally while the application is blocked from running. In this case, the DX100 must be started in maintenance mode, set so that the application does not run, start the DX100 normally, and then run the robot. Follow one of the following two procedures:

  1. Start DX100 in maintenance mode, set safe mode to administrative mode. Select "MotoPlus APL.", then select "DELETE
    (DX)" to delete the app.

  2. Start DX100 in maintenance mode, set safe mode to administrative mode. Select “MotoPlus APL.” and then select “MotoPlus FUNC.
    SETTING” to display the setting window. Then set "APPLI.AUTOSTART AT POWER ON" to "DISABLE".

If the above problems occur during robot operation, please choose procedure 2. The above problems during robot operation may be caused by specific conditions. If the MotoPlus app was deleted using step 1, the MotoPlus app must be reloaded in CF to restore after the specific condition clears. In this case, if the application to be loaded does not exist, the application will not run and the system will not recover.

Debugging
For the debugging environment, connect the PC used for development with the RUN-TIME debugger of the controller OS (VxWorks) via Telnet. You can then insert printf() or puts() in your application source code to display messages about variables and the state of program execution while debugging.

Note: Remove all debug code described in the source code after debugging is complete. Otherwise, the processing time of printf() and puts() may affect the system and may cause problems such as insufficient processing time during robot operation .

Note: With the Telnet function, only tasks with normal priority can be debugged. To debug high-priority tasks (tasks started with task priority: MP_PRI_IO_CLK_TAKE, MP_PRI_IP_CLK_TAKE or MP_TIME_CRITICAL, or task "mpUsrRoot"), it is recommended to use the variables of DX100. This is because, if printf() or puts() is executed as a high-priority task, it will consume the processing time of the robot operation control, and a system alarm may occur due to insufficient processing time.

Note: When programming in C language, you can use pointer variables that store memory addresses. If the pointer variable is set incorrectly, the system memory area may be overwritten. If the system memory area is rewritten, serious problems such as software hang (a hang state is detected by a CPU abnormality or watchdog check function, then the servo power is turned off and the system shuts down), the robot stops operating due to an alarm, or programming device cannot operate. If system memory is not operating correctly, the application itself may not function as designed. Therefore, through sufficient testing, the error location can be found. Extensively check the functionality of the application software to ensure that all functions are operating as designed.

Note: When using the SHELL debugging function of VxWorks connected to DX100 through Telnet, system alarms may occur due to insufficient processing time for robot operations. Do not use the SHELL debugging function.

PC connected to DX100
Use DX100 to connect to PC for development. Then the PC can be used as a terminal to debug the program through Telnet. Connect the Ethernet cable to the LAN connector CN104 (RJ-45) installed on the front of the YCP01 board in the CPU rack of the DX100 controller as shown in the figure below.
PC connected to DX100
If you want to use the Ethernet service provided by MotoPlus, you need to use a hub and set up the connection as shown below. The RUN-TIME debugger of the DX100 system software can be
Use the Ethernet function
debugged through Telnet as follows , and can be connected to the debugging PC through Telnet to provide users with various debugging functions.
Therefore, the printf() and puts() functions can be inserted in the application source code, and the desired memory contents or messages can be displayed on the Telnet terminal. Using this procedure, only tasks with normal priority are debugged. Debug high-priority tasks (tasks started with task priority: MP_PRI_IO_CLK_TAKE, MP_PRI_IP_CLK_TAKE, or MP_TIME_CRITICAL, or task "mpUsrRoot").

Note: If the Telnet function is enabled, an alarm such as "0500: SEGMENT PROC NOT READY" may appear when starting DX100. This is because the Telnet task on the DX100 side is executed with high priority, so the processing tasks of other systems cannot be executed normally. If such an alarm occurs, please restart the DX100. Also, after debugging, be sure to set the Telnet function to INVALID (S2C1119 = 0).

  1. Set the IP address, etc.: The Ethernet communication settings corresponding to your environment (such as the IP address setting on the DX100 side) must be made in maintenance mode. The procedure is as follows:
    (1) Turn off the DX100, then turn it back on while pressing [MAIN MENU] to activate maintenance mode.
    (2) Select {SYSTEM} under the main menu, then select {SECURITY}. Then, change the security mode to MANAGEMENT MODE.
    (3) Select {SYSTEM} under the main menu, then select {SETUP}. In the settings window, select {OPTION} to open {NETWORK}. In the NETWORK window, select "DETAIL" for "HOST SETUP".
    (4) Set the IP address in the HOST SETUP window.
    Make sure the PC IP address is on the same subnet as the DX100.
  2. IP address setting restrictions: The Ethernet function of DX100 does not support "10.0.0.xx"
    local IP address (xx: 0-255, decimal number). Therefore, do not use "10.0.0.xx" as the IP address.
  3. Communication port limitation: For the Ethernet function of DX100, the system occupies designated ports of UDP and TCP. Therefore, port numbers less than 10040 cannot be used for MotoPlus applications. Also, the ports used by the system may be added or changed depending on the DX100 software version. If your robot is using
    any of the optional features related to the DX100 Ethernet functionality, make sure not to use the port numbers for each optional feature described in the instruction manual.
  4. Set the fixed IP address (192.168.255.9) as the network setting on the PC side. ("192.168.255." is the same as the DX100 setting.)
    (1) Select Control Panel, and then double-click "Network Connections".
    (2) Double-click "Local Area Connection".
    (3) Open the "General" window, select Internet Protocol (TCP/IP), and click "Properties".
    (4) Check "Use the following IP address".
    (5) Enter "192.168.255.9" as the IP address.
    (6) Enter "255.255.255.0" as the subnet mask.
  5. Set the following parameters to enable the Telnet function. In MAINTENANCE mode, this parameter cannot be changed. So shut down DX100, then restart in normal mode. After booting, change the security mode to MANAGEMENT MODE, and set the following parameters.
    S2C1119 = 2

Note: After debugging, set the Telnet function to invalid (S2C1119 = 0). This is because the Telnet function consumes system processing time, and alarms may occur due to insufficient processing time for robot operations.

  1. Turn on DX100.
  2. On a PC, select Accessories, then select Command Prompt to open a DOS window.
  3. Enter the following command on the command line: c:> TELNET 192.168.255.1 VxWorks login: Net_Maint_Mng Password: 99999999 (MANAGEMENT MODE password) Then the "->" prompt appears and the RUN-TIME debugger of the controller operating system starts.

Note: The above password is the management mode password.

DX100 User Variable Debugging Debugging
of high priority tasks (tasks started with task priority: MP_PRI_IO_CLK_TAKE, MP_PRI_IP_CLK_TAKE, or MP_TIME_CRITICAL, or task "mpUsrRoot") using printf() or puts() may cause processing time for robot manipulation control tasks insufficient. Therefore, use DX100's user variables (B variable, I variable, D variable, and R variable) for debugging. In this case, use the API for writing variables "mpPutVarData()" and "mpPutUserVars()" in the MotoPlus application to describe the debug information, and then debug while viewing the data in the VARIABLE window on the programmer .

error message
wrong description

Guess you like

Origin blog.csdn.net/qq_38750519/article/details/126318567