Let's Meet TRX
TRX is a simple and lightweight IDE for t development. Once the program is launched from the Start menu under Kvaser CANLIB SDK , TRX will immediately open to a new, unsaved project. At the top are your typical drop-down menus for file management, text editing, search, and help resources. In addition, there are also Project, a drop menu for managing the project file such as saving or opening a different project, and Run, a drop menu containing options for compiling your t script, running the script, going online, and back offline directly from TRX.
Below those drop-down menus are several buttons for common actions you may want to use such as a quick save button or undo. Beside these is the Start button which will start your script and then change to a Stop button. To the right of the Start button is a drop-down menu for t compatible channels currently connected to the PC so you can select which channel the t script should be running on. Next to this menu, there’s a refresh button to update the list of channels if a device is plugged in or unplugged from the PC after TRX was launched.
Below are the three main windows of TRX. The first, on the left, is the editing window. This is the main window of TRX where you will be writing and editing code. Above this window are tabs allowing for easy navigation from file-to-file when working on a project that involves multiple scripts. As you begin to write code, you may notice text changing color or becoming bold when key words are entered into the program. This is called syntax highlighting and is a common feature of IDEs to make reading code a bit easier on the eyes with TRX being pre-configured to make t as clear as possible.
The window to the right of the editing window is the project window. While many examples of t being used only involve a single t script, the language does support larger projects that span multiple scripts. Once a project gets to be larger, being able to manage these files in the project by the project window makes for a simple way to track your code.
The final window at the bottom of the application is the build and device output where the details regarding the compiling process and the console output of the t script can be seen respectively. The small box to their right is the Send Key Event button. Some t scripts have events that will trigger on a Send Key event. By putting a key press in the field and clicking the Send button, these events can be triggered at the user’s discretion.