当前位置:网站首页>Canoe - the third simulation project - bus simulation - 3-2 project implementation
Canoe - the third simulation project - bus simulation - 3-2 project implementation
2022-07-04 10:51:00 【picoasis】
Catalog ( Please skip the previous steps https://blog.csdn.net/lamanchas/article/details/122329927)
6 Automatic sequence Automations Sequences
10.1 Automation Sequences Drive trigger ,Bug analysis ( System variable with the same name , The signal )
10.2 Manual operation Control panel
10.3 analysis Write Information ,Bug analysis ( Message sending type , Signal transmission type )
6 Automatic sequence Automations Sequences
Create bus sequence events :
- system variables\environment variables、signals Sequence of changing events .
- Check / Determine the value of the current variable or signal
Automatic sequence , By changing the value of the variable , To trigger specific functions . The sequence events are set as follows :
According to the picture below , take KL15,Crank,OFF Change it to 1,3,0.
KL It's German connector meaning , The meaning of chip pins .
KL30 , It usually indicates the positive pole of the battery .positive
KL31, Usually refers to the negative pole of the battery .negative
KL15, Usually the car is in RUN Pattern
KL50, Usually the car is in crank Pattern
KLR, Usually the car is in ACC Pattern
Meaning of key hole gear :
- Initial position of key insertion , be in LOCK files .
- Turn the key to ACC files (Accessory), Connect the power supply of some electrical appliances of the vehicle , Such as CD, Cigarette lighter, etc .( amount to KL30 be in ON state )
- Turn the key to ON files , Connect all electrical appliances in the car , And start self-test .( amount to KL15 be in ON state )
- Turn the key to START files , After the car is ignited successfully , Bounce back ON files .( amount to KL50 be in ON state , namely crank Pattern
7 Analysis window
7.1 Graphics window
stay CANoe Select from the menu bar Analysis→Graphics→New Graphic Window, Enter a name of Signal Observe. Click to select... In the signal list column on the left of the window Add Signals, Select the signal in the pop-up window KeyState, Similarly, add the signal VehicleLight and VehicleSpeed.
here , Click any one in the left window Signal, In the right window Y The axis is this Signal Of Value Table,X Axis is time . stay Signal Observe Click... In the window toolbar Select y-axis view Icon ·, Select Show All Y-Axis, So the three added above Signal Will be displayed in the same window , As shown in the figure .
7.2 State Tracker window
stay CANoe Select from the menu bar Analysis→State Tracker→New State Tracker Window, Enter a name of Signal State.
Right click in the signal list bar on the left of the window and select Add Variables, Add system variables Vehicle Control Medium Gear and Brake.
Right click in the signal list bar on the left of the window and select Add Database Objects→Signals, Add signal VehicleLight, As shown in the figure .
When the measurement starts ,Gear、Brake and VehicleLight Of Value Table It can also be displayed in the right column .
7.3 Data window
Can be in Data Add signals and system variables to the window , Here we add Driver、EngSpeed and KeyState Three signals , as well as Left_Turn_Enable and Right_Turn_Enable Two system variables , As shown in the figure .
8 Trace Windows and Logging
Trace The window helps users view and analyze data on the bus in real time .
Logging The data in the whole simulation process is recorded , In the case of large amount of data or long-term testing , This enables the user to view the activity of the bus in the offline state , meanwhile ,Logging The data recorded by the function can be found in CANoe Play back in , It plays a very important role in the recurrence of problems on the bus .
8.1 Trace window
Trace window : Create a CAN_Trace Of Trace window
8.2 Logging window
Logging window : Create a CAN_Logging Of Logging modular , stay measurement setup Panel add CAN Channel filter .
stay 12.4.5 In the festival , This book is at the node Gateway Of CAPL Keyboard events are added to the program to control CAN_Logging The function of opening and closing modules , On the keyboard 1 Key can realize Logging Start and stop of functions , You can check the relevant code (5.3 Summary ).
Right click CAN_Logging Module selection Configuration, stay TriggerConfiguration Select in window Toggle Trigger Pattern , take Toggle on and Toggle off The mode selection of is CAPL and User defined, The setting result is shown in the figure .
After setting up , Readers can Measurement Setup Set in advance in the window CAN_Logging switch , You can also use the... On the keyboard during the measurement process 1 Key to control Logging The beginning and the end of .
9 Desktop Layout
9.1 CAN Layout
9.2 Analysis Layout
9.3 Configuration Layout
9.4 Trace Layout
10 Project operation test
Because the instance adopts a simplified topology , The node does not exceed 4 individual , So in Demo edition CANoe The simulation can also run normally . Address of engineering documents ( Upload git Post update )
10.1 Automation Sequences Drive trigger ,Bug analysis ( System variable with the same name , The signal )
After completing all the above configurations , Readers can be in CANoe Run the simulation project in the software .
The functions realized by simulation engineering follow Automation Sequences Drive and trigger , Can be observed Control Panels and IPC Synchronized changes in the panel .
The running effect of the simulation project is shown in the figure .
As you can see in the picture above ,IPC It can display the car speed normally , Oil quantity , Oil temperature , Engine speed , cornering lamp .
But the gear display is incorrect . alike Control The gear text display on the panel is also incorrect .
So next, look at the analysis panel , As shown in the figure below :
You can find KeyState Signal diagram changes with Automation Sequences Changes are synchronous , But in IPC and Control The panel does not display correctly .
We see the IPC The display of the panel is as follows , It is found that the gear display is bound to Signal Gear:
therefore , The next in analysis Add Signal Gear The observation of , For intuitive observation , Separately signal observe Interface and Data Interface add Gear The signal . Here's the picture : The discovery is consistent with the display , Has always been a Parking No change. .
Have a close look at CAPL Code , Make sure there's no problem .
Suddenly thought of , Set before Sequences when ,keyState There is an error in the value of , So will it Automation Sequences In this Gear There is something wrong with the setting ?
First ,Gear Whether the value is wrong : see Sequences Medium Gear, The value is in the optional range , There is no mistake .
here , see Gear This Object, It is found that the same name is Gear There are two objects of , One is signal, One is system variable,
Here we choose signal Of Gear, But here we use sequences to simulate vehicle control , What should be controlled is the system variable Gear. The problem should be here .
Next , modify Gear For the system variable Gear, Modify the corresponding value R、N、D.
Run the sequence again , The panel displays as follows , Results the correct .
10.2 Manual operation Control panel
It can also be operated manually Control panel , At the same time combined with Trace、Graphic and State Tracker Wait for the analysis window , Do some testing and analysis . Press 1 key Logging File start recording CAN Trace Information in , Press again 1 key , Will stop Logging Record .
Press CAPL Program logic test , All display normal operation .
- The control of engine speed , Didn't understand
- There is no corresponding sensor data for oil temperature and oil volume , Only initial values are displayed
10.3 analysis Write Information ,warning Repair ( Message sending type , Signal transmission type )
Got write The window output information is as follows :
There are two Warning.
- among Driver The signal is set to the default value and sent circularly , But the cycle time is not set .
- message Driver_Info Not set Send type .
The following is an analysis , modify :
stay CANoedb++ Look at the signal Driver Properties of , The signal Driver Subordinate message Message::Diver_Info
at present , Their two send type properties The settings are as follows :( The settings given in the book ).
Message::Diver_Info | GenMsgSendType | NoMsgSendType |
Signal::Driver | GenSigSendType | NoSigSendType |
( The attribute information description of the database can be referred to :CANoe - Description of common database attributes _lamanchas The blog of -CSDN Blog )
Message sending type There are several values of :
Message sending type The detailed meaning of attributes is shown in the following figure :
Simply speaking , Message sending type The whole is divided into : Events trigger and Cycle triggers .
According to the previous functions , We know Driver Information about , By BCM The control of the , open BCM Of CAPL. In the program , message The update and sending of are triggered by events , And always monitor Car_Driver The signal , Not jump trigger .
So it should be in DBC Set the message sending type as ifactive
Driver The signal is also set to ifactive
preservation DBC after , Rerun ,write Warning prompt :
System:In message 'Driver_Info' the signals using send types 'WithRepetition' or 'IfActive' were downgraded, because CycleTimeFast is 0.
The message alarm disappears , But the signal cannot be set to ifactive, because ifactive It also involves the setting of the cycle .
The next in DBC in modify Driver The transmission of signals The type is onchange
thus , All alarms disappear .
END
边栏推荐
- First article
- 2、 Operators and branches
- [test theory] test phase analysis (unit, integration, system test)
- [Galaxy Kirin V10] [server] iSCSI deployment
- Add t more space to your computer (no need to add hard disk)
- [Galaxy Kirin V10] [server] grub default password
- Design and common methods of test case documents
- shell awk
- C language structure to realize simple address book
- F12 clear the cookies of the corresponding web address
猜你喜欢
leetcode842. Split the array into Fibonacci sequences
Summary of several job scheduling problems
Dynamic memory management
Error C4996 ‘WSAAsyncSelect‘: Use WSAEventSelect() instead or define _ WINSOCK_ DEPRECATED_ NO_ WARN
Remove linked list elements
When I forget how to write SQL, I
Four characteristics and isolation levels of database transactions
Introduction to tree and binary tree
VI text editor and user rights management, group management and time management
Performance test method
随机推荐
/*The rewriter outputs the contents of the IA array. It is required that the type defined by typedef cannot be used in the outer loop*/
[Galaxy Kirin V10] [desktop] FTP common scene setup
Safety testing aspects
Postman interface test
[Galaxy Kirin V10] [server] iSCSI deployment
C language structure to realize simple address book
20 minutes to learn what XML is_ XML learning notes_ What is an XML file_ Basic grammatical rules_ How to parse
unit testing
Write a program that uses pointers to set all elements of an int array to 4.18: 0.
Dynamic memory management
Performance test overview
DNS hijacking
Regular expression
OSPF comprehensive experiment
[Galaxy Kirin V10] [server] KVM create Bridge
Rhcsa - day 13
Rhcsa day 9
JMeter assembly point technology and logic controller
Student achievement management system (C language)
[Galaxy Kirin V10] [desktop] cannot add printer