{"id":21323,"date":"2025-10-29T13:59:23","date_gmt":"2025-10-29T05:59:23","guid":{"rendered":"https:\/\/www.tosunai.com\/?p=21323"},"modified":"2025-10-29T13:59:26","modified_gmt":"2025-10-29T05:59:26","slug":"tsmaster-mbd-project-setup-and-analysis-guide","status":"publish","type":"post","link":"https:\/\/www.tosunai.com\/en\/tsmaster-mbd-project-setup-and-analysis-guide\/","title":{"rendered":"\u5e72\u8d27\u5206\u4eab | TSMaster MBD\u5de5\u7a0b\u642d\u5efa\u4e0e\u89e3\u6790\u6307\u5357"},"content":{"rendered":"
\u5728\u6c7d\u8f66\u7535\u5b50\u5f00\u53d1\u9886\u57df\uff0c\u57fa\u4e8e\u6a21\u578b\u7684\u8bbe\u8ba1\u4ee5\u5176\u9ad8\u6548\u7387\u3001\u9ad8\u96c6\u6210\u5ea6\u548c\u4fbf\u4e8e\u9a8c\u8bc1\u7684\u4f18\u52bf\uff0c\u6b63\u65e5\u76ca\u6210\u4e3a\u4e3b\u6d41\u7684\u5f00\u53d1\u8303\u5f0f\u3002\u4f5c\u4e3a\u8fde\u63a5\u6a21\u578b\u4e0e\u7269\u7406\u4e16\u754c\u7684\u6865\u6881\uff0cTSMaster\u7684MBD\u529f\u80fd\u6a21\u5757\u626e\u6f14\u7740\u81f3\u5173\u91cd\u8981\u7684\u89d2\u8272\u3002\u5b83\u5c06MATLAB\/Simulink\u6a21\u578b\u65e0\u7f1d\u96c6\u6210\u5230\u603b\u7ebf\u7f51\u7edc\u73af\u5883\u4e2d\uff0c\u4f7f\u5f97\u5de5\u7a0b\u5e08\u80fd\u591f\u5728\u771f\u5b9e\u7684\u786c\u4ef6\u5728\u73af\u6d4b\u8bd5\u53f0\u4e0a\uff0c\u5bf9\u63a7\u5236\u6a21\u578b\u8fdb\u884c\u5b9e\u65f6\u9a8c\u8bc1\uff0c\u6216\u5c06\u6a21\u578b\u4f5c\u4e3a\u865a\u62dfECU\u53c2\u4e0e\u5230\u6574\u4e2a\u7f51\u7edc\u4eff\u771f\u4e2d\u3002\u672c\u6587\u5c06\u6df1\u5165\u89e3\u6790TSMaster\u4e2dMBD\u5de5\u7a0b\u7684\u642d\u5efa\u6d41\u7a0b\u4e0e\u6838\u5fc3\u529f\u80fd\u3002<\/p>\n\n\n\n
<\/p>\n\n\n\n
Keywords:TSMaster, MBD<\/strong><\/strong><\/strong><\/strong><\/strong><\/p>\n\n\n\n \u4ee5\u4e0b\u662f\u4e00\u4e2a\u8be6\u7ec6\u7684\u6b65\u9aa4\u6307\u5357\uff0c\u6f14\u793a\u5982\u4f55\u4ece\u96f6\u5f00\u59cb\u642d\u5efa\u4e00\u4e2a\u5b8c\u6574\u7684MBD\u5de5\u7a0b\u3002<\/p>\n\n\n\n \u672c\u6587\u4e2d\u4f7f\u7528\u7684\u6570\u636e\u5e93\u4e3aTSMaster\u8f6f\u4ef6\u4e2d\u9644\u5e26\u7684\u6570\u636e\u5e93CAN_FD_Powertrain.dbc\u6240\u5728\u5730\u5740\u4e3aTSMaster\u5b89\u88c5\u8def\u5f84\u4e0b\\Data\\Demo\\Databases\u6587\u4ef6\u5939\u4e2d\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n\n\n <\/p>\n\n\n\n CAN\u6570\u636e\u5e93\u4e2d\u7684Demo\u6570\u636e\u5e93\u5230TSMaster\u4e2d\uff0c\u5e76\u6fc0\u6d3bCAN\u603b\u7ebf\u4eff\u771f\uff0c\u4ee5\u4fbf\u540e\u7eed\u4fe1\u53f7\u6620\u5c04\u4e2d\u4f7f\u7528\u3002<\/p>\n\n\n\n 1. \u53d8\u91cf\u51c6\u5907<\/strong><\/p>\n\n\n\n \u6dfb\u52a0CAN\u6570\u636e\u5e93\u548c\u7cfb\u7edf\u53d8\u91cf\uff0c\u5c06CAN\u6570\u636e\u4e2d\u7684\u4fe1\u53f7\u4e0e\u7cfb\u7edf\u53d8\u91cf\u6620\u5c04\u65b9\u5411\u8bbe\u7f6e\u4e3a\u53cc\u5411\u4f20\u9012\uff0c\u65b9\u4fbf\u540e\u7eed\u4fee\u6539\u7cfb\u7edf\u53d8\u91cf\u7684\u503c\u6765\u63a7\u5236CAN\u4fe1\u53f7\u7684\u53d8\u5316<\/p>\n\n\n\n <\/p>\n\n\n\n 2. \u5de5\u7a0b\u642d\u5efa<\/strong><\/p>\n\n\n\n 2.1 \u4fe1\u53f7\u8f93\u5165<\/p>\n\n\n\n Add the database in TSMaster beforehand. (Note: You cannot select a signal with a maximum and minimum value of 0.) In the signal mapping connect the CAN signals (\/EngineData\/EngSpeed as an example) with the system variables (Var0 as an example), and set the mapping direction to: from system variables to signals only.<\/p>\n\n\n\n The model block diagram of the added components Sine Wave and DataStoreWrite, DataStoreWrite binding system variables (Var0 as an example), the Sine Wave and DataStoreWrite connected together, the realization of the system variable value is Sine curve changes.<\/p>\n\n\n\n 2.2 CAN\u4fe1\u53f7\u7684\u7b97\u6cd5\u5904\u7406<\/p>\n\n\n Simple CAN signal algorithm processing, example steps are as follows:<\/p>\n\n\n\n \uff081\uff09\u65b0\u5efaTSMaster\u5de5\u7a0b\uff0c\u52a0\u8f7d\u6570\u636e\u5e93\uff08\u4ee5CAN_FD_Powertrain.dbc\u4e3a\u4f8b\uff09<\/p>\n\n\n\n (2) Create system variable Var0<\/p>\n\n\n\n (3) Connect the system variable Var0 to the CAN signal (\/EngineData\/EngSpeed signal, for example) in the signal mapping, and select the mapping direction \"from system variable to signal only\".<\/p>\n\n\n\n (4) Add the model block diagram, add Sine Wave and ToWorkspace components in the model block diagram, ToWorkspace binds the system variable Var0, Sine Wave connects to ToWorkspace to realize the Sine change of the system variable value, and at the same time, realize the Sine change of the CAN signal value.<\/p>\n\n\n\n <\/p>\n\n\n\n \uff085\uff09CAN\u4fe1\u53f7\u7684\u7b97\u6cd5\u5904\u7406\uff1a\u6dfb\u52a0\u5b50\u7cfb\u7edfoperation\uff0c\u4f7f\u7528FromWorkspace\u8bfb\u53d6\u7cfb\u7edf\u53d8\u91cfVar0\u7684\u503c\u4f5c\u4e3a\u8f93\u5165\u5b50\u7cfb\u7edf\uff0cConstant\u4f5c\u4e3a\u53e6\u4e00\u4e2a\u8f93\u5165\u7ed9\u5b50\u7cfb\u7edf\u3002<\/p>\n\n\n\n The algorithm modules that can be added to the subsystem are:<\/p>\n\n\n\n Adding the EnablePort group to a subsystem will, outside the subsystem, add Constant to connect to the EnablePort port can control whether to execute the current subsystem by modifying the value of Constant. <\/p>\n\n\n\n <\/p>\n\n\n\n Through the above steps the CAN signal values can be processed in the model block diagram and then displayed in the form of graphical changes using Scope in the output module, or in the form of numerical changes through Display, or by using ToWorkspace and then writing to the system variables and then adding the system variables to the graphical window for observation. All the added algorithm-related components of the link can be added by adding the output module to observe the data changes at each stage in real time.<\/p>\n\n\n\n 2.3 CAN\u4fe1\u53f7\u8fb9\u6cbf\u68c0\u6d4b<\/p>\n\n\n\n <\/p>\n\n\n\n \u6a21\u578b\u6846\u56fe\u4e2d\u7684\u6dfb\u52a0\u7ec4\u4ef6DataStoreRead\uff0cDataStoreRead\u7ed1\u5b9a\u7cfb\u7edf\u53d8\u91cf\u6765\u83b7\u53d6\u7cfb\u7edf\u53d8\u91cf\u503c\uff0c\u5728SubSystem\u4e2d\u6dfb\u52a0\u76f8\u5173\u8fb9\u6cbf\u7ec4\u4ef6\u89c2\u5bdf\u4fe1\u53f7\u8fb9\u6cbf\u53d8\u5316\uff1a<\/p>\n\n\n\n The components in the sub-module are schematically shown below:<\/p>\n\n\n\n <\/p>\n\n\n\n The output port of the edge detection component can be connected to Scope in the output module to display in the form of graphical changes or in the form of numerical changes through Display.<\/p>\n\n\n\n Edge detection is used in conjunction with Switch:<\/strong><\/p>\n\n\n\n 1\uff09\u5c06Edge Detector\u901a\u8fc7DataTypeConversion\u8f6c\u6362\u4fe1\u53f7\u7c7b\u578b\uff0c\u8fde\u63a5\u5230Switch\u7684\u7b2c\u4e00\u4e2a\u8f93\u5165\u4fe1\u53f7\uff1bSwitch\u7684\u7684\u63a7\u5236\u4fe1\u53f7\u8fde\u63a5Constant\u6a21\u5757\uff08Constant\u503c\u4e3a1\uff09\uff1bDetect Decrease\u8f6c\u6362\u4fe1\u53f7\u7c7b\u578b\u540e\uff0c\u8fde\u63a5\u5230Switch\u7684\u7b2c\u4e09\u4e2a\u8f93\u5165\u4fe1\u53f7\uff0c \u6a21\u5757\u6839\u636e \u63a7\u5236\u4fe1\u53f7 \u7684\u53d6\u503c\u9009\u62e9\u8f93\u51fa\u7b2c\u4e00\u4e2a\u8f93\u5165\u4fe1\u53f7\u6216\u7b2c\u4e09\u4e2a\u8f93\u5165\u4fe1\u53f7\u3002<\/p>\n\n\n\n <\/p>\n\n\n\n Selectively outputs the falling edge detection result:<\/strong><\/p>\n\n\n\n Since the control signal is fixed to 1, the Switch will always select the 3rd input (i.e., the output of Detect Decrease), and the final system is equivalent to a falling edge detector with data type conversion.<\/p>\n\n\n\n <\/p>\n\n\n\n Redundancy Design Intent:<\/strong><\/p>\n\n\n\n Although the general-purpose edge detection result of Edge Detector is connected (input 1), it is masked by fixing the control signal, leaving only the dedicated falling edge detection function of Detect Decrease.<\/p>\n\n\n\n 2\uff09Detect Change \u8fde\u63a5\u5230Manual Switch \u8f93\u51651\uff0cConstant \u8fde\u63a5\u5230Manual Switch \u8f93\u51652\u5b9e\u73b0\u4e86\u4e00\u4e2a “\u624b\u52a8\u63a7\u5236\u7684\u4fe1\u53f7\u53d8\u5316\u76d1\u89c6\u5668”\u3002<\/p>\n\n\n\n <\/p>\n\n\n\n Monitor mode:<\/strong>Output signal change detection results (change = 1, no change = 0);<\/p>\n\n\n\n <\/p>\n\n\n\n Fixed output mode:<\/strong>Ignores the input signal and always outputs the preset Constant value.<\/p>\n\n\n\n <\/p>\n\n\n\n <\/p>\n\n\n\n 2.4 \u5176\u4ed6\u7ec4\u4ef6\u4f7f\u7528<\/p>\n\n\n\n There are other components utility components in the model block diagram, such as:<\/p>\n\n\n\n \uff081\uff09Ground\uff1a\u8f93\u5165\u4fe1\u53f7\u63a5\u5730\uff0c\u9632\u6b62\u51fa\u73b0\u5173\u4e8e\u672a\u8fde\u63a5\u7684\u8f93\u5165\u7aef\u53e3\u7684\u8b66\u544a\u3002<\/p>\n\n\n <\/p>\n\n\n\n \uff082\uff09Sign\uff1a\u4fe1\u53f7\u7b26\u53f7\u5224\u65ad\uff0c\u5728\u9700\u8981\u4e86\u89e3\u4fe1\u53f7\u7684\u7b26\u53f7\u662f\u53ef\u4ee5\u5c06Sign\u7ec4\u4ef6\u8fde\u63a5\u5230\u8fde\u7ebf\u4e2d\u3002<\/p>\n\n\n <\/p>\n\n\n\n \uff083\uff09Clock:\u5b9e\u65f6\u83b7\u53d6\u5f53\u524d\u6a21\u5757\u4eff\u771f\u65f6\u95f4\u3002<\/p>\n\n\n\n \uff084\uff09Stop Simulation\uff1a\u5728\u8f93\u5165\u4fe1\u53f7\u4e0d\u4e3a0\u65f6\u53ef\u4ee5\u7acb\u5373\u505c\u6b62\u4eff\u771f\u3002<\/p>\n\n\n\n <\/p>\n\n\n\n \uff085\uff09Step:\u53ef\u4ee5\u63a7\u5236\u4fe1\u53f7\u5728\u6307\u5b9a\u65f6\u95f4\u4ea7\u751f\u4ece\u521d\u59cb\u503c\u5230\u7ec8\u503c\u7684\u8df3\u53d8\u3002<\/p>\n\n\n\n <\/p>\n\n\n\n \uff086\uff09\u63a7\u5236\u5b50\u7cfb\u7edf\u6267\u884c\u7aef\u53e3\uff1aEnable Port\u548cTrigger Port\u3002<\/p>\n\n\n\n By adding an Enable Port (or Trigger Port) to a subsystem, an additional input port is created outside of the subsystem, and the execution of the current subsystem is controlled externally by modifying the value of the signal connected to the port.<\/p>\n\n\n <\/p>\n\n\n\n 2.5 \u5c0f\u7a0b\u5e8f\u5e93\u4f7f\u7528<\/p>\n\n\n\n Model generation mp is called arbitrarily after generating mp, realizing the graphic program (or C applet) to run the model block diagram, and controlling the operation of the model block diagram more conveniently.<\/p>\n\n\n\n <\/p>\n\n\n\n Adding a new graphical program, adding an execution unit binding API function call, selecting the applet library function, and using the run function can be implemented to run the model block diagram in the graphical program.<\/p>\n\n\n\n Sample Project Operation and Results<\/strong><\/p>\n\n\n\n After the example project is built, the model block diagram is run sequentially in the graphics program.<\/p>\n\n\n\n \u4fe1\u53f7\u8f93\u5165\u4e2d\u5c06Sine Ware\u7684\u503c\u8d4b\u503c\u7ed9\u7cfb\u7edf\u53d8\u91cfVar0\uff0c\u518d\u901a\u8fc7\u4fe1\u53f7\u6620\u5c04\u4e2d\u7684\u914d\u7f6e\u5c06\u7cfb\u7edf\u53d8\u91cf\u7684\u503c\u8d4b\u503c\u7ed9CAN\u4fe1\u53f7\uff0c\u5728\u56fe\u5f62\u4e2d\u5b9e\u65f6\u770b\u5230\uff0cTrace\u7a97\u53e3\u4e2d\u4e5f\u80fd\u770b\u5230\u62a5\u6587\u53d8\u5316\u3002<\/p>\n\n\n <\/p>\n\n\n\n CAN\u4fe1\u53f7\u7b97\u6cd5\u5904\u7406\u8fc7\u7a0b\u4e2d\u5c06Sine\u4fe1\u53f7\u548c\u5e38\u6570\u6a21\u5757\uff0cSine\u5148\u8fdb\u884c\u7edd\u5bf9\u503c\u5904\u7406\uff0c\u518d\u5c06\u4e24\u8005\u76f8\u52a0\u800c\u540e\u8fdb\u884c\u589e\u76ca\u5904\u7406\u6700\u540e\u76f8\u4e58\uff0c\u518d\u901a\u8fc7Output\u7aef\u53e3\u8f93\u51fa\uff0c\u8fde\u63a5\u5230Scope\u548cDisplay\u5c55\u793a\uff0c\u53ef\u4ee5\u5728\u4efb\u610f\u4f4d\u7f6e\u6dfb\u52a0Output\u7aef\u53e3\u5c06\u5b9e\u65f6\u6570\u636e\u8f93\u51fa\u89c2\u5bdf\u3002<\/p>\n\n\n <\/p>\n\n\n\n CAN\u4fe1\u53f7\u8fb9\u6cbf\u68c0\u6d4b\u68c0\u6d4b\u4e2d\uff0c\u5c06Output1\u8fde\u63a5\u5230Switch\u4e2d\u8f93\u51fa\u7684\u4e0d\u89c4\u5219\u7684\u4fe1\u53f7\uff08\u7531\u63a7\u5236\u4fe1\u53f7\u51b3\u5b9a\uff09\uff1b\u5c06\u53e6\u4e00\u4e2aOutput2\u8fde\u63a5\u5230ManualSwitch\u4e2d\uff0cInput\u662f\u4e00\u4e2a\u5e38\u65701\uff0c\u6240\u6709\u8f93\u51fa\u4e3a\u5e38\u65701\u3002<\/p>\n\n\n <\/p>\n\n\n\n \u5176\u4ed6\u7ec4\u4ef6\u4f7f\u7528\u4e2dInput2\uff08SubSystem\u8f93\u5165\u8fde\u63a5\u7684\u662fSine\u6b63\u5f26\u6ce2\uff09\u8fde\u63a5\u5230Sign\uff0c\u6839\u636e\u83b7\u53d6\u5230\u7684\u4fe1\u53f7\u7b26\u53f7\u8f93\u51fa\uff1a\u5982\u679c\u8f93\u5165\u5927\u4e8e0\uff0c\u8f93\u51fa\u4e3a1\uff1b\u5982\u679c\u8f93\u5165\u7b49\u4e8e0\uff0c\u8f93\u51fa\u4e3a0\uff1b\u5982\u679c\u8f93\u5165\u5c0f\u4e8e0\uff0c\u8f93\u51fa\u4e3a-1\u3002<\/p>\n\n\n\n The Clock output is the real-time simulation time, connected to Output1, and the final result displayed at the end of the run is the simulation end time in the setup.<\/p>\n\n\n\n Step is set to step from 2 to 9, connecting to Output2, so the result of the final step is shown.<\/p>\n\n\n <\/p>\n\n\n\n \u638c\u63e1TSMaster MBD\u6a21\u5757\uff0c\u610f\u5473\u7740\u60a8\u80fd\u5c06\u57fa\u4e8e\u6a21\u578b\u8bbe\u8ba1\u7684\u6548\u7387\u4f18\u52bf\u4ece\u4eff\u771f\u9886\u57df\u65e0\u7f1d\u5ef6\u4f38\u81f3\u5b9e\u8f66\u6d4b\u8bd5\u4e0e\u9a8c\u8bc1\uff0c\u6781\u5927\u5730\u538b\u7f29\u5f00\u53d1\u5468\u671f\uff0c\u63d0\u5347\u7cfb\u7edf\u53ef\u9760\u6027\u3002\u5173\u4e8eTSMaster MBD \u76f8\u5173\u7ec4\u4ef6\u8bf4\u660e\u6b22\u8fce\u9605\u8bfb\u300aTSMaster MBD\u6a21\u5757\u5168\u89e3\u6790\uff1a\u4ece\u6a21\u578b\u642d\u5efa\u5230\u81ea\u52a8\u5316\u6d4b\u8bd5\u7684\u5b8c\u6574\u5b9e\u8df5\u300b<\/a>.\uff0e<\/p>\n\n\n\n Which feature of TSMaster are you most interested in? Or what problems have you encountered in practical applications?<\/strong><\/p>\n\n\n\n Welcome to share your experience or questions in the comment section, any ideas or suggestions can also be comment section message interaction, will have the opportunity to win the TOSUN mystery gift bag Oh ~!<\/strong><\/p>\n\n\n\nTSMaster MBD \u6982\u5ff5\u89e3\u6790<\/strong><\/h2>\n\n\n\n
\n\n\n\n\n
\u57fa\u4e8e\u6a21\u578b\u7684\u8bbe\u8ba1\uff08Model-Based Design\uff0cMBD\uff09\u662f\u4e00\u79cd\u8f6f\u4ef6\u5de5\u7a0b\u65b9\u6cd5\uff0c\u5b83\u5728\u8bbe\u8ba1\u3001\u5f00\u53d1\u548c\u9a8c\u8bc1\u590d\u6742\u7cfb\u7edf\u65f6\u4f7f\u7528\u6a21\u578b\u4e3a\u4e2d\u5fc3\u7684\u65b9\u6cd5\u3002MBD\u901a\u8fc7\u4f7f\u7528\u6570\u5b66\u6a21\u578b\u6765\u63cf\u8ff0\u7cfb\u7edf\u7684\u884c\u4e3a\u548c\u7279\u6027\uff0c\u4e3a\u590d\u6742\u7cfb\u7edf\u7684\u5f00\u53d1\u63d0\u4f9b\u4e86\u4e00\u79cd\u6570\u5b66\u5316\u4e0e\u53ef\u89c6\u5316\u7684\u521b\u65b0\u65b9\u6cd5\u3002
<\/li>\n\n\n\n
TSMaster\u6a21\u578b\u6846\u56fe\u6a21\u5757\u662f\u540c\u661f\u667a\u80fd\u5f00\u53d1\u7684\u7c7bSimulink\u7684\u5efa\u6a21\u6a21\u5757\uff0c\u7528\u4e8e\u652f\u6301\u57fa\u4e8e\u6a21\u578b\u5f00\u53d1\u6a21\u5f0f\uff08MBD\uff09\uff0c\u901a\u8fc7\u62d6\u653e\u6a21\u5757\u548c\u8fde\u63a5\u4fe1\u53f7\u7ebf\u6765\u6784\u5efa\u7cfb\u7edf\u6a21\u578b\uff0c\u652f\u6301\u8fde\u7eed\u65f6\u95f4\u3001\u79bb\u6563\u65f6\u95f4\u4ee5\u53ca\u6df7\u5408\u7cfb\u7edf\u7684\u4eff\u771f\u3002\u5f53\u524d\u5df2\u53d1\u5e03\u7684\u6a21\u5757\u529f\u80fd\u5305\u542b\u5982\u4e0b\u5185\u5bb9\uff1a<\/li>\n<\/ol>\n\n\n\n\n
<\/figure><\/div>\n\n\nMBD \u5de5\u7a0b\u642d\u5efa\u5b9e\u6218<\/strong><\/h2>\n\n\n\n
\n\n\n\n
<\/figure><\/div>\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure><\/div>\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n\n
<\/figure>\n\n\n\n\n
<\/figure>\n\n\n\n\n
<\/figure>\n\n\n\n
<\/figure><\/div>\n\n\n
<\/figure><\/div>\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure><\/div>\n\n
<\/figure><\/div>\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\nMBD Engineering Results<\/strong><\/h2>\n\n\n\n
\n\n\n\n
<\/figure><\/div>\n\n\n
<\/figure><\/div>\n\n\n
<\/figure><\/div>\n\n\n
<\/figure><\/div>\n\n\nTip:<\/strong>
1. Software download:
Click on the software download link below to download and install directly, beta version is recommended:
2. Software upgrades:
You can check for upgrades to the latest version within the software, provided that your computer has an Internet connection.
Note: TOSUN Technical Support Email:support@tosunai.cn<\/a>We welcome inquiries! (Company and contact information must be indicated)<\/strong><\/pre>\n\n\n\n