Uploading programs to several TRIK robots from Sublime Text

This article discusses the possibility of simultaneous loading of programs on a group of robots using the external text editor Sublime Text. The article is a continuation of the next material

pageRunning a 2D model in TRIK Studio from Sublime Text

Setting up

Download the send_files.cmd file for Windows and place it in the folder where TRIK Studio is installed.

The manual was tested on Sublime Text 3 (Build 3211). You can download Sublime Text from the official website.

Before starting the program for the first time, you should log in to the TRIK controller via WinSCP. Instructions on how to do this are available here. After that WinSCP will remember that it was allowed to establish a connection with this robot and will not require confirmation. This step must be repeated each time a new controller is connected.

1. Start Sublime Text.

2. Choose Tools → Build System → New Build System

3. A window with a text file will open. In it, you need to erase everything and insert the following code instead:

{
"cmd": ["D:\\TRIKStudio\\send_filesl.cmd",<path to scripts dir>, "<file with ip addresses>"],
"selector": "source.js"
}

Where:

  • <path to scripts dir> — the full path to the folder with the programs to be loaded onto the robots,

  • <file with ip addresses> — the name of the.txt file that contains the IP addresses of the robots to upload the files.

  • There must be one IP address per line. The file must be in the same folder as the programs to be uploaded.

4. Specify your path to the send_files.cmd file instead of the one specified in the code.

Exapmple:

"cmd": ["C:\\TRIKStudio\\send_files.cmd", "C:\\Users\\Admin\\myfiles", "ip_addr.txt"]

5. Save the file in the suggested directory <system directory>\Sublime Text 3\Packages\User under the nameTRIK_SEND.sublime-build.

6. ChooseTools → Build System and then in the list opened chooseTRIK_send.

7. To start sending programs to robots, just click Tools → Build or the corresponding key combination Ctrl+B. In order to return to start the 2D model, select Tools → Build System and select TRIK in the list that opens.

Last updated