TSMaster How to Code Auto Send LIN Messages

Application Notes | TSMaster How to Code Auto Send LIN Messages

overviewPreface
Previously we came out on the TSMaster application notes series of several articles, partners feedback are very practical, but also engineers in the use of TSMaster software in the practical problems that will be encountered, today continue to bring you the application notes series of articles - how to code automatically send LIN messages.
Table of Contents for this article

I. Hardware preparation

Use the virtual LIN device that comes with the TSMaster software as an example to demonstrate how to send and receive LIN messages using C scripts.

1|Channel Selection

Click Hardware - Channel Selection in the menu bar and the following window will pop up:
TSMaster How to Code Auto Send LIN Messages

2|Configuration Environment

Select the number of application LIN channels and LIN hardware channels according to your needs. Here, we do not use LIN hardware, so we select the virtual channel for the demonstration, and we can only send messages under the virtual channel (after connecting the LIN hardware, follow this procedure), and click OK.

II. Simulation

Open the simulation window and use the C code editor to edit the telegram code.
TSMaster How to Code Auto Send LIN Messages
(▲Simulation interface)

1|Click Add C Script Editor

TSMaster How to Code Auto Send LIN Messages
(▲C Scripting Interface)

1-1 Creating a New Shortcut Event

Mouse over the shortcut event, right click, add a shortcut event, enter a custom shortcut key; for example, "A".
TSMaster How to Code Auto Send LIN Messages

1-2 Code Writing

Write the code message to be sent under the added shortcut key event screen, for example:
TSMaster How to Code Auto Send LIN Messages

1-3 Selecting the Message Writing Method

The above describes two ways of writing LIN messages, which are chosen by the user.

III. Viewing Message Information

1|View Message Information Screen

Under the Analyze menu bar, check the Message Information option and right-click Add LIN Message Information to view LIN message information through this screen.

2|Download Scheduler

Under the Analyze menu bar, check Message Sending and add LIN Sending, and through this window, download the LIN scheduling table.

3|Setup Self-Start

Set all of the above interfaces that support self-start to self-start, click the lightning bolt icon in the upper-right corner of the interface to set it. Auto-start means that all the interfaces that are set to self-start will run automatically when you click Start in the analysis form.

4|Operation Engineering

In the Analyze window, click Start, and then type "A" on the keyboard. The system message will display the information from the log function, and the LIN message information screen will show the message information to be sent and received. Note that the virtual channel used here can only send TX messages, but if the virtual channel is switched to LIN hardware, the message with identifier 3D will be the receive message RX.
TSMaster How to Code Auto Send LIN Messages

发表回复

en_USEnglish
×
×

产品入口: 产品添加到购物车

Download location

Please click the download button below to start experiencing the powerful TSMaster features. Thank you for your support!

Beta version updated weekly, full version updated monthly
Installation environment
  • 1
    Windows 7 SP1 or higher, supports Win10, and WIn11.

    Operating System

  • 2
    8GB

    random access memory (RAM)

  • 3
    At least 550MB of free space

    disk space

  • 4
    Dual-core (2-core) or higher

    CPU

Please ensure that your computer meets at least these requirements in order to install and run the TSMaster software successfully. If your computer does not meet these requirements, it may cause performance problems or not run the software properly. You may want to consider upgrading your hardware if you need smoother running features.