{"id":3092,"date":"2023-05-16T16:58:09","date_gmt":"2023-05-16T08:58:09","guid":{"rendered":"https:\/\/www.tosunai.com\/?p=3092"},"modified":"2024-04-23T16:02:38","modified_gmt":"2024-04-23T08:02:38","slug":"tsmster-new-function-canoe-automation-control-module","status":"publish","type":"post","link":"https:\/\/www.tosunai.com\/en\/tsmster-new-function-canoe-automation-control-module\/","title":{"rendered":"New feature release|TSMaster adds CANoe automation control module, welcome to download and experience!"},"content":{"rendered":"
Click on the icon of the CANoe Automation Module to open the window.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t If CANoe is not installed or if CANoe's automation server is not registered, TSMaster will print an error message. The user can register himself according to the error message. After CANoe has finished booting, we can open a sample configuration with system variables at will. We can look for the various examples in the programming section.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t For example, the COM Automation via Python example configuration. When you open it, you will find a Simulation Setup, where we can browse the logic of each simulation node.<\/p> We can see that this is a simulation of the operation of the lights of a car, we can go to Analysis and see that it has panels, various buttons, traces and graphics. the first script is the control of the engine; the second is the control of the lights. We can see that there is such a system variable change event inside the light control, which is the switch of the double flashing lights. This control code is to achieve the flashing function of the double flashing lights by stimulating the system variable of the double flashing lights-HazardLightsSwitch.<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t Back in TSMaster, click Refresh System Variables List and expand it to see all system variables in the current state of CANoe.<\/p> One of them is Lights, and under this Namespace there is a HazardLightsSwitch, which is the variable we want to control.<\/span><\/p> > First we start the CANoe emulation. Click on the Start Emulation button of TSMaster and the CANoe emulation will start normally. It is important to note that all operations of the interface you just saw can be done automatically with TSMaster's script.<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t > We try to modify the system variable of the double blinker of CANoe in the interface, you can double click or press enter, after that a modify dialog box will pop up, enter 1 and press enter, then go to CANoe, we can find that the double blinker of this car in CANoe has started to blink.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t > We go back to TSMaster, change this variable to 0 and press enter, you can see that the double flashing light goes off. This is the core functionality currently supported by the CANoe automation module. It is able to automate through system variables, and this module will add new control functions later, so stay tuned...<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t > We click on Stop to stop the simulation, then open an Automation Module interface, press Enter and add an action, which we set to an API function call, where we need to use the many APIs that come with the CANoe Automation Module. we select the applet library function, here is a list of the 24 API functions inside the CANoe Automation Module.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t > First of all, the first function is to connect CANoe, double click on it to add it in, the second step after connecting CANoe, we can copy this code Ctrl c plus Ctrl v. Then the second step is to start the simulation, start the simulation is naturally canoe_start enter, so that the canoe_start API is selected.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t > After starting the emulation, we may need to wait a second, press enter, and then double-click on the new action, which we can choose to still be an API call, but at this point is our internal system function. > Then we select wait, the time displayed is 1000 milliseconds, the message is wait some time, after 1 second we want to trigger a change in the variable of the double flashing light. Again enter, then check our new action, it changes to API function call library function, function name needs to be filtered by set.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t > Here are some functions to set the system variables, suppose after we set them, we may need to wait for 5 seconds to observe. Then we change the wait parameter time to 5000, then we need to set the variable to 0 to stop the double blinker. Then we may need to stop for another 3 seconds to observe, then we copy the wait function again and change it to 3000, then we stop the emulation and stop the disconnection of CANoe.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t > We went ahead and copied and pasted it and changed it to disconnect, which completed the design of a flowchart. Then, by means of the flowchart, we have completed the design of the control logic. At the same time, this flowchart is an executable program that can be executed by pressing F9. Switching to CANoe, we can see the double flashing lights flashing, and after 5 seconds, the double flashing lights are off. Finally the whole process is finished and the simulation is stopped.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t Here we believe that there will be a lot of user demand for the CANoe automation module of TSMaster. The existing logic can still be run in CANoe, which is equivalent to the fact that the two software can be co-simulated. On the one hand, many unique functions that only CANoe CAPL scripts can execute are realized; on the other hand, the efficiency of development debugging and testing can be improved.<\/p> The above is our TSMaster's CANoe automation module function demonstrated for you in this chapter, more detailed operation steps can be watched at the B station Oh!<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\u4e8c\u3001 the sample configuration<\/h4>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
Sample configuration<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\u4e09\u3001to achieve CANoe double flashing light flashing<\/h4>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
CANoe double flashing lights are achieved<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\u56db\u3001in the TSMaster control flicker<\/h4>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
Control double flash in TSMaster<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t