RTSys software supports multiple program encryption methods to protect customers' intellectual property. These methods include ZAR file generation/download, compilation into a lib file, and controller locking/unlocking.
The main functions of these three tools are as follows: 1. ZAR file generation/download: Protects the source code from easy viewing. Generates encrypted ZAR files, which cannot be viewed but can be downloaded to the controller. 2. Compiles to lib files: Protects the program from easy viewing or modification. Compiling to lib library files only allows viewing the global SUB sub-function definitions; the sub-function contents and the main program cannot be viewed.
3. Controller Lock & Unlock: Protects the program inside the controller from being easily modified. After locking the controller, the program cannot be downloaded to the controller from the host computer.
ZMC432CL-V2 32-axis bus-type motion controller with pulse full closed loop.
The ZMC432CL-V2 is a high-performance motion controller with high-speed real-time feedback and supports pulse full closed-loop control, enabling high-precision, high-response motion control. Its high-precision positioning effectively eliminates mechanical transmission errors, meeting the requirements of high-precision machining applications.
1. Hardware functional characteristics
(1) Rich motion control functions: supports linear, circular, spatial circular, and helical interpolation.
(2) Rich hardware interfaces: Supports pulse axis (with encoder feedback) and EtherCAT bus axis, with 24 inputs and 12 outputs of general IO, some of which are high-speed IO, and 2 analog outputs (DA).
(3) EtherCAT refresh cycle is as fast as 250us, which meets the requirements of high-speed communication.
(4) Supports 4-channel hardware comparison output, hardware timer, and precise output during motion, suitable for multi-channel visual aerial photography and other occasions.
(5) Supports power failure detection and power failure storage, and multiple program encryption methods, which can effectively prevent system failures, protect project engineering file data, and improve system reliability.
(6) Project development is carried out through the domestic IDE development environment RTSys, which can perform real-time simulation, online tracking, diagnosis and debugging. It is easy to use and supports secondary development through joint programming of multiple high-level host computer languages.
2. Main Features
(1) Develop various equipment using readily available APIs.
(2) Stepper Motor External Grating Ruler Full Closed-Loop Solution
① The ZMC4 series offers high-efficiency network port read/write capabilities, and PCIe/PCI series cards can share a memory interface (batch read/write of shared memory takes 3-5µs);
② Built-in backlash compensation, bidirectional pitch compensation, 2D plane compensation, etc.;
③ It can simultaneously support the mixed use of pulse axis and EtherCAT axis motion;
④ The open PT/PVT interface allows customers to customize the secondary programming of acceleration and deceleration algorithms;
For more details about ZMC432CL-V2, click here → Full Closed-Loop Solution for Stepper Controlled Grating Rulers: 32-Axis EtherCAT Bus Motion Controller ZMC432CL-V2.
ZAR file generation/download
By generating a dedicated ZAR encrypted download file, independent program downloads can be achieved. This allows the downloaded file to be sent to end users without concerns about program leakage. The file extension is .zar. RTSys also supports binding to the controller ID (the controller ID is a unique serial number of the controller at the factory). After binding, the ZAR file can only be used by this controller.
How to view the controller ID:
1. Connect the controller in advance, and check the ControllerID information in the menu bar "Controller" → "Controller Status";
2. After connecting the controller, enter ?SERIAL_NUMBER in the "Online Command" window of the 【Commands and Outputs】 window, and click "Send" to print out the controller ID.
Compiling the current project into a dedicated ZAR encrypted download file enhances program security while allowing for independent program download. After generating the ZAR file, no code is visible, but the ZAR file can be downloaded to the controller for execution. Note: The password uses an irreversible algorithm; once forgotten, it cannot be retrieved! Please remember your password! Each controller has a unique ID that cannot be modified!
How to generate ZAR files
1. After debugging the program, open the window via the menu bar "Controller" → "Generate ZAR File". Users can choose to generate the encrypted file using either password binding or controller ID binding by checking the corresponding box. (Both options are supported simultaneously, but both must be selected for download.)
2. If you choose the password binding method, check the current option and set the password in the input box. (The password supports letters, numbers, and some special symbols such as "_", and can be up to 16 characters long.) If you are unsure whether the entered password is as you expect, you can uncheck the "***" after the input box.
If you choose the controller ID binding method, check the current option and enter the controller ID in the input box. (Each controller has a unique ID; please refer to the controller ID viewing method above for instructions.)
3. After setting the encryption method, click "Browse" for the Zar file item, select the save path for the Zar file, and then click "OK".
Downloading a ZAR file means re-downloading the generated ZAR file to the controller. To download a ZAR file, you need to enter the correct password or use a controller that is already bound to the program.
How to download ZAR files
(a) Downloading ZAR files in RTSys
ZAR files are encrypted packages of the entire project, so you don't need to download the project itself when downloading a ZAR file.
1. Open the RTSys software and connect to the corresponding controller (if the ZAR file is already bound to a controller ID, you need to connect to the bound controller). 2. Use the APP_PASS command to verify the password. In the "Online Command" field of the 【Commands and Output】 window, enter: APP_PASS(password), and click "Send". (The password in parentheses is the character password set by the user).
3. In the menu bar, click "Controller" → "Download ZAR File". A pop-up window will appear. Locate the path where the ZAR file is stored, select the ZAR file, and click "Open".
4. If the password or controller ID is correct, the information shown in the image will be printed in the "Commands and Output" window, indicating a successful download. (If using the controller ID binding method, the controller ID will be automatically verified during ZAR program download; only if the ID matches will the ZAR program be successfully downloaded to the controller.)
5. If the download fails, the following window will pop up. At this time, you need to check whether the password you entered is correct or whether the controller ID is consistent with the currently connected controller ID.
(II) Loading ZAR files using a USB flash drive
1. Open the RTSys software, connect it to the controller, and insert the USB flash drive containing the ZAR files into the controller's USB port.
2. Use the APP_PASS command to verify the password. In the "Commands and Output" window, enter APP_PASS(password) in the "Online Command" field and click "Send". (The password in parentheses is the character password set by the user.)
3. Use the "LOAD_ZAR" function of the FILE command to load and execute the ZAR file on the USB drive. In the "Commands and Output" window, enter the following in the "Online Command" field: FILE "LOAD_ZAR","filename", and click "Send" to download. Note: "filename" in the command is the ZAR filename, and the filename must contain English characters to be downloaded!
Compile into LIB file
This function, like ZAR download, falls under the category of program encryption. The "Compile to Lib" function can compile a program file into a library file and save it, which is convenient for program confidentiality or preventing modification. The file name of the library file has the suffix ".zlb", and the library file can only display the global SUB definition.
How to compile Lib files:
1. After the program debugging is complete, click "File" → "Compile Lib" in the menu bar, then select the program file that needs to be compiled into a Lib file, and compile it into a library file. (Multiple program files can be compiled simultaneously.) 2. Select the compiled Lib file and save it to the target path.
Methods for downloading Lib files:
1. Open/create a new project file (.zpj), and add the compiled Lib file back to the project. In the Project View window on the left side of the software, right-click and then click "Add to Project", as shown in the left image below.
2. Locate the target path where the Lib file is saved. Select the Lib file and click "Open" to add it to the current project, as shown in the image on the right below.
3. Set an automatic running task number for the Lib file, and click "Download to RAM/ROM" to re-download the Lib file to the controller.
Opening a Lib format program at this point will show the declaration of the program's main definition. Only the global definition can be viewed, but the definitions of local variables and the specific process of SUB sub-functions cannot be seen. This is suitable for keeping subroutines confidential when multiple people are developing together.
RTSys controller lock & unlock
Locking the controller involves setting a password to lock it, primarily to protect downloaded programs. After locking, the host computer program will be unable to download to the controller, but generated ZAR files can still be downloaded. Unlocking the controller requires entering the correct password. Note: 1. Debugging is disabled after locking the controller; 2. The password can be set to numbers, letters, and special symbols, with a maximum length of 16 characters; 3. The password uses an irreversible encryption algorithm; once forgotten, it cannot be retrieved. Operating the controller after locking it will display a message prompt. Unlocking the controller requires entering the password. Operation path: Menu bar "Controller" → "Lock Controller" / "Unlock Controller".
Lock controller
Unlock controller
This concludes our tutorial video on the intellectual property protection of the EtherCAT motion controller program with a closed-loop pulse for positive motion technology.
For more exciting content, please follow the "Zheng Motion Assistant" WeChat official account. For related development environment and example code, please contact Zheng Motion's technical sales engineer: 400-089-8936.
This article is original content from Zheng Motion Technology. We welcome everyone to reprint it for mutual learning and to jointly improve China's intelligent manufacturing level. Copyright belongs to Zheng Motion Technology. Please indicate the source if you reprint this article.