Home

System_IO_Interfacing_via_CAN_Messages

image

Contents

1. e This is an important subject e You need to understand this to make any changes to the GUI interface e Usually you will be adding signals to CAN messages and updating the model amp GUI to match e A look at the model covering the following areas e How control signals are brought in from the GUI e This uses a CANGB currently DTBControl_VO_91 dbc e Ensure this file is kept versioned e Ensure it is re imported into the GUI e How real inputs are brought in from the H3 H4 System e HIL_Genix System dbc e This is generated from the hardware configuration H3 DSP GUI e See slide below for further CAN interface information addO AS DOES SOTO ER Sao PODER PENES E lt L A A SF AP bil kit ilk i A WO P ATH d re re amp Enabling innovation DTB Vehicle Model CAN Interface from GUI e To exchange messages between the GUI and the model a CAN 4 Siok Parameters CAN Message Unpain Cana D gt CAN Message Unpacking CANdb database is used Unpacks a CAN message into output data signals e Currently this is DTBControl VO 9 dbc AER Define signals by hand e VISUALCONNX needs to load this database along with others ection XTD 2066 e CAN message selection XTD 2066 VehicleSetPrim Message e VISUALCONNX uses a set of CAN databases to build up its connection a e See later slides for more info List signals for multiplex value All The model loads the
2. HIII li iil Ill i H j Iil i addO 1H F TI O O ODO add je y Innovation DTB Vehicle Model CAN Interface from GUI Continued e To load the CAN database into VISUALCONNX a system network definition file is used CAN System Definition DTB System csf These files are loaded b CAN Network definition HIL_Genix System cnd y VISUALCONNX each time the DTB GUI is loaded HIL Genix System should not CAN Database Engine Sens X V2_0 Config cde need to be changed unless we change it CAN Database Engine H3_Input_V1_4 Config cde etc DTB_VO_9 System cnd can CAN Network definition DTB_VO_9 System cnd be changed and exported to CDE format as required CAN Network definition add MM I Ibil TOREK emer TOONER S606 TIEK PENES Sa ii it bill Vii tka LHI TAA PA UE HATHI AA EEES A AA SF 1 00 iili i i p i y w ph SS add DTB Vehicle Model CAN System Definition e The CAN System Definition is defined in the VISUALCONNX user manual however you probably only need to change it for version control reasons Main Networks 2 Network 1 File HIL Genix System cnd Network 2 File DTB VO 9 System cnd e HIL_Genix_System cnd Defines the CAN network for all HIL I O e DTB_VO_9 System cnd Defines the interface from GUI to Model and related items addO lin
3. 1 it Hi m iI illl Il i TE I WM Pr IM dl add DTB Vehicle Model Off line Simulation Continued WE Vehicle_Model Outputs Scopes f 23 Vehicle Plot Ele e SF 292 ABE a Accelerator File Edit View Simulation Format Tools Help e The inputs sub system controls the test mode gt suesss s sf m Tsuno mame e Use Manual Switch e Test ON For Offline Simulation e Test OFF For Real time Builds e Useful to check model is roughly close e Can add scopes and other diagnostics e Can check look up tables etc e Use Simulation Pass through LE gnal Builder Plant Plant Test Maneuvers b gral Axe TE FAS 21350 pu e Remember Analogue Simulation Pass through Inputs are normalised to 1 e Remember Analogue Simulation Outputs are normalised to 1 e Remember to turn Test switch OFF before deploying to MICROGen 1 H H x 3 100 2 Brake she Ready Cowes shown gt Ho FixedStepDiscrete index 1 y ley Poxiticn art shown Acha point Y post Acowlerator 81 AN Yo y adde fi l ii AR E E ae f Wy i iiti aii i Hi AAA till il iit iit H H a Wa Ve ri a Sta T a iW Ur 1 l Hi i i al add s DTB Vehicle Model GUI and I O Interfaces
4. Display Details a Select Controls D Import a a 1 D Gain1 2L 3 JT Gain13H in J Gain SL E 3 SetCalSettings 14 15 4 Gain14H JT Gain 4b TAME add A ES es wat d ae A oe ee SE sstiases EZ Er 2660636 3 SE E E AA eee add DTB Vehicle Model CAN Database Imports O File Edit View Window Help For a full reference see AAA gt mOo 4 BSE sie ee e VISUALCONNX User Manual e Chapter 18 e Appendix 3 e However e You don t have to know all this info e You need to just know enough to import the database for each change you make P 1 Introduction to VISUALCONNX P 2 Quick Start Guide P 3 VISUALCONNX Run Time Reference P 4 Program Users Guide P 5 Project Manager Reference LP 6 Forms Reference 7 Widgets Reference P 8 Controls Reference LP 9 Debugging in VISUALCONNX LP 10 Scripting Reference P 11 The Source Code Editor P 12 Data Logging Reference P 13 The Package Manager LP 14 VISUALCONNX COM Interface Wis Optimising VISUALCONNX performance P 16 xPC Connection Reference P 17 MICROGen over CAN Connection EP 18 Multi CAN Connection Reference F 18 1 Supported CAN interface files a HP 18 2 1 add2 CANdB Macro Extensions P 18211 _Req MSG BIT P 18 2 1 2 _Read MSG P 18 2 1 3 _Exp P 18 214 _Hide P 18 2 1 5_ Zero P 18 2 2 CAN Database Editors 18 1 Supported CAN interface files To create the interface hierarchy to support display in the
5. Hh gt i E Ad e ee ee Se E a p E E a 1 3826040 S 36 ye sets 000008 wii NH a re G Enabling Innovation DIB Training Unit 9 DTB Vehicle Model Part B System I O Interfacing via CAN Messages Simon Clarke Technical Director iyl p S OQREK emer TOREK Pa ORES PENES E i Hig iia A AN PU ATH ay 1 Soe bo St AA LE St A 20 re amp Enabling Innovation Prerequisites e Knowledge of CAN bus technology e Knowledge of Matlab Simulink and Simulink Coder Formerly Real time workshop e Familiarity with training course units 1 9a e A fully configured workstation toolchain for making and viewing model changes e Access to the DTB system e H3 DSP GUI Installation for changing configurations addO j i All l ii PA a seis SONG Hostos INL ORS S60 DEN li Wit illli a I al hii j ha H H j il illl Il TE i A I iB Joa iW it VA peed i add Agenda for Unit 9b e Introduction to vehicle model e Vehicle Model Refresher e Top level only Kyaw will do a separate one for engine transmission vehicle amp Environment e Discuss Sample time colours and associated tips e Show off line simulation and techniques for Simulink Passthrough e Preparing to make changes to the model e How the CAN interface is defined e How CAN databases are organised in GUI and Model e How to change t
6. Hh RT Un gt ORES SEN MITIA TIEK OER 0505 add DTB Vehicle Model CAN Network Definition e The CAN System Definition format is defined in the VISUALCONNX user manual e Change it for version control eg DTBControl VO 9 1 cde Main Databases 3 Network 0 Database 1 File DTBControl VO 9 cde Base ID HO Groups 0 Database 2 File LV Test SigParamSpec Version 1 1 cde BaseID HO Groups 0 Database 3 File H4 Switchpack Actuation V1_ 3 MODIFIED cde BaseID amp H0 Groups 0 Wiif ii ii il ill rl essa SONG JONAS HIEN SONAS PENES E2 mel Hiii N Mil UN ill Hii iit iit F illl Il i Ta i n j I TT Sta T a i add DTB Vehicle Model CAN Database Engine e The CAN Database Engine format is defined in the VISUALCONNX user manual however rather than manually editing this file you should use a standard database editor and import the data into VISUALCONNX developer File To Translate To Translate P LYTGO VBS Manufacturing Information Integrated Power Supplies Emerson iMP PSU Controller Board CAN Messages LVT_PSU_Control 1_2 dbe B E Parameter By Y Include Hidden Extended Flag Use Import Profile Use YC Node Name _RELOCATABLE_HOST_ Y Include Non Exportable leave as is WT_PSU mm E Force All om seas force Standard pre VA Mao Filter E A 3 i Copy Path
7. addO Me stos MINNAN 26668 SONAS sa 23 EF i fi j il l il li A NO LAT il jin iit iit F Hi M iij aj y i i i add DTB Vehicle Model Linking CAN signals in GUI e Itis the act of dragging the node in the VISUALCONNX CAN database tree that links the CAN message to the GUI control you drop it on Watch this in action ES Ky Names Multi CAN Connection 3 No Filter Mpini m GA LV Test V4 0 Lis a ise mae E LV Test V3 0 F ieee ae LY Test 2 0 Text Box re ticks Has ee Debug New Edt Ca LY Test V1 0 P BA PropertyEditBox Jp eS PEER E E DTBControl_V0_9 El Rotated Text Vehicle Configuration Details E Ey VOX ir ES Table Text Entry Vehicle Details Transmission Details al EngineSetPrim 5 3 EngineSetSec E fi Excel Text Entry VehiclelD P 0 CANdB_IDX P 0 UseStartButton Transmission Name E Ey ABSSetPrim a Dials i micDr Transmission Description WSRatio 2 nas AsroDymamicDrag o PA 3 DriverControlsPrim 5 Digital Switch GUIList File C TranmsmissionS etPrim w 3 TranmsmissionSetSec B PR Push Button 3 Vertical Scroller B Horizontal Scroller E Check Box 6 Option Group MA Multi Picture Multi LED fi Knob Instrument Simple Gauge C Vehicles etPrim 3 OpenLoopOutputs 3 OpenLoopDutputsB 3 OpenLoopOutputsC 3 OpenLoopOutputsD LWT Interface E y H2_H3_H4
8. Data Connections Window it is necessary to open an interface file There are several supported interface file types as per the following list e CAN Database Format e CAN Data Engine Definition e CAN Network Definition e CAN System Definition The following sections describe these in detail 18 2 CAN Database Format DBC The CAN Database format dbc is based on the widely used text format CAN database as defined by Vector Informatik This format is a text format file that defines one or more physical node s CAN messages and signals including Message IDs Message Types Signal names and bit packing min max values scaling factors units etc The add2 CAN database format enhances the usual CANdB format by using macro extensions allowing partial CAN Data Engine CDE features while maintaining full backwards compatibility with Kvaser and Vector CAN database editors In this release of VISUALCONNX it is necessary to convert a CANGB dbc file to a CAN CDE file using the separate CAN dB to CDE Translator program lA A A a BORAS S606 TIAN SO SONAS FNAL S2 i i so ai ee hl E e ces 1H iii i iili 4 dah i i ij iil Ill f q T y MN i Ifi f 1 add DTB Vehicle Model CAN Interface from GUI Continued e To view or edit the DTB Control CAN database use a tool such as Kvaser s CAN database editor or notepad Pern deli onde olny SIE OTIC 52 E File Setti
9. blocks all used e Front Panel e LCD Text String Operations LEDs and MPC55 Monitor are all used in the DTB model e Sounder is there if required e VISUALCONNX e Must be in the DTB model if reflash is to run without a power cycle e Inputs e Genix and Standard both used in DTB model Ignition State not required for DTB as power up all the time e Outputs e Analogue Outputs Aux Outputs PWM Outputs Relay Outputs all used in the DTB model e Pulse Stream Repeater Synchronised Waveform Repeater available for more complex wheelspeed for examlpe e Additional CAN e CAN C and CAN D used for reading off medium speed CAN in the future etc e RS232 e Serial Communications Serial COMMS BI Neither currently used but may be required for PSU control in the future unless CAN contolled PSU is used e Power Control e Not relevant to DTB Full Blocks Demo Time Permitting addO IH Hil ae E A A Hm che E A A e a E de e e oe E Ss A Ae e A AA a e e A E a ee E e Sat 23538 fee 25 a 1283 Sac 25 26 e IH i 7 Nl Hi i HH ii fi j HH Il R Ai ii a 7 _ 9 mh Bil i n ih 1 in i Enabling Innovation aad DTB Any question relating to MICROGen model If any one has any questions please ask now add P ES SAA JE FA cl OARE HIEN ese SE esca z S60 gt F AN A IA ZA A SF A A jji wane r Wy LH oh i IH Hi add Innovati
10. database into CAN blocks Aer ero yn e Make sure the Message Selection is correct especially if changing dbc 4 TouCAN Receive a hes uinti6 Signal Editor Wehidl Prim Ser Wehicleliass Ser Vehi A Name Data type Unsigned integer WehicieData E Set_AeroDynamicDrag a z venkus Start bit 2 Byte order Little Endian Intel Set_AeroDynamicDrag VehicleData uint Length bits 12 Factor 1 0 Set VehiclelD wint WehiclelD Multiplex Type Standar Offset 0 0 ESE Get VehicielD Test Signals Cancel E Multiplex Value 0 Units Kg Da double Set CANdE IDX C30 CAN Unpack CANE IDX CANE ID WehiclteSetPrim gt EXE 300 COREK e EEES gt Enabling Innovation add sea TOREK S60 ss _ PES E 12s DTB Vehicle Model Database usage in DTB e The following figure shows how each database is used in the DTB system VISUALCONNX GUI ae ontrol Configuration LVTGO VBS Unit Monitoring LVT Database LVTEST 1 0 LVTEST 2 0 LVTEST 3 0 LWTEST 4 0 Notes Each database is used to define the CAN messages used to exchange Data including all packing info etc H3 H3 SensX Hardware HIL System Configuration System Ids H2 H3 H4 Common GetHW H3 H4 Real Time Database SensX H3 H4 Control Database DTBControl 0 9 MICROGen model Input V1 4 Switchpack Actuation Hib Hil WH il HH ul
11. NA E SS E ri F gt I OIDO OM EOMICI ORBONONOA E bl iid i ili ill 5 fi WH iiil hiit iit F Hi ila Hil UMN Uy i TE Y if imi ill allt ih TA 1H add DTB Vehicle Model Building the Model e How the build process takes place e Make sure the model was loaded via runme e Remember to turn off Test Control in inputs ECHO is off su b syste m Building bin DIAB 555 internal flash dld e Run model off line first Sometimes necessary renoneer i LIBS C MATLAB R2007b toolbox rtw targets mpes555dk drivers 1lib DIAB lib cmf flash 555 a C MATLAB e C B b ild p SHARED LIB slprj mpc555rt sharedutils rtwshared a ontro to ul at to eve SHARED LIB TARGET slprj mpes555rt sharedutils DIAB 555 rtwshared a e Watch code build and resolve issues as required e Output creates an s19 extension file D aa aa LM LICENSE FILE c flexlm License dat o c diab 4 39 Win32 bin dcc DMPC555 VARIANT XO Xlicense wait tPPCSSSEH simple D ROM VERSION o This IS a Motorola hex file that VISUALCONNX CaN Je diab 4 3g Win32 bin ddump R v m3 w32 Vehicle Model flash elf o Vehicle Model flash si9 C MATLAB R2007b sys perl win32 bin perl exe IC MATLAB B2007b toolboxrtw targets mpc555dk bin win32 OO tl ia ae ta DIAE build for Vehicle Model fl
12. _Common_GetHw 3 HOST E 7 SystemiDs Transmission Type Number Of Gears 0 Reverse Ratio 0 Gear Ratio 1 0 Gear Ratio 2 0 Fuel Type Gear Ratio 3 0 Gear Ratio 4 0 Gear Ratio 5 0 CoolantSensorType Gear Ratio 6 0 Tr ransmissioniD 0 DragFrictionAtWheels 0 Number of Cri Teeth 0 Crank No Missing Teeth 0 TransmissionSensorType Number of CAMShafts 0 Engine Map ID 0 Bb Percent CAM 1 Phase TDC 0 CAM 2 Phase TDC 0 Progress D CAM 3 Phase TDC 0 CAM 4 Phase TDC 0 E Slider Chast AccelPedalType ba E Strip Chart Lima tifida 4 We will cover how this is done in more detail with the VISUALCONNX training unit add I i Il TIFE ORES SONG GOARE SOI ORONO Ma cil MIA Nh I ill HIT Mia l iat A Mii 1 iii dis i add e DTB Vehicle Model CAN Interface from GUI Continued e Parameters vs Signals e A parameter is a value that is sent from VISUALCONNX to make a change to something in the model e A signal is a value that is sent from the model to the GUI to be displayed recorded etc e To tell the CAN Database which direction the CAN message goes we set the node name in the data base nin Messages 4 Signals OF Node List 8 Communication Matrix q Environment Variables 7 Attributes Message Name CAN ld dec Id Type DLC Sending Node Comment e MGen is MICROGen EngineSetPim 2048 Extended 8 VOX _2er Engine Set Sec 2049 Extende
13. ash complete e This file contains the program for internal flash Vehicle Model flash elf ready for download memory Vehicle Model flash si9 ready for download IPP Completed MPCSxx make phase Demo Successful completion of MPC Real Time Target build procedure for model Vehicle Model add SE Se s5 Ses Bey 300 E ES re as El E 2636 as 3536 12s e EEES Hl Hi vn if Hil j I fai iil i j ij i i ki h w de MU il hy p Wha Wa il d re re amp Enabling innovation DTB Vehicle Model Learning the MICROGen blockset e This may require to be a separate training session e Some I O blocks may not require changing for the DTB e Can show the full facilities available or a sub set e Front Panel e LCD Text String Operations LEDs Sounder MPC55 Monitor e VISUALCONNX e Only used for CCP download for DTB CCP communications not used for GUI e Inputs e Genix Standard Ignition State Relates to MICROGen Ignition not DTB e Outputs Analogue Outputs Aux Outputs PWM Outputs Relay Outputs Pulse Stream Repeater Synchronised Waveform Repeater e Additional CAN e CAN Cand CAN D e RS232 e Serial Communications Serial COMMS BI e Power Control e Not relevant to DTB addO STARR FNU ONEX TINNA FNDE jin rt H Mia Gil PNI il iihi 11011 wT i if MI Hl iil i i ij add y DTB Vehicle Model Are MICROGen
14. d 8 CX _Zero j SSetPrim ended 8 X e VCX Is VISUALCONNX Te 2n Bended 8 VOX E GetECMEngineData 2055 Extended 8 MGen _Esportable TranmsmissionSetPrim 2064 Extended 8 VOX _ Zero TranmsmissionSetSec 2065 Extended 8 VOX _Zero Vehicle Set Prim 2066 Extended 8 CX _ Zero GetVehicleDataA 2067 Extended 8 MGen GetVehicleDataB 2068 Extended 8 MGen GetVehicleDataC 2069 Extended 8 MGen OpenLoopOutputsA 2070 Extended 8 VCX _Zero Get MadalNata 20792 Evteanded Man e We can also use macros an add2 extension PP by the CAN Database engine to provide additional facilities such as controlling which parts of the database are exportable hidden etc e Linking GUI user controls to parameters Right hand tab in tree addO 20 re amp Enabling Innovation Ii He SORBAS CORRS ses ORES PENES i bi IT He a A AN 1 HII li 0 JAN WI iH i j il H VI i i i Tanh Y 1 hy j ml F nimii A G A aS O 11 il i DTB Vehicle Model Further model areas e Alook at the model covering the following areas e Model Configuration MICROGen Initialisation Block VISUALCONNX CCP Block Used for reprogramming Set Model Timing MPC555 Monitor MPC555 QSPI Configuration e Version String Try to update this for every build change Make clear who the model developer is Maintain source control Use Doc block or a management tool addO A a A a A gt de E E ri ES AA A ee ee SS SS E A
15. he VISUALCONNX interface Key points e MICROGen blockset training V3 0 2 e Front Panel VISUALCONNX Inputs Outputs Additional CAN RS232 Power Control e More detail on the blockset such as NV Storage Enhanced Serial External Display e Questions and feedback addO EAS gt ORES abs TIONG ORE SO CDR i wii Hy add DTB Vehicle Model Vehicle Model Continued e The top level of the model is structured as follows MPC555 OSPI Configuration MICROGen WIGS ET QSFI Configuration Configuration Resource Resource acd ls iaa VISUALCONNX CCP Model Configuration And Housekeeping SBC ves 03 1014 Physical Inputs AS CAN Input from GUI CAN Inputs from H3 H4 etc Abstracted Vehicle CAN input from Vehicle Model No I O Physical Outputs CAN to GUI CAN to H3 H4 etc add eS a Di Ml oo a A ES EE ee e o A pee SOS E FIOFA BONES CY 363 E3 A ae E i jji i A vehi ee A r A E A PA A add er DTB Vehicle Model Plant Model Sub system Previous Demo Showed e Discussed model referencing e We previously looked at mains parts Limited time for too much detail e Engine e How different engines are brought in e Drivetrain e How different transmissions are brought in e Vehicle and Environment e Simple vehicle dynamics and bringing in Vehicle Mass Figures etc e More from Kyaw on this later e Discuss debugging via offl
16. ine simulation e Signal Scopes e For testing signal behaviour e Simulink Passthrough of blocks Covered later not to be confused by DTB passthrough addO La E AA A o A A A E s 2 i ia p E cs ae A ee E us E ET A A EARL e i A OE A E E EE Simi ia 2 2 ib FS 2 em SCY 7 3 E ee TE E ELE E Ay FE E Lg k R a E E E E A gt A E IHH eee AIN mE 20 re amp Enabling Innovation DTB Vehicle Model Plant Model referenced Auto Manual All Engines The Vehicle 3 simulation is a as separate referenced model This is loaded by the main model Bus creators For outputs Bus creators For inputs Can simulate separately Basic Vehicle Dynamics etc _ add0O 28 Enabling Innovation DTB Vehicle Model Off line Simulation from top level Vehicle Plot e A look at the vehicle model covering the following areas e Updating diagram e Sample time colours wi e Wide non scalar lines 6 Pork Data Type a e Signal Dimensions e Test Control El e How to run off line e Looking at the Scopes O Ps e Offline Pass through Simulation Input e Input Simulation e Output Checking e Useful for debugging add E E i E ad SE 0905 AOS HIEN TOREK PENES 5 gt HIII Wi Ii Ht ill Wi O So itt MIH Wii i HH NN bl
17. ngs Tools Help O a E E E Yu P Fina b 4 m alameda Ste This allows you to edit or create new signals A 20 tar or parameters for the MICROGen model een such as adding new sensors readbacks etc a e This database editor is freely available from E anason P Kvaser s website or you can use the Vector parap ea mn a oma o Comor CANdB_IDX Unsigned Intel Normal 8 To define whict VehiclelD Unsigned Intel Normal 16 Large range for tool if available Jr VehideMass Unsigned ite Norma 12 Typcaly Oto 2i Defne A a A E e Sea S606 SONAS SSE TOREK FNAL 122 cues A AS i add DTB Vehicle Model GUI s Hierarchical View of Databases Databases are loaded into VISUALCONNX s Multi CAN connection LY Test V4 0 LW Test V3 0 LY Test 2 0 LY Test V1 0 E 5 DTBControl Yig VOX E 5 H2_H3_ H4 Common GetHi HOST E Ls SystemlDs HOST E LS Sens VISUALCONN a CI VOLS AC VISUALCONNX shows this oe SensX Fuse Interfaces hierarchy in the tree when E LS H4_Switchpack_Actuation a Ey VISUALCONM In developer mode VER SWP AE Relocatable a Re EEE H4 Resistance Module Interface WISUALCON Na LVTest CAN Databases DTB GUI Interface Database Imported from DTBControl_ VO 9 a oI wi pu Eo D E qu O E a E 0 WCEs_IP_POD_ 50 YCo _IP_POMEE a H3 DSP Module Interface
18. on Wrap up session Feedback on session Thank you add

Download Pdf Manuals

image

Related Search

System_IO_Interfacing_via_CAN_Messages

Related Contents

平成23年度採用の市職員を募集  Samsung SGH-E950 Керівництво користувача    MyFareBox  Manual de instrucciones  

Copyright © All rights reserved.
Failed to retrieve file