Kvaser TRX: Getting started with TRX

Kvaser TRX

Getting started with t program development in TRX



When you start TRX the first time, your editor will have a single tab labeled <New>. As a first program, try entering:

on start {
   printf("Hello World!\n");

This a very basic program that reacts on an on start event and prints Hello World! in the Device Output. It is the actual device that sends the "Hello World!" to the computer where TRX reads.

Now compile the t program by going to Run->Compile in the menu bar, or by pressing F9. To be able to compile you first have to save the t program. TRX will prompt you for this, it will also prompt you to save a project file. Pick suitable names and save. Note that the project overview panel to the right of the editor is automatically updated when you compile.

Next, connect a t program capable Kvaser device. You can see that TRX can use your device if the combobox just under the menu bar has the name of your Kvaser device listed.

To test the t program, just go to Run->Download, this will download the t program to the device. Next step will be to actually run the program. Run->Run will start he application, and hopefully you will see the printf printout in the Device Output window Device Output panel below the editor. (NB: If you don't see such a panel it may have been hidden by accident. If so, then go to Window->Toggle Lower Pane or press F7 to toggle its visibility!)

If everything worked, you are now ready to develop more advanced t programs! Good luck!

Related topics
The menu bar
The toolbar
The toolbar
The project overview
The output panel
Keyboard short-cuts