Home
Tools\PCAN-Router Pro\Documentation\Tutorial - PEAK
Contents
1. 33 9 Erie E 205h Transmit 1 Period 0 no more cyclic transmission Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 3d to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Result CAN message mCflnfo with ID 0x205 is transmitted only if previously a request with ID 0x205 and length 0 was received 40 PCAN Router Pro PPCAN Editor Tutorial m System kaz Receive Transmit Trace e PCAN USB Message DLC Data Cycle Time Count q 205h 8 00 00 00 00 A8 F2 05 00 1 i Q a Message DLC Data Cycle Time Count Trigger 205h Remote Request Wait 5 Manual uU G il E 4 10 Exercise 4a Manipulating CAN signals using SCALE and OFFSET Information With the parameters Scale and Offset values from a CAN bus can be manipulated like using the four basic arithmetics all without a definition of a function block For example an increasing 8 bit value rising ramp can be inverted falling ramp 0x00 0xFF gt OxFF 0x00 To do so the original value from the incoming message is written into a 32 bit variable there is not a smaller type and when writing to the output message this value is processed with Scale 1 and Offset 255 As an alternative the incoming value can be processed immediately before writing it to the 32 bit variable and is then passed
2. Activity Choose the profile for the PCAN Router Pro Reaction Besides the General tab a new tab has been created entitled with the configuration s name ConfigO I O by default Also the navigator at the left window edge now contains an additional icon named ConfigO Et Unies PCM i _ N File CAN Edit View CAN Objects Transmit Tools Window Help DO B eg amp gi so aa Navigator 4 Project Untitled Ghiects Activity A double click on this icon will open the configuration window Here e g default values for data objects can be set like routing instructions etc Change to Default values for data objects by selecting that tab Then a new record must be added here by either selecting menu entry Edit gt Add record or selecting Add record from the context menu PCAN Router Pro PPCAN Editor Tutorial m System H Configd Configuration Target module Name Config0 Module type PCAN Router Pro 19 Version 0 0 Enable vx Module no lo Remark Configuration no 0 v Message gateway Default values for data objects Function blocks Event based messaging Time eve Vo Function O Na Default Val Information Add Record Strg Einfg Delete Record Strg Entf Insert Space Record Umsch Einfg Activity Cell content can be edited by either pressing F2 or by a slow double click or by simply typing the new value The entries should be s
3. Message DLC Data Cycle Time Count q 205h 8 00 00 00 00 C8 F5 05 00 500 665 Q O a Message DLC Data Cycle Time Count Trigger lt Empty gt E Ww m Le H The shown message shown here contains information that the trace memory of the CompactFlash card has still room for 390600 CAN message 0x0005F5C8 31 PCAN Router Pro PPCAN Editor Tutorial m System 4 7 Exercise 3b Translating a CAN ID Information For the conversion of a CAN message to a different ID first two messages must be globally defined and imported into a new configuration The buttons menus and clicks for doing this are already known from the previous exercises Definition The contents of the incoming message 0x321 shall be transferred unchanged to the outgoing message 0x12345678 This transmit message will additionally be sent with ID Ox5FF on CAN 4 Activity Global definition of two CAN busses Router CAN 1 and Router CAN 4 as well as 3 messages Add a new Symbol cat CAN Objects Eos General Config 1 0 Object CAND Hex DLC Extended Enable RTRA Information JAF Router CAN 1 3 53 Oldint 321h 321h 4 J H E NewDutl 12345678h 12345678h 4 7 J SF Router CAN 4 9 EgiNewDudM BFFh oss SFFh M a ai Activity Global definition of a 32 bit signal Add a new Variable within each of the 3 messages 32 PCAN Router Pro PPCAN Editor Tutorial System kmi CAN Objects k gt a General
4. System CAN UI ConfigD 1 0 Eg Add defined Symbol xj Add defined Variable Delete Wes ET Bus Symbol Count Router CAN 1 1 Reaction The previously defined global CAN bus Router CAN 1 along with his contained message mCflnfo and 32 bit variable FreeTraceMemory will be imported into the configuration ConfigO Activity The defined bus Router CAN 1 must get a CAN channel of the hardware here CAN channel 0 General Config0 1 0 IE ed Router_CAN 1 B E mCflnfo 205h 205h 3 u FreeTraceMemory Information Channel No 1 Channel Number 0 the hardware CAN channels are numbered 0 3 internally 29 PCAN Router Pro PPCAN Editor Tutorial m System Activity Now the message must be supplied with physical parameters wi CAN Objects e General Config 1 0 u Object Direction Enable Period Timeout Event Time 24 Router_CAN 1 S E imCfinfo 205h 205h v ss MEMBR NN 5 Tsnccaced 4 FreeTraceMemory 1 Direction Transmit the PCAN Router Pro shall be transmitter 2 Enable Yes this is the message to be transmitted 3 Period 500 the transmission cycle time in ms Activity The contained CAN signal must get a data source CAN Objects cJ General Configd 1 0 Object Direction 170 Function 1 0 No Scale Offset Enable 23 Router CAN 1 t3 mCflnfo 205h 205h Transmit FOh Specialln
5. Left CAN LED 4 TxLed CANI C TxLed CAN TuLed CANS TxLed CANA EE gucci TxLed CANI TxLed CANZ TxLed CAN3 TxLed CAN4 Receive Right CAN LED J RuLed CANI Rubed CAN Rubed CANS 9 Ruled CANA SS NENNEN RxLed CANI RxLed CAN2 RxLed CANS RxLed CAN4 4 15 Exercise 5d Controlling Beeper continuous tone Information Similar to the activation of a LED a continuous tone or a short pattern from the internal beeper can be also be controlled externally Activity Configuring of the PCAN Router Pro in a way that the 32 bit receive signal from CAN is written directly to firmware resource BeeperPattern ai CAN Objects cat CAN Objects General Config0 1 0 Object Direction 170 Function 1 0 No Scale Offset Enable 45 Bus_0 t4 Symbol 100h 1 VO Function Special Out 2 VO Number Beeper Pattern 60 PCAN Router Pro PPCAN Editor Tutorial m System 3 Enable Yes Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 5d to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Information When creating a tone pattern user must calculate a 32 bit value first Structure of this value is as follows The upper 24 bit will define the tone pattern The lower 5 bit will declare how many of these bits are already played In between
6. by right clicking Router CAN 1 This defines a new message on the CAN bus Router CAN 1 parameters of the message must be set as follows 25 PCAN Router Pro PPCAN Editor Tutorial m System CAN Objects General Config 1 0 Object GSS Router CAN 1 CAN ID Hes DLC Extended Enable ATA In Symbol name mCflnfo ID 0x205 DLC 8 message has 8 data bytes Extended No 11 bit IDs are sufficent Enabled Yes o X ce 0 I9 RTR No message shall be sent always not only on request 7 Information Description of what this line does Definition This message shall contain a 32 bit signal FreeTraceMemory in the data bytes 5 8 that displays the available number of CAN messages to be stored on the CF card Activity Within the CAN message a 32 bit wide data object must be created CAN signal that holds the number of free places From the context menu right click on CAN message select Add a new Variable and then supply the parameters of the signal at CAN Objects m General Canfig 1 0 Object Unit Bit Length Byte Position Bit Position Signed Byte Orde E F Router_CAN 1 t mCflnfo 205h 205h T E Manamel a ENCNNN 1 Variable name FreeTraceMemory 2 Unit no physical unit only as an information 26 PCAN Router Pro PPCAN Editor Tutorial m 8 pe 2 MU oem cOM System Bit length 32 Start Byte 4 by this the signal is locate
7. 0 Object Direction 1 0 Function VONo Scale Offset Enable 44 Route CAN 1 t4 mDiag 500h 8 Lob FLU Transmit FOh Special In ModulelD 1 0 v 1 l O Function FO Special In 2 l O Number ModulelD 3 Enable Yes Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 6c to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Reaction The CAN message mDiag with ID 0x500 carrying the module ID is transmitted Information Changes of the module ID e g by turning the rotary switch is shown immediately but it becomes effective only after a restart of the module e g Power Off On 69 PCAN Router Pro PPCAN Editor Tutorial m System 4 20 Exercise 6d Reading firmware version and configuration version Hardware Diagnostics Activity The mDiag message will get 5 additional 8 bit variables Firmware version 3 numbers and configuration version 2 numbers at CAN Objects General Config0 l a Object Unit Bit Length Byte Position Bit Position Signed Byte Order G8 Route_CAN 1 mDiag 500h 4 Module 4 0 0 Intel 3 FirmwareV ersionM ain 8 1 0 Intel 9 FirmwareVersSub 8 2 0 Intel xu FirmwareBuild 8 3 0 Intel 4 ConfigVersionMain 8 4 0 Intel conversion ub I Assignment of data sources ai CAN Objects General Config0 1 0 Object
8. 1 2 3 4 to CF all 3 Default Value 3 Sum of 1 route 11 bit IDs only and 2 route 29 bit IDs only 4 Rowb5 l O No Trace enable 1 bit for each CAN channel 5 Default Value 15 Sum of 1 CAN 1 2 CAN 2 4 CAN 3 and 8 CAN 4 6 Information Description of what this line does helpful in later sessions Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 2a to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Result All messages coming in at the four CAN ports are forwarded to the CF card logging function Post processing is done later after transferring the log file to your PC see exercise 2b 22 PCAN Router Pro PPCAN Editor Tutorial m System Remark 1 Also the known routing functions explicit and excluding may be used only support 11 bit IDs Remark 2 The CF card is also accessible as CAN 5 virtual CAN channel Remark 3 The reverse direction routing from CF card to the CAN ports playback is not possible 4 5 Exercise 2b Conversion of the binary Trace file from the CF card to the PC Information Using the CF management tool PEAK Converter comes along with the PCAN Router Pro or to be found on our website or the PEAK product CD traces can be extracted from the CF card and converted to plain text trc This format is used by all PEAK
9. 3a Definition Of CAN messages e g reading a system variable Activity Create a new empty configuration file using menu item File gt New Reaction This will open an yet empty window for all the global CAN objects used later within the different configurations If a file contains multiple configurations with different CAN objects they all must be defined here Later they are imported selectively into the different configurations 24 PCAN Router Pro PPCAN Editor Tutorial System Reaction In that window one CAN bus is already defined Bus O below which global CAN objects can be created hierarchically Remember This is just an example for a possible configuration Definition Bus 0 will be named Router CAN 1 the field Bitrate is just for informational purposes The CAN transceiver TJA1041 standard model will work at 500 kbit s by default Activity Double click the name Bus 0 and enter a new name for it Choose the default bit rate 500 kbit s from the dropdown list only as an information ka CAN Objects General Config 1 0 Object Bitrate Information Router C N 1 500 kbit s 1 Bus name Router CAN 1 2 Bitrate 500 kbit s only as an information 3 Information Description of what this line does helpful in later sessions Definition On this bus a CAN message mCflnfo shall be transmitted 8 bytes length CAN ID 0x205 Activity Select entry Add a new Symbol from the context menu
10. Applications PCAN Explorer PCAN Trace etc for post processing Activity For data extraction the CF card must be removed from the PCAN Router Pro only to be done when the device is plugged off or in sleep mode The card is then inserted into your PC s card reader and the contained binary file TRACE BTR should be copied to your PC s local hard disk 23 PCAN Router Pro PPCAN Editor Tutorial m System KIJF gt Computer ROUTERPRO F ROUTERPRO FJ durchsuchen Organisieren fis Offnen Brennen Neuer Ordner E EH e y Favoriten Name Grobe Typ Anderungsdatum trace b M 2 Offnen t a Bibliotheken M Computer Senden an gt amp Win7 SysApps C Ausschneiden cs Daten D n e ROUTERPRO F ey G amp P Design venus N Verkn pfung erstellen S Produktdat venus O L schen G inst hh 001 serv 01 S Umbenennen G9 TechDok hh 001 serv 01 T Eigenschaften G2 x hh 001 serv 01 X Activity Now the binary Trace file respectively the recorded traces is processed with the CF management tool PEAK Converter Activity Before re inserting the CF card into the PCAN Router Pro any content should be removed in order to have the full capacity available Simply do a format with Windows Explorer and afterwards copy an empty TRACE BTR file to the card Such file is available in different sizes from the PCAN Router Pro s product CD 4 6 Exercise
11. Or an incoming message may be used to trigger transmission of a completely different message PCAN Router Pro PPCAN Editor Tutorial m System 2 4 Default values When defining parameter values here the module s resources may be preset from the start For example a non default bit rate of a CAN bus may be set here permanent message routings or logging modes may be activated LEDs and wires may be switched logically etc 2 5 Function Blocks In the case that simple manipulation of values using SCALE and OFFSET turned out to be insufficient the firmware offers so called function blocks with even more complex capabilities Such functions are e g value mapping with X Y tables or matrices hysteresis functions delays counters timers low pass filters a vast collection of mathematical and logical functions up to a complex PIDT1 closed loop control Function blocks may be processed sequentially or conditionally 2 6 Event triggered Transmission of CAN Messages For CAN messages to be transmitted conditionally a pool of trigger conditions is available Also CAN messages can be requested from distant nodes RTR mechanism supported 2 7 Characteristics Curves Here 2 to 31 X Y translation pairs may be defined An incoming X value results in the output of the assigned Y value X values in between two X Y pairs will return an Y value linear interpolated PCAN Router Pro PPCAN Editor Tutorial m System from the available Y
12. Router Pro PPCAN Editor Tutorial m System Receive Transmit Trace amp PCAN USB Message DLC Data Cycle Time Count qu 12345678h 4 F5 A5 55 05 19791 14 Q O a Message DLC Data Cycle Time Count Trigger Enn 4 F5 A5 55 05 250 123 Manual E 2 S il E 3 Receive Transmit Trace e PCAN USB Hub Message DLC Data Cycle Time Count q 5FFh F5 A5 55 05 23415 1324 E Vv O a jm Message DLC Data Cycle Time Count Trigger u il 4 9 Exercise 3d Variation 3a Transmission only on Remote Request Information Based on exercise 3a the internal variable FreeTraceMemory shall be transmitted on external request RTR Remote Transmission Request Activity Open the configuration from exercise 3a and save it as exercise 3d In tab General modify the CAN message to Transmission Request by setting the RTR check for that symbol 39 PCAN Router Pro PPCAN Editor Tutorial m System lan CAN Objects General Config 1 0 Object CAN ID Hex DLC Extended Enable RTA Information 2 Router_CAN 1 9 imCflnfo 205h 205h 8 Mace ide ENSE NRRINREERERRRRRSRRRRRON QO 1 RTR activate Remote Transmission Request Activity In tab ConfigO I O set period value 0 thus switching off cyclic transmission ai CAN Objects CAN Objects General ConfigO 1 0 Object Direction Enable Period Timeout Event Time Router_CAN 1 u JE
13. on to the CAN message directly Important You have to take care that the manipulated result value under all conditions fits into the 32 bit size Activity Create an empty configuration file using menu item File gt New In the General tab add two symbols CAN messages to the already existing bus 0 41 PCAN Router Pro PPCAN Editor Tutorial m System CAN Objects Object CAN ID Hex DLC Extended Enable ATA Information 100h H E Symbol 200h 200h B E v Then each message will get a 8 bit variable 2 CAN signal using the context menu CAN Objects General Config 1 0 Object Unit Bit Length Byte Position Bit Position Signed Byte Order Multiplexer Type Bus_0 t Symboli 100h 0 Original 8 0 0 Intel None J E Symbol 200h D invertiont 8 0 0 W intel None Activity Create a new configuration within the file HW profile PCAN Router Pro and import all CAN objects from the General tab e g by dragging a complete bus with all underlying objects from the General tab and drop it onto the configuration tab s name Config I O The parameters then should be entered to meet this scenario A message 0x100 is received the contained signal is written into a 32 bit variable 0 A message 0x200 is transmitted cyclically 100 msec the contained signal is taken from the 32 bit variable 0 inverted Scale 1 and lifted Offsetz255 42 PCAN Router Pro PPCAN Editor Tutorial m Sy
14. page for instruction Result All incoming messages at CAN 1 are ignored only ID 0x100 is routed to CAN 4 4 3 Exercise 1c Forwarding of all messages from CAN 1 to CAN 4 with exceptions Information Anything except ID 0x700 shall be forwarded from CAN 1 to CAN 4 Activity Open configuration from exercise 1a and save as exercise 1c In the navigator left edge of the main window double click ConfigO The dialog box configuration is shown change to the tab Default values for data objects Activity Modify the existing entry from exercise 1a as shown H Config Configuration Target module Name Config0 Module type PCAN Router Pro 19 Version 0 0 Enable V Module no o v Remark Aufgabe 1c Configuration no o Message gateway Default values for data objects Function blocks Event based messaging Time eve VO Function IYO No Default Val Information gt 70h Special Out Fett ERE E RUE route all 11bit IDs except ID 0x700 1 1 O Function SpecialOut remains unchanged 2 l O No Routing 1 to 4 excluding 3 Default Value enter here the 11 bit ID to be omitted 0 2047dec 20 PCAN Router Pro PPCAN Editor Tutorial System 4 Information Description of what this line does helpful in later sessions Remark Routing function excluding only supports 11 bit IDs Information At this point all the configuration work for solving the exercise is done Activity Save the
15. points In other words characteristic curves allow value manipulation in a way like up to 31 different SCALE and OFFSET values would do Using this segments of the curve may be influenced in their gradient to define plateaus or non continuous functions 10 PCAN Router Pro PPCAN Editor Tutorial m System 3 List of Exercises An overview on the vast capabilities of the PCAN hardware like the PCAN Router Pro may be given when solving the following exercises 1a Forwarding of all messages from CAN 1 to CAN 4 1b Forwarding of defined messages from CAN 1 to CAN 4 1c Forwarding of all messages from CAN 1 to CAN 4 with exceptions 2a Recording of all received messages to a binary Trace file on the CF card 2b Conversion of the binary Trace file from the CF card to a PC 3a Definition of CAN messages e g reading a system variable 3b Translating CAN ID 3c Variation 3b Transmission only if source message was received 3d Variation 3a Transmission only on Remote Request 4a Manipulating CAN signals using SCALE and OFFSET 4b Manipulating CAN signals using Function block Characteristic curve 5a LED activity on CAN reception and transmission 5b Controlling LED manually or conditionally 5c Controlling LED externally 5d Controlling the Beeper continuous tone 5e Controlling the Beeper tone sequence 6a Reading date and time Hardware Diagnostics 11 PCAN Router Pro PPCAN Editor Tutorial m 6b S
16. positive Activity As in the previous example please create a new configuration within the file HW profile PCAN Router Pro and import all CAN objects from the General tab PCAN Router Pro PPCAN Editor Tutorial m System cai CAN Objects General Config0 1 0 Object Direction Enable Period Timeout Event Time f Bus_0 9 KMT CoolantT empR aw 100h pcos 0 9 89 EXCUNPTOTUIO NENNEN Tant PA EOE d NEN 1 Direction 0x100 is received 0x200 is transmitted 2 Enable Yes 3 Period 500 ms cycle time for the transmit message carrying the converted coolant temperature signal CAN Objects o General Config 1 0 Object Direction 170 Function I0 No Scale Offset Enable T Bus 0 KMT CoolantT empR aw 100Hh uA RealTemperature Receive FFh 32bit Variable 0 1 0 v Jj Eg ii roce lid bea 200h FFh 32bit Variable l O Function l O Number The signal RealTemperature from message 0x100 is transferred into variable 0 the modified result WithPlateau is transferred with message 0x200 Information The assignment of the raw value variable 0 to the smoothed result variable 1 is defined in a characteristic curve a list of X Y pairs A function block characteristic curve is needed to manage the conversion using this list The following table defines all points needed to create the mentioned plateau X values other than the listed ones are linearly interpolated 46 PCAN Router Pr
17. set min 1 0 v 3 hour Receive 70h Special Out RTC set hour 1 0 7 9 RteSetDate 130h Xu day Receive 70h Special Qut RTC set day of me 1 0 v 34 month Receive 70h Special Qut RTC set month 1 0 v 3X year Receive 70h Special Qut RTC set year 1 0 v t3 RtcUpdate 140h Receive 70h Special Out Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 6b to your PC 66 PCAN Router Pro PPCAN Editor Tutorial m System Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Result If these properly supplied CAN messages are now sent to PCAN Router Pro the internal RealTimeClock may be adjusted to an actual value lz h 3 1E 1D OC Wait SetRteTime lt Empty gt 3 SetRtc seconds 30 sSetRtc minutes 29 setRtc hours 1z 130h 4 04 12 O2 OA Wait o SetRtcDate lt Empty gt 4 setRtc davofweek 4 setktc dayofmonth 12 setRtc month mz SetRtc year 10 140h i l Wait RrtcWrite cEmpty 1 write 1 Remark The shown message will set the RTC to Thursday 18 February 2010 12 29 30 4 19 Exercise 6c Reading the module ID Hardware Diagnostics Information The module ID is a 4 bit value which is set to 0 by default but can be changed inside of the PCAN Router Pro by means of a rotary switch The ID has several functions For example it selects one from several configurat
18. with 500 kbit s each A specially prepared CF card e g 1 GByte included in shipment is inserted The PPCAN Editor 2 software is installed PCAN Router Pro PPCAN Editor Tutorial m System As a partner CAN participant e g a PCAN View or even better a PCAN Explorer part no IPES 005028 is installed on the PC Also the included PEAK Converter software plus a commercial CF card reader not included are installed on the PC The device PCAN Router Pro offers the following resources for configurations Device ID 4 bit 0 15 dec may be adjusted within the device using a rotary switch see user manual PCAN Router Pro 4 CAN busses 1 4 with WakeUp feature Different CAN bus transveiver HS HS OPTO LS DW LS SW CAN bus bit rate 10k 20k 33 3k 47 6k 50k 83 3k 95 2k 100k 125k 250k 500k 1M CAN messages 11 bit or 29 bit IDs 1 CompactFlash card serving as virtual CAN bus 5 recording modes configurable 2 LEDs per CAN bus for a total of 8 status can be written or read Time of Day RTC Beeper Software switch for Sleep mode Please query for availability Bit rates may be adjusted freely but actual function is depending on equipped transceiver types PCAN Router Pro PPCAN Editor Tutorial m System 2 The Configuration concept Most of the microcontroller equipped devices of PEAK System Technik GmbH offer possibilities to link any of their internally accessible resources with eac
19. 0 Router CAN 4 E Hew Outd Ms add e Transmit 1 Period 0 no cyclic transmission Activity Instead create two new entries in window ConfigO tab Message Gateway To do so open the context menu right click and select Add Record Enter the parameters of the ID 0x12345678 as follows 36 PCAN Router Pro PPCAN Editor Tutorial m System H Contigo boba Configuration Target module Name Config0 Module type PCAN Router Pro 19 Version 0 0 Enable 7 Module no 0 Remark Configuration no lo hd Message gateway Default values for data objects Function blocks Event based messaging Time events Characteristic curve u Source Bus Source Me Destination Bus Destination Me Enable I O Funct Enable I O Mode Mode V O Func Model O Mode Params Router CAN 1 NewOutl CCh Const hi direct Copy F h Special In none n Trigger Source Bus Bus 0 Router CAN 1 Source Message ID ID 0x321 in 11 bit format Destination Bus Bus 0 Router CAN 1 Destination Message ID ID 0x12345678 in 29 bit format Enable l O Function this routing shall always be active so set it constantly Enable l O Number set to value 1 Mode Direct copy whenever something is received Mode I O Function not implemented yet do not change Mode I O Number not implemented yet do not change Mode Params not implemented yet do not change Information Description o
20. 3 excluding Routing 1 to 4 excluding Routing 1 to CF excluding Source is CAN 2 Routing 2 to 1 All Routing 2 to 3 All Routing 2 to 4 All Routing 2 to CF All Routing 2 to 1 explicit Routing 2 to 3 explicit Routing 2 to 4 explicit Routing 2 to CF explicit Routing 2 to 1 excluding Routing 2 to 3 excluding Routing 2 to 4 excluding Routing 2 to CF excluding Source is CAN 3 Routing 3 to 1 All Routing 3 to 2 All Routing 3 to 4 All Routing 3 to CF All Routing 3 to 1 explicit Routing 3 to 2 explicit Routing 3 to 4 explicit Routing 3 to CF explicit Routing 3 to 1 excluding Routing 3 to 2 excluding Routing 3 to 4 excluding Routing 3 to CF excluding Source is CAN 4 Routing 4 to 1 All Routing 4 to 2 All Routing 4 to 3 All Routing 4 to CF All Routing 4 to 1 explicit Routing 4 to 2 explicit Routing 4 to 3 explicit Routing 4 to CF explicit Routing 4 to 1 excluding Routing 4 to 2 excluding Routing 4 to 3 excluding Routing 4 to CF excluding In this context explicit means routing of the specified ID only and excluding means routing of everything except that ID The use of these functions is demonstrated in the following exercises 1b and 1c Remark 1 Routing functions explicit und excluding only support 11 bit IDs Remark 2 CF card cannot be used as a data source e g for Playbacks Information At this point all the configuration work for solving the exerc
21. Config 1 0 Object Unit Bit Length Byte Position Bit Position Signed Byte Order fe mE Router CAN 1 S E Oldint 321h XJ DataContent321 32 0 0 Intel t3 NewDutl 12345578Hh iu DataContentl 2345678 32 0 0 E Intel E F Router C N 4 NewDut4 BFFh em 32 v Ir T W intel Activity Creating a new configuration with Edit gt New Configuration incl selecting the hardware profile PCAN Router Pro Activity Import of the globally defined CAN objects into the tab ConfigO I O To do so open right click the context menu and select Add defined Bus In the selection window choose the busses Router CAN 1 and Router CAN 4 one by one Activity Assigning hardware channels to the busses CAN Objects General Config 1 0 Object Information Chumelo S Router ool sup LUCI TE NN REN Ed zi 1 Channel Number 0 for Router CAN 1 and 3 for Router CAN 4 Activity Enter the parameters for the 3 messages 33 PCAN Router Pro cat CAN Objects General Config 1 0 PPCAN Editor Tutorial m System ka 6 Object E mE Router C N 1 4 amp 9 Oldini 321h 49 NewDutl 12345678h fff Router CAN 4 Direction Enable Period Timeout Event Time Receive Vl 0 Transmit J 50 0 1 Direction one incoming message 0x321 Receive two outgoing messages 0x12345678 und Ox5FF Transmit 2 Enable Yes all these messages shall be used 3 Period 50 transmission cycle ti
22. Direction 1 0 Function 1 0 No Scale Offset Enable IYF Route CAN 1 5 5 mDiag 500h uj Module Transmit FOh Special In ModulelD 1 0 vV 34 FirmwareVersionM ain Transmit FOh Special In Fw VerMain 1 0 v xu FirmwareversSub Transmit FOh Special In Pw VerSub 1 0 v xu FirmwareBuild Transmit FOh Special In Fw Build 1 0 v xu ConfigVersionMain Transmit FOh Special In Conf erMain 1 0 v a riesa T Transmit Fon Specialin Convesub 1 NN UN Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 6d to your FC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus 70 PCAN Router Pro PPCAN Editor Tutorial m System Remark Using a PCAN Explorer Part No IPES 005028 with the Instruments Panel Add in Part No IPES 005028 installed you can visualize all signals received from the PCAN Router Pro by means of a symbol file 23 07 4ufgabebd ipt Module Id Firmware Ver Contig Ver 4 21 Exercise 7a Sleep and wakeUp via CAN Information PCAN Router Pro is usually equipped with 4 transceivers capable of waking the device If the device is in sleep mode any incoming CAN message will wake the device and set it to the normal operation mode Activity Definition of a receive message which sets the internal variable SELFHOLD to 0 When receiving this message the PCAN Router Pro enters the so c
23. Message DLC Data Cycle Time Count Empty I Q 9 a Message DLC Data Cycle Time Count Trigger 100h 4 00 00 00 00 Wait 2 Manual a2 100h lt 01 00 00 80 Wait 1 Manual 100h 4 1F A0 32 AB Wait 1 Manual i 5 il H 62 PCAN Router Pro PPCAN Editor Tutorial m System i i jf Tip The 32 bit value for a beep pattern like the one from 2 exercise be can be stored as a constant value in tab Default values for data objects To do so a 32 bit variable is supplied with the calculated bit pattern and remains unchanged further on When defining several different patterns here then incoming CAN selector or a calculation result can decide which pattern to be played Remark 1 As the current pattern is bigger than 31 bit the assignment to a variable must be done in 2 s complement since the PPCAN Editor only accepts SIGNED variables in tab Default values for data object Open Windows accessory Calculator Switch display mode to HEX Adjust width to Dword 32 Bit Enter the number AB32A01F Change the sign Switch display mode to DEZ Again change the sign Result 1422745569 Enter this value into the PPCAN Editor Open the configuration window in the navigator left edge of the main window by double clicking ConfigO Change to the tab Default values for data objects 63 PCAN Router Pro PPCAN Editor Tutorial m System H config Configuration Target module Mame Config Module type PCAN
24. PCAN Router Pro 4 Channel CAN Router with Data Logger PPCAN Editor Tutorial v1 0 0 PCAN Router Pro PPCAN Editor Tutorial m System Products taken into account Product name Model Part No PCAN Router Pro 4 High speed CAN channels IPEH 002212 Wake Up capability other CAN transceiver modules on request PCAN Explorer 5 IPES 005028 PPCAN Editor 2 PCAN View PEAK Converter Products names mentioned in this document may bet the trademarks or registered trademarks of their respective companies They are not explicitly marked by and EDUN 2011 PEAK System Technik GmbH PEAK System Technik GmbH Otto Roehm Stra 3e 69 64293 Darmstadt Germany Phone 49 0 6151 8173 20 Fax 49 0 6151 8173 29 www peak system com info peak system com Document version 1 0 0 2011 05 30 PCAN Router Pro PPCAN Editor Tutorial m System Contents 1 Introduction 5 1 1 Prerequisites for Operation 5 2 The Configuration concept 7 2 1 Possibilities of configuration 7 2 2 Scaling 8 2 3 CAN Gateway Services 8 2 4 Default Values 9 2 5 Function Blocks 9 2 6 Event triggered Transmission of CAN Messages 9 2 7 Characteristics Curves 9 3 List of Exercises 11 4 solutions and Explanations 13 4 1 Exercise la Forwarding of all messages from CAN 1 to CAN 4 13 4 2 Exercises 1b Forwarding of defined messages from CAN 1 to CAN 4 19 4 3 Exercise 1c Forwarding of all messages from CAN 1 to CAN 4 wit
25. Router Pro 19 Version 0 0 Enable W Madule no lo Remark Configuration no lo Message gateway Default values for data objects Function blocks Event based messaging Time events VKO Function YO Mo Default Value Information Id 70h Special Out Beeper Pattern 2usxo Deeper pattern SMS 24bit 1 l O Function Special Out 2 O Number Beeper Pattern 3 Default Value 1422745569 Remark 2 The continuous tone as explained in exercise 5d must be entered as value 2147483615 in the PPCAN Editor s default values 4 17 Exercise 6a Reading date and time Hardware Diagnostics Information Date and time in the PCAN Router Pro are supplied by a hardware RealTimeClock The values can be read from the internal variables and subsequently be transmitted via CAN e g for display purpose Activity Definition of two transmit messages length 4 each which are cyclically filled by the PCAN Router Pro with date and time values and transmitted on CAN bus Router CAN 1 64 PCAN Router Pro PPCAN Editor Tutorial m System kan CAN Objects General Config 1 0 Object Direction 10 Function 140 No Scale Offset Enable SF Router CAN 1 ct mDate 101h xu PackedD ateStruct Transmit FOh Special In RTC Date 1 0 Jv t mTime 102h 0 zo CEST e Transmit FOh Special In RTC Time 1 0 iw Information At this point all the configuration work for solving the exercise is do
26. Trace File MsgFree 1 1 1 O Function FO Special In this is the source an internal firmware variable 2 O Number Trace File Msg Free which is the name of the variable Scale 1 no scaling at all like multiplying with 1 4 Offset 0 no shifting at all like addition of 0 5 Enable Yes this is the signal within the message to be used 30 PCAN Router Pro PPCAN Editor Tutorial m System Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 3a to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus as shown in exercise 1a Reaction While uploading the Output window of the PPCAN Editor shows lots of progress messages regarding the transmission protocol Their meaning is explained in other documents Reaction While transmitting and processing of the configuration the status LED of the PCAN Router Pro is blinking randomly After automatic restart the status LED blinks with 1 Hz and the PCAN Router Pro has successfully started with your new configuration Result PCAN Router Pro now transmits via CAN 1 a message with IDOx205 length 8 carrying the 32 bit value TraceFileMsgFree which is an internal variable of the PCAN Router Pro With a PCAN View connected to the same CAN network this message can be watched j Receive Transmit Trace e PCAN USB
27. alled Sleep Mode e g useful for saving vehicle s battery capacity v CAN Objects General ConfigO 1 0 Object Direction 120 Function I0 No Scale Offset Enable S43 Bus 0 c4 SleepSwitch 100h n scii rec e DM DUAE n ep RS m pue 70h Special Dui REE Information At this point all the configuration work for solving the exercise is done 71 PCAN Router Pro PPCAN Editor Tutorial m System Activity Save the configuration file as project exercise 7a to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Result If a message ID 0x100 carrying the signal Selfhold 0 is received then the PCAN Router Pro enters Sleep Mode immediately Any subsequent message will cause wake up of the device Status LED is blinking Information After waking up the internal variable SELFHOLD is initialized to 1 Therefore the PCAN Router Pro stays awake all the time until configured otherwise 4 22 Exercise 7b Sleep and wakeUp via external pin Information A second method for waking up the PCAN Router Pro is connecting pin 4 of the D Sub sockets 3 or 4 with Vbat 8 26 V The vehicle s wire ignition carrying that voltage when driver s key is present and turned is suitable for this purpose 72 PCAN Router Pro PPCAN Editor Tutorial m System 4 23 Exercise 7c Sleep and wakeUp via timed alarm Information A third method for waking up the PCAN Router Pro is setting the ala
28. ansmission Information Reception and transmission of CAN messages can be visualized For this the PCAN Router Pro is equipped with two LEDs per channel In this exercise the LEDs shall indicate CAN activity separated by direction Rx and Tx Activity Create an empty configuration project file by using menu item File gt New Activity Create a new configuration within the configuration project file using menu item Edit gt New Configuration 50 PCAN Router Pro PPCAN Editor Tutorial m System Activity Activate the configuration window by clicking the icon ConfigO at the left window edge Select the tab Function Blocks and create a new entry for each LED To do so use menu item Add Record from the context menu H contigo Jim Configuration Target module Name Config Module type PCAN Router Pro 19 Version 0 0 Enable v Module no al numbers v Remark Aufgabe 5a Configuration no lo Message gateway Default values for data objects Function blocks Event based messaging Time events Characteristic curve Function Cod Ena Inputl I O Functio Inputl I O No Input2 I O Functio Input2 I O Output VO Function Outputl O Parameters Cycle Time Identity v FOh Special In RxTraffic Indicator CAN 1 F0h Special In 0 00h DOut Level LED CAN1a 100 Identity v FOh Special In TxTraffic Indicator CAN 1 FOh Special In 0 00h DOut Level LED CAN 1b 100 Identity FOh Special In R
29. ation window by clicking icon ConfigO at the left window edge and select tab Function blocks From the context menu use Add Record to create 4 new Function blocks o PCAN Router Pro PPCAN Editor Tutorial m System Bl Configd e Je x Configuration Target module Name Config Module type PCAN Router Pro 19 Version 0 0 Enable V Module no 0 X Remark Configuration no 0 Y Message gateway Default values for data objects Function blocks Event based messaging Time events Characteristic curve Function Cod Ena Inputll O Functio Inputl I O Input2 I O Functio Input2 VO Output I O Functio Outputl O Parameters Cycle Information Math functions v FFh 32bit Variable 0 CDh Positive Const 127 70h Special Out none 731270001 25 If Ini gt In2 do next line Identity W CDh Positive Const 1 FOh Special In 0 00h DOut Level LED CAN 1a 25 switch LED 1a on Math functions V FFh 32bit Variable 0 CDh Positive Const 127 70h Special Out none 711270 01 25 If Inl lt In2 do next line CDh Positive Const 0 FOh Special In 00h DOut Level LED CAN1a Line 1 Function block Math Function IF Enable Yes Input 1 l O Function 32 bit variable Input 1 l O Number 0 Input 2 l O Function constant Input 2 l O Number value is 127 Output l O Function unused do not change Output I O Number unused do not change O Qo 21
30. caling of values as well as applying PCAN Router Pro PPCAN Editor Tutorial m System methods CAN gateway services Default values Function blocks Event based messaging Time events and Characteristic curves Devices with only one CAN bus do not support the Gateway services and Time events may also be missing on some of the smaller platforms All available resources of a device are advised to the PPCAN Editor by applying a special file related to that hardware This so called hardware profile lets the PPCAN Editor allow or restrict configuration possibilities correspondingly The user instead may refer to the hardware manual of a specific device see our website www peak system com for free manual download 2 2 Scaling The most elementary means of manipulating values is using the four basic arithmetics They are controlled with parameters SCALE and OFFSET taken from mathematics well known linear equation Here the parameter SCALE decides on multiplication if gt 1 respectively division if lt 1 whereas parameter OFFSET is responsible for addition if gt 0 positive respectively subtraction if lt 0 negative As a neutral setting SCALE 1 and OFFSET 0 are preset by default 2 3 CAN Gateway Services Incoming messages on one CAN bus may be selectively forwarded to a different CAN bus Or they may be transmitted on the same CAN bus but with a different ID e g conversion 11 bit lt gt 29 bit
31. configuration file as project exercise 1c to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Result PCAN Router Pro forwards all 11 bit IDs coming in at CAN 1 to CAN 4 except for ID 0x700 which is discarded which also applies to all 29 bit IDs 4 4 Exercise 2a Recording of all received messages to a binary Trace file on the CF card Activity Open configuration from exercise 1a and save as exercise 2a In the navigator left edge of the main window double click ConfigO The dialog box configuration is shown change to the tab Default values for data objects Activity Modify the existing entry from exercise 1a and create 4 additional lines as shown 21 PCAN Router Pro PPCAN Editor Tutorial m System H Config e Configuration Target module Name Config0 Module type PCAN Router Pro 19 Version 0 0 Enable v Module no o Remark Aufgabe2a Configuration no o Message gateway Default values for data objects Function blocks Event based messaging Time events VO Function I O No Default Val Information 70h Special Out Routing 1 to CF All 3 11bit 29bit IDs 70h Special Out Routing 2 to CF All 3 11bit 29bit IDs 70h Special Out Routing 3 to CF All 3 llbit 29bit IDs 70h Special Out Routing 4 to CF All 3 11bit 29bit IDs IUUITETTTONMN oral channels 2 4 8 15 1 l O Function SpecialOut 2 Rows 1 4 l O No Routing
32. d in data bytes 5 8 Start Bit O Signed no can t be negative Byte Order Intel format LSB in byte 0 bit 0 MSB in byte 3 bit 7 Information Description of what this line does Information The empty layout of the CAN message is hereby defined but not yet assigned to a physical data source Therefore a configuration must be created Activity Create an empty configuration within this file select the menu item Edit gt New Configuration Reaction You re asked for the hardware to be configured Activity Select the profile for a PCAN Router Pro W Select Module Tyne STA PCAN Diag S1B PCAN MIO 32 Bit 514 PCAN MIO 518 MU Thermocouplel CAN 19 PCAN Router Pro Reaction Besides the General tab a new tab has been created entitled with the configuration s name ConfigO I O by default Also 27 PCAN Router Pro PPCAN Editor Tutorial m System the navigator at the left window edge now contains an additional icon named ConfigO Navigator k ee CAN Obie a 3 Project Aufgabe TE CAN Objects Genffal Confiad I O gt EHE RouterCAN 1 El 4 mCtlnto 205h Activity The globally defined CAN message shall be used in this configuration here Therefore it must be imported Click on the new tab ConfigO I O for bringing it into the foreground and select from the context menu right click Add defined Bus 28 PCAN Router Pro PPCAN Editor Tutorial PEAK
33. e ID 0x100 with signal Selfhold 0 is received the PCAN Router Pro enters Sleep Mode immediately When reaching the programmed alarm time the device wakes up 4 24 Exercise 8a changing the bit rate Information Depending on the installed CAN transceivers PCAN Router Pro sets the following bit rates by default is TOR NE NN e ro LS DW TJA 1054 125 kbit s LS SW TH 8056 33 3 kbit s yes These default bit rates may be changed by adding appropriate entries in the configuration In the tab Default values for data objects add one record per channel to be modified and fill in the desired transmission speeds 3 Query for availability 74 PCAN Router Pro PPCAN Editor Tutorial System H Config Configuration Target module Name Config Module type PCAN Router Pro 19 Version 0 0 Enable Module no all numbers Remark Aufgabe 8a Configuration no Message gateway Default values for data objects Function blocks Event based messaging VKO Function VO Mo Default Val Information I Pea celts CAN bitrate 1 Port Router CAN 4 HW Chn CANI bitrate raw ZA mc CAN 2 bitrate raw CAN 3 bitrate raw CAM 4 bitrate raw CAM bitrate 10 kbit s CAM bitrate 20 kbit s CAN bitrate 33 333 kbit s CAN bitrate 47 619 kbit s CAN bitrate 50 kbit s CAN bitrate 83 333 kbit s CAM bitrate 95 238 kbit s CAM bitrate 100 kbit s CAN bitrate 125 A SE CAM bitrate 250 kbt CAM bitra
34. et as follows H Configd Configuration Target module Name Config Module type PCAN Router Pro 19 Version 0 0 Enable 4 Module no o Remark Configuration no Message gateway Default values for data objects Function blocks Event based messaging Time events Vo Function Vo No Default Val Information libit IDs 29bit IDs 00h DOut Level CCh Const h CDh Positive Const CEh Negative Const FOh Special In FFh 32bit Variable 1 1 O Function SpecialOut one group of resources 2 l O No Routing 1 to 4 All 3 Default value 3 Sum of 1 route 11 bit IDs only and 2 route 29 bit IDs only 4 Information Description of what this line does helpful in later sessions In this example routing of messages from CAN 1 source to CAN 4 destination is activated A value of 3 means that both the 11 bit IDs 1 as well as the 29 bit IDs 2 are forwarded parameter values can be combined by addition The I O function for routing is located PCAN Router Pro PPCAN Editor Tutorial System in resource group 0x70 SpecialOut which among others offers the following routing possibilities for CAN messages Source is CAN 1 Routing 1 to 2 All Routing 1 to 3 All Routing 1 to 4 All Routing 1 to CF All Routing 1 to 2 explicit Routing 1 to 3 explicit Routing 1 to 4 explicit Routing 1 to CF explicit Routing 1 to 2 excluding Routing 1 to
35. eters In case the real temperature leaves the specified range e g motor defect it shall be displayed directly Real Temp Temp with Plateau Information For implementing such a behavior the function block characteristic curve is suitable It recalculates any incoming value by means of a X gt Y list thus creating that plateau In the following example 32 bit variable 0 holds the raw input value which is given to the characteristic curve as input whereas 32 bit value 1 gets the result of the conversion That smoothed value is then transmitted in a separate CAN message Activity As with the previous example create an empty configuration file using menu item File gt New then add two symbols CAN messages with an 8 bit variable 2 CAN signal each 44 PCAN Router Pro PPCAN Editor Tutorial PEAK System CAN D Hex DLC Extended Enable ATR Information 100h 1 a a 200h 1 7 E 1 CAN ID 0x100 for the incoming raw value 0x200 for the outgoing display value with plateau 2 DLC Both CAN messages are 1 byte of lenght 3 Enable Yes General Config 1 0 Object Unit Bit Length Byte Position Bit Position Signed Byte Order Multiplexer CE Bus 0 9 KMT CoolantT empR aw 100h xu RealTemperature 8 0 0 Intel None t3 KMTCoolantT empShown 200h WithPlateau I I I Intel 1 Bit Length 8 value range 256 sufficient 2 Signed no always
36. etting date and time Hardware Diagnostics 6c Reading the module ID Hardware Diagnostics 6d Reading firmware version and configuration version Hardware Diagnostics 7a Sleep and WakeUp via CAN 7b Sleep and WakeUbp via external pin 7c Sleep and WakeUp via timed alarm 8a Changing the bit rate 17 PCAN Router Pro PPCAN Editor Tutorial m System 4 Solutions and Explanations You can find further information about the use of PPCAN Editor 2 in the help which you can invoke in the program via the menu Help or the F1 key 4 1 Exercise la Forwarding of all messages from CAN 1 to CAN 4 Activity Start the PPCAN Editor with a double click on the icon or by selecting the PPCAN Editor from the list of installed programs Activity Connecting the PPCAN Editor with a PEAK Interface e g PCAN USB Select menu item CAN Connect and choose then the appropriate hardware Reaction The selected connection is displayed in the status bar of the PPCAN Editor bottom left corner Messages Transmit Receive ct amp to PCAN USB 500 kbit s QkmtFull 0 Activity Check whether the PCAN Router Pro can be found on the CAN network by selecting menu item Transmit gt Detect Modules Reaction The Active Modules window lists the available devices here PCAN Router Pro along with some status information 13 PCAN Router Pro PPCAN Editor Tutorial m System Ge Active Modules cel amp e W Thefol
37. f what this line does 37 PCAN Router Pro PPCAN Editor Tutorial m System Activity Then enter the parameters for the ID Ox5FF on the 4 bus as follows Bl Configo LeJreJe Configuration Target module Name Config Module type PCAN Router Pro 19 Version 0 0 Enable Module no o X Remark Aufgabe 3c Configuration no o Message gateway Default values for data objects Function blocks Event based messaging Time events Characteristic curve Source Bus Source Me Destination Bus Destination Me Enable I O Funct Enable I O Mode Model O Func Mode F0 Mode Params Router CAN OldIn1 Router CAN 1 NewOutl CCh Const 1 direct Copy FOh Special In none no Trigger d Router CAN Oldini Router_CAN 4 NewOut4 mee Const 1 direct Copy F h Special In none n Trigger 1 Source Bus Bus 0 Router CAN 1 2 Source Message ID ID 0x321 in 11 bit format 3 Destination Bus Bus 3 Router CAN 2 4 Destination Message ID ID Ox5FF in 11 bit format Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 3c to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Result When sending a message with ID 0x321 to the PCAN Router Pro the contained data is forwarded in message ID 0x12345678 on CAN 1 and also in message ID Ox5FF on CAN 4 38 PCAN
38. h exceptions 20 4 4 Exercise 2a Recording of all received messages to a binary Trace file on the CF card 21 4 5 Exercise 2b Conversion of the binary Trace file from the CF card to the PC 23 4 6 Exercise 3a Definition of CAN messages e g reading a system variable 24 4 7 Exercise 3b Translating a CAN ID 32 4 8 Exercise 3c Variation 3b Transmission only 1f source message was received 36 PCAN Router Pro PPCAN Editor Tutorial 4 9 4 10 4 11 4 12 4 13 4 14 4 15 4 16 4 17 4 18 4 19 4 20 4 21 4 22 4 23 4 24 Exercise 3d on Remote Req Exercise 4a SCALE and OFF Exercise 4b Function bloc Exercise 5a and transmiss Exercise 5b conditional ly Exercise 5c Exercise 5d tone Exercise 5e sequence Exercise 6a Diagnostics Exercise 6b Diagnostics Exercise 6c Diagnostics Exercise 6d configuration Exercise 7a Exercise 7b pin Exercise 7c Exercise 8a Variation 3a Transmission only uest Manipulating CAN signals using SET Manipulating CAN signals using k Characteristic curve LED activity on CAN reception 10n Controlling LED manually or Controlling LED externally Controlling Beeper continuous Controlling the Beeper tone Reading date and time Hardware Setting date and time Hardware Reading the module ID Hardware Reading firmware version and version Hardware Diagnostics Sleep and wakeUp via CAN Sleep and wakeUp via externa
39. h other For this the firmware allows virtual wiring of the hardware resources by several means e g so called Function Blocks among others Accordingly a module without configuration just represents a collection of loose ends and is therefore inoperational For creating editing and managing configurations PEAK System Technik GmbH offers the PPCAN Editor 2 for free download from their website Files created this way along with the enclosed configuration are stored to the PC at first then transferred via CAN to the PCAN device upload and stored there non volatile Some devices can hold several configurations the valid one is then determined by means of a selector switch Project files created with the PPCAN Editor 2 may contain several configurations The device ID selects the one to be executed when the device starts e g after being powered The selector switch simultaneously determines the device ID and the memory slot within the device s non volatile memory where the chosen configuration is loaded from This offers the possibility to wire several devices with different IDs to the same CAN bus and to upload the same multi configuration file to them all The unique ID of each device will let them load their individual configuration from the appropriate memory slot and subsequentially execute a different task each 2 1 Possibilities of configuration Linking of internal resources can be done using straight assignment the simple s
40. ions contained in a PPCAN project file according to the switch position When experiencing unexpected behavior of your freshly edited configuration one of the first steps in trouble shooting is determination of the module ID It sometimes happens that a configuration is edited again and again without success since each time a different one is executed by the PCAN Router Pro Definition Transmitting a CAN message mDiag with ID 0x500 length 8 bytes on the bus Router CAN 1 This message contains the 67 PCAN Router Pro PPCAN Editor Tutorial PEAK System 4 bit signal ModulelD which displays the current position of the module ID rotary switch Activity Create a new CAN message mDiag at the General tab length 8 bytes Object CAM ID Hex DLC Extended Enable ATA Inf EIF Route_CAN 1 Eee mDiag 500h S00h Creating the new CAN signal ModulelD 4 Bit unsigned at the General tab General Config0 1 0 Object Unit Bit Length Byte Position Bit Position Signed Byte Order E Route_CAN 1 9 mDiag 500h xu Lob FT D D Intel Importing of the message and signal into the configuration cycle time 500 ms Config 1 0 Object Direction Enable Pernod Timeout Event Time Eb St Route CAN 1 Ei mDiag S00h Transmit PCAN Router Pro PPCAN Editor Tutorial m System Supplying the signal with internal variable ModulelD of the PCAN Router Pro iw CAN Objects ESSE General Config 1
41. ise is done 17 PCAN Router Pro PPCAN Editor Tutorial m System Activity Enter a title for this configuration in the field Remark The configuration project file ppproj should be saved as Exercise 1a to your PC To do so please select the menu item File gt Save As Activity The configuration must be transmitted to the PCAN Router Pro via CAN bus Upload For this select menu item Transmit gt Send Configuration or click the corresponding icon from the toolbar ools Window Help ge M Configd m gt i o Important Note Ensure that the list box in the toolbar upper window edge shows the name of your configuration ConfigO Transmit Tools Window Help a are P Reaction While uploading the Output window of the PPCAN Editor shows lots of progress messages regarding the transmission protocol Their meaning is explained in other documents Reaction The status LED of the PCAN Router Pro flashes during the transmission and processing of the configuration file randomly Thereafter the status LED flashes green at 1 Hz and the PCAN Router Pro is ready with its new configuration Result The PCAN Router Pro will now transfer all incoming messages from CAN 1 unmodified to the CAN 4 but not in the reverse direction this must be specified in an additional record line 18 PCAN Router Pro PPCAN Editor Tutorial m System 4 2 Exercises 1b Forwarding of defined messages from CAN 1 to CAN 4 Inf
42. item File gt New Globally define a receive message mLED 0x333 containing an 8 bit CAN signal LedByte CAN Objects General Object 7 l CAN ID Hex DLC Extended Enable RTA Information GS Router_CAN 1 1 CAN ID 0x333 2 DLC 1 the CAN messages has a length of 1 byte 3 Enable Yes CAN Objects Gereral Config VO Object Unit Bit Length Bute Position Bit Position Signed Byte Order ES RouterCAN 1 Ely mLED 333h I Intel 1 Bit Length 8 256 values sufficient 2 Signed no never negative 53 PCAN Router Pro PPCAN Editor Tutorial PEAK System Activity Create a new configuration within the project file for this use menu item Edit gt New Configuration Then import the receive message into the new configuration and finally enter the parameters General Config0 1 0 Object Information Channel No peeesssssssssssesssssssssososssssssosssesssssoosssssssSi Object Direction Enable Period Timeout Event Time E Router C N 1 1 Direction 0x333 will come in Receive 2 Enable Yes an CAN Objects General ConfigO 1 0 Object Direction 1 0 Function lfONo Scale Offset Enable Router CAN 1 B E mLED 333h P LedByte Receive FFh 32bit Variable 0 M I O Function l O Number The signal LedByte from the message 0x333 is transferred into the variable 0 Activity Open the configur
43. itor Tutorial m System H Configo Configuration Target module Name Config0 Module type PCAN Router Pro 19 Version 0 0 Enable V Module no all numbers Remark Configuration no 0 v Message gateway Default values for data objects Function blocks Event based messaging Time events Characte VO Function I O No Default Val Information 70h Special Out Routing 1 to 4 Al 3 11bit 29bit IDs 4 70 Special Out Routing to AEM 1b 2951s 1 1 O Function SpecialOut one group of device functions 2 l O No Routing 1 to 4 All and Routing 4 to 1 All 3 Default value 3 Sum of 1 only routes 11 bit IDs and 2 only routes 29 bit IDs 4 Information Description of what this line does Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 5a to your FC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Result At reception or transmission of a CAN message the assigned LED will be lit for 100 ms 52 PCAN Router Pro PPCAN Editor Tutorial System 4 13 Exercise 5b Controlling LED manually or conditionally Information From bus Router CAN 1 a 1 byte message mLED shall be received containing an analog value LedByte 0 255 If this value exceeds 127 the LED shall be lit dark otherwise Activity Create an empty configuration project file by using menu
44. l Sleep and wakeUp via timed alarm Changing the bit rate Appendix A Literature and References System 39 41 44 50 53 58 60 62 64 66 67 70 71 72 73 74 76 PCAN Router Pro PPCAN Editor Tutorial m System 1 Introduction Working successfully with the PPCAN Editor requires at least some basic understanding of the user regarding hardware knowledge and programming experience This tutorial therefore addresses owners of a PCAN Router Pro who are trying to do some more complex configurations of the device using their skills from Electronics and Informatics education At first you should try to get familiar with the free PPCAN Editor following the steps of this tutorial When experiencing more and more difficulties with understanding the matter and proceedings this may at least serve as an indication for the future use of the PPCAN Editor when deciding against the effort PEAK System Technik GmbH offers to their customers a configuration service subject to detailed specifications 1 1 Prerequisites for Operation For reasonably processing this tutorial respectively for solving the exercises a PCAN Router Pro with sufficient power source should be at hand Its CAN busses should be connected to a computer via PEAK interfaces and also should be properly terminated e g by means of the internal DIP switches At least two CAN busses e g 1 and 4 are connected to the PC via PEAK interfaces
45. lowing modules responded to DETECT Module Type Module No Target ID Version PPCAN Version PCAN Router Pro 0 0x0640 vil 21 E g column Module No holds the currently adjusted device ID O in this case The field Version holds the firmware revision Activity Create a new empty configuration file using menu item File gt New Reaction A yet empty window appears where global CAN objects can be defined Instructions on using that window and editing its content are given in exercise 3a Activity For creating a new configuration within the configuration file choose menu item Edit gt New Configuration Untitled PPCAN Editor File CAN Edit View CAN Objects Transmit To L amp iB Mew Configuration kim ey Rename Configuration Strg FZ Navigator Delete Configuration 4 1 Projec Sete Delete Rename Add Record Strq Einfq Reaction PPCAN Editor asks for the hardware to be configured Information PPCAN Editor can configure several different PCAN devices equipped with individual resources each Therefore with each type of hardware a list of available resources is supplied by the manufacturer for each type of hardware the so called hardware profile file ppprf 14 PCAN Router Pro PPCAN Editor Tutorial m System W Select Module Type SLA PCAN Diag 1B PCAN MIO 22 Bit 14 PCAN MIO 18 MU Thermocouplel CAN 1 19 PCAN Router Pro Ok L Cancel
46. me in ms Activity Enter the parameters for the 3 signals mmc CAN Objects General Config0 1 0 Object IAF Router_CAN 1 9 Oldini 321h MJ DataContent321 JEg New Outl 12345678h x DataContent12345678 Transmit St Router C N 4 3 New Out 5FFh Direction 170 Function 170 No Scale Offset Enable Receive FFh 32bit Variable 0 1 0 v FFh 32bit Variable 1 0 v FFh 32bit Variable Transmit 1 1 O Function FFh 32 bit variable used for temporary storage of the content l O Number 0 256 of these RAM variables are available Scale 1 no scaling at all like multiplying with 1 Offset 0 no shifting at all like addition of 0 er ee X9 gu Enable Yes all these signals within the messages shall be used 34 PCAN Router Pro PPCAN Editor Tutorial m System Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 3b to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Activity From PCAN View or PCAN Explorer a 4 byte CAN message with ID 0x321 is sent into PCAN Router Pro s CAN 1 with data bytes containing an eye catching pattern Result CAN 1 and CAN 4 will transmit messages 0x12345678 and Ox5FF cyclically with the same data pattern 36 Receive Transmit Trace 9 PCAN USB Message DLC Data Cycle Time Co
47. ne Activity Save the configuration file as project exercise 6a to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Information With the help of a PCAN Explorer Part No IPES 005028 the packed structures of the RTC can be displayed in plain text when decoded by means of a symbol file By applying this symbol file messages transmitted from the PCAN Router Pro are decoded as follows 65 PCAN Router Pro PPCAN Editor Tutorial System O Symbol f Multiplexer DLC Data Timeouts Period Count i ih 4 OA O2 12 40 100 0 7037 RtcDate lt Empty gt 4 year 10 month 2 y dayofmonth 18 T dayofweek 4 O pinki 4 1F 12 1A OA 0 100 0 7037 g RtcTime lt Empty gt 4 fractseconds 31 zeconds z18 minutes 26 hours 10 4 18 Exercise 6b Setting date and time Hardware Diagnostics Information For adjusting the RealTimeClock all elements for date and time are supplied in separate values there is no packed structure like when reading time and date see exercise 6a Definition 3 separate messages are to be implemented for date time and the activation command Each firmware variables therein is 8 bit wide CAN Objects General Config0 1 0 Object Direction 1 0 Function 170 No Scale Offset Enable Et Bus 0 E 9 RteSetTime 120h X sec Receive 70h Special Qut RTC set sec 1 v 3 min Receive 70h Special Out RTC
48. o PPCAN Editor Tutorial m System y Activity These values are now entered as a characteristic curve To do so open the configuration window in the navigator left edge of the main window double click ConfigO then change to tab Characteristic curve open the context menu there right click and choose menu item Add Record Reaction A new table row appears representing a characteristic curve This curve must be filled with the mentioned values H Configo Configuration Target module Name Config0 Module type PCAN Router Pro 19 Version 0 0 Enable v Module no o Remark Aufgabe4b Configuration no o Message gateway Default values for data objects Function blocks Event based messaging Time events Characteristic curve CurvelD Point Co xf0 y 0 fl yl x2 yi2 x3 y 3 x4 yi4 x yi x6 yi6 x7 yUl 1 Curve ID 13 a number chosen at random 2 Point Count 6 number of X Y points on the curve 3 Pairs of values 0 5 The Characteristic curve values taken from the table above Further entries are not used and contain O O o Important Note X value must be entered in strictly ascending order 47 PCAN Router Pro PPCAN Editor Tutorial m System Information Finally you must manage the assignment of the incoming raw value to the characteristic curve s X axis and also of the resulting Y value result to variable 1 which is subsequentially transmitted ont
49. o CAN For this a special function block Characteristic curve is needed which handles that conversion Activity For creating a new function block focus on tab Function blocks open context menu right click and choose menu item Add Record Reaction A new line appears representing a function block This line must be supplied with values Information Basically each function block has two inputs operands and one output result each of the three consisting of an I O type and a I O number Additional there is a main switch enable and a cycle time With what frequency is this block re calculated in ms Remark In the function block Characteristic Curve the second input is always unused Activity The function block is supplied as follows H Configd Configuration Target module Name Config Module type PCAN Router Pro 19 Version 0 0 Enable V Module no 0 Remark Configuration no 0 Message gateway Default values for data objects Function blocks Event based messaging Time events Characteristic curve Function Code Ena Inputl I O Functi I Input2I O Fu Inp Output I O Funct O Paramet Cycle Tim Informe d Characteristic Cur FFh 32bit Variable 0 FOh Special In none FFh 32bit Variable 1 PE MA 1 Function Code Characteristic curve a special function block for this purpose 2 Enable Yes this function block shall be active 48 PCAN Router Pro PPCAN Edit
50. o P s w P Parameter Compare whether In1 is greater equal 127 If YES then execute next line switch on LED If NO then skip 1 line Following dialog window appears Parameter The type of Math function block may chosen from a list click slowly the Value field twice for opening the list 20 PCAN 10 Line 2 gt OO IU ie PY 10 Line 3 es Se Xr eS I9 Router Pro PPCAN Editor Tutorial System Parameters below must be entered directly Confirm with Close Cycle This Function block is processed every 25 ms Function block Identity copy 1 1 Enable Yes Input 1 l O Function constant Input 1 l O Number value is 1 Input 2 l O Function unused do not change Input 2 l O Number unused do not change Output l O Function is written to the following hardware resource Output I O Number LED CAN 1a Parameter none Cycle this Function block is processed every 25 ms Function block Math Function ELSE respectively an IF with reversed condition Enable Yes Input 1 l O Function 32 bit variable Input 1 l O Number 0 Input 2 l O Function constant Input 2 l O Number value is 127 Output l O Function unused do not change Output I O Number unused do not change 56 PCAN 10 Line 4 pu que XUL uem Da e 8 9 10 Router Pro PPCAN Editor Tutorial System Parameter Compare whether In1 is less than 127 If YES then e
51. or Tutorial m System 3 Input1 FF 32 bit variable 0 X value comes from 32 bit variable 0 4 Input2 FO Special In none unused Output FF 32 bit variable 1 Y result is written to 32 bit variable 1 6 Parameter 13 number of the already defined characteristic curve When clicking the field the following dialog window appears Parameter Value Close 7 Enter the number of the already defined characteristic curve in column Value Confirm with Close 8 Cycle time 100 conversion of the raw value takes place every 100 ms Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 4b to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Result A continuously rising input value from message 0x100 is superimposed with a plateau and then forwarded to message 0x200 49 PCAN Router Pro PPCAN Editor Tutorial System Information With the help of a PCAN Explorer Part No IPES 005028 with an Instrument Panel Add in Part No IPES 005028 the values can be represented graphically A C ATutori all 5 xm a 100 i 110 20 40 130 Temp with Plateau r an 90 100 110 l Le oe l kalaki l Plot l l I l Li II 106 1g ng Li og gg I I r an an 100 110 Real Temperatur 4 12 Exercise 5a LED activity on CAN reception and tr
52. ormation Only ID 0x100 shall be routed from CAN 1 to CAN 4 Activity Open the configuration created in exercise 1a and save as exercise 1b In the navigator left edge of the main window double click ConfigO The dialog box configuration is shown change to the tab Default values for data objects Activity Modify the existing entry from exercise 1a as shown El Configd Jm Configuration Target module Name Config Module type PCAN Router Pro 19 Version 0 0 Enable Vv Module no 0 Remark Aufgabe 1b Configuration no o Message gateway Default values for data objects Function blocks Event based messaging Time events VO Function I O No Default Val Information X 70h Special Out Routing 1 to 4 explicit 256 route only 11bit ID 0x100 ignore rest 1 1 O Function SpecialOut remains unchanged 2 l O No Routing 1 to 4 explicit 3 Default Value enter here the 11 bit ID to be routed 0 2047dez 4 Information Description of what this line does helpful in later sessions Remark Routing function explicit only support 11 bit IDs Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 1b to your PC 19 PCAN Router Pro PPCAN Editor Tutorial m System Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus As explained in the first exercise see previous
53. rm clock feature of the internal real time clock RTC Remark Setting the current time of the real time clock RTC was explained in exercise 6b Assuming the current time to be Thursday 18 February 2010 12 29 30 o clock then a suitable alarm time could be Thursday 18 February 2010 12 30 00 o clock for example Activity Open the configuration created in exercise 6b and save as exercise 7c Add another receive message ID 0x150 for setting the alarm time length 4 Bytes Add another receive message ID 0x100 for bringing the PCAN Router Pro into sleep mode see exercise 7a i CAN Objects General Config 1 0 Object Direction 0 Function 1 0 Mo Scale Offset Enable f Bus_0 i SleepSwitch 100k T R Special Out Selfhald 4 9 HteSetTime 120M Xi AtcSetD ate 130h E Rtellpdate 14h AtcSetAlarm 150Hh 2 SetAlarm Heceive h Special Out ATC Set Alarm 1 v Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 7c to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN 73 PCAN Router Pro PPCAN Editor Tutorial m System Information After setting the alarm time 12 30 00 o clock PCAN Router Pro must be set to Sleep Mode first by setting Selfhold 0 send message 0x100 for this Result As soon as the messag
54. stem CAN Objects General Config 1 0 Object Direction Enable Period Timeout Event Time iit Bus H E Symboli 10h Hecerve v Ec sumbolz 200h Transmit 1 Direction 0x100 is received 0x200 is transmitted by the PCAN Router Pro 2 Enable Yes 3 Period 100 transmission cycle time in ms CAN Objects General Config 1 0 Object Direction 170 Function I0 No Scale Dffset Enable 23 Bus 0 t Symbol 100h xaJ Original Receive FFh 32bit Variable 0 1 0 v t Symbol 200h Winvertiet 0000 Transmit FFh 32bit Variable 0 1 255 Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 4a to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Result The values contained in the receive message 0x100 data byte 0 are transmitted as y 1 x 255 resp y 255 x in message 0x200 A rising ramp increasing x values is converted into a falling ramp decreasing y values 43 PCAN Router Pro PPCAN Editor Tutorial m System 4 11 Exercise 4b Manipulating CAN signals using Function block characteristic curve Definition The temperature of a motor s cooling fluid shall be represented as constantly 90 C even if the real coolant temperature varies between 80 C and 105 C Such plateau is often implemented for smoothing of analog m
55. te 500 kbit s CAN bitrate 1 Mbit s 1 l O Number enter the desired bit rate here 2 Default Value CAN channel number 0 3 Remark As PPCAN Editor running on your PC doesn t know about the transceiver types installed in your PCAN module it will offer all usual bit rates Please take care that the equipped transceivers support the settings E g TH 8056 does not support bit rates beyond 83 3 kbit s whereas TJA 1040 does not support bit rates below 40 kbit s 7 PCAN Router Pro PPCAN Editor Tutorial m System Appendix A Literature and References PCAN Router Pro hardware manual PPCAN Editor integrated help system Reference of Function blocks PCAN View integrated help system PCAN Explorer integrated help system PPCAN protocol reference 76
56. there are 2 bits unused and 1 bit decides whether the pattern is played endlessly 1 continuous or only once O one shot Playback speed is 100 ms per bit Example Programming of a continuous tone 10000000 00000000 00000000 00100001 mmmmmmmm mmmmmmmm mmmmmmmm 1 100ms tone UU unused O OneShot 1 endless repeat Ww 11111 Pattern length 1 bit Duration 24 100 ms 2 4 s Pattern 0x80 0x00 0x00 0x21 Activity Send this pattern to the PCAN Router Pro using a PCAN View or PCAN Explorer 0x100 8 21 00 00 80 00 00 00 00 0 For switching it off send a pattern with all bits set to 0 0x 100 8 00 00 00 00 00 00 00 00 0 61 PCAN Router Pro PPCAN Editor Tutorial m System 4 16 Exercise 5e Controlling the Beeper tone sequence Information Based on the configuration from exercise 5d different tone pattern may be generated Example Programming the SMS Morse code 10000000 00000000 00000000 00100001 mmmmmm S 6 bit used mm mmmmmm M 8 bit used mm mmmm S 6 bit used mmmm Pause 4 100 ms 4 bit used uu unused O OneShot 1 endless repeat Ww 11111 Pattern length 24 bit Duration 24 100 ms 2 4 s Pattern OxAB 0x32 0xA0 Ox1F Activity Send this pattern to the PCAN Router Pro using a PCAN View or PCAN Explorer 0x100 8 TF AO 32 AB 00 00 00 00 0 For switching it off send a pattern with all bits set to 0 0x 100 8 00 00 00 00 00 00 00 00 0
57. unt Q 12345678h B F5 A5 55 05 50 1201 gt Q o Q a D Message DLC Data Cycle Time Count Trigger E 321h 4 F5 A5 55 05 J 250 94 Time uU S il j Receive Transmit Trace amp amp PCAN USB Hub Message DLC Data Cycle Time Count q 5FFh 4 F5 A5 55 05 50 2494 D Message DLC Data Cycle Time Count Trigger Information Receive message 0x321 included a 32 bit value 0x0555A5F5 which is assigned to RAM variable 0 within the PCAN Router Pro When transmitting message 0x12345678 and 35 PCAN Router Pro PPCAN Editor Tutorial m System Ox5FF the content of this variable 0 is read back and stored into the transmit message It may be stored on any position within the messages and may previously be scaled or modified by mathematical means 4 8 Exercise 3c Variation 3b Transmission only if source message was received Information Another feature is sending CAN messages e g only if message 0x321 was really received or its content has changed As a variation of the previous exercise the messages Ox5FF and 0x12345678 are transmitted only if a source message 0x321 was received Activity First in the window CAN Objects tab ConfigO I O set period values to 0 thus switching off cyclic transmission CAN Objects General ConfigQ 0 Object Direction Enable Pernod Timeout Event Time St RouterCAN 1 t Oldini 3421h Receive Fi 0 9 Mewtutl 12345578h Transmit Fj 0
58. xTraffic Indicator CAN z F h Special In 0 00h DOut Level LED CAN 2a 100 Identity FOh Special In TxTraffic Indicator CAN Z FOh Special In 0 00h DOut Level LED CAN 2 b 100 Identity FOh Special In RxTraffic Indicator CAN 3 F0h Special In 0 00h DOut Level LED CAN 3 a 100 Identity FOh Special In TxTraffic Indicator CAN 3 FOh Special In 0 00h DOut Level LED CAN 3 b 100 Identity v FOh Special In RxTraffic Indicator CAN 4 F0h Special In 0 00h DOut Level LED CAN 4 a 100 Identity v FOh Special In TxTraffic Indicator CAN 4 FOh Special In 0 00h DOut Level LED CAN 4 b 100 1 Function Code Identity a variable s content is copied into another Enable Yes this function block shall be active a Input 1 System variable Special In Trafficlndicator active for 100 ms Input 2 FO Special In and none unused Output Dout Level and the appropriate LED number Parameter not necessa ry gt Or Ss e Cycle time 100 refresh of LED status every 100 ms it is not the lucent period Remark The LEDs lucent period of 100 ms is hardcoded witin the firmware and can t be changed The identity Function blocks cycle time therefore cannot be used to affect the LED behavior Activity Last thing to do is the declaration of routing all the messages incoming at CAN 1 to CAN 4 and vice versa The appropriate settings are done in tab Default values for data objects 51 PCAN Router Pro PPCAN Ed
59. xecute the next line switch off LED If NOT then skip 1 line Cycle this Function block is processed every 25 ms Function block Identity copy 1 1 Enable Yes Input 1 l O Function constant Input 1 l O Number value is 0 Input 2 l O Function unused do not change Input 2 l O Number unused do not change Output l O Function is written to the following hardware resource Output I O Number LED CAN 1a Parameter none Cycle this Function block is processed every 25 ms Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 5b to your PC Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Result Receiving values up to 0x7F will switch off the LED 1a values of 0x80 and beyond will switch it on 57 PCAN Router Pro PPCAN Editor Tutorial m System 4 14 Exercise 5c Controlling LED externally Information For remote switching of a LED it is sufficient to receive a 1 bit signal from CAN This signal is then assigned to the internal resource Dout Level gt LED CAN 1a Activity Create an empty configuration file using menu item File gt New Define a reception message mSwitch 0x111 carrying a 1 bit CAN signal cil CAN Objects ak CAN Objects General Config 1 0 Object Unit Bit Length Byte Position Bit Position Signed Byte Order Multiplexer T
60. ype 23 Bus 0 t mSwitch 111h Ma LedSwitchla L 0 0 B intel None Activity Create a new configuration within the file import the globally defined CAN message and enter the parameters ai CAN Objects 9 CAN Objects General Config 1 0 Object Direction 1 0 Function 1 0 No Scale Offset Enable f Bus 0 t mSwitch 111h eu EEL LED CAN 1 a 1 Direction Receive since switch value comes in from CAN 2 l O Function DOut Level internal hardware resource 3 l O Number LED CAN 1a Information At this point all the configuration work for solving the exercise is done Activity Save the configuration file as project exercise 5c to your PC 58 PCAN Router Pro PPCAN Editor Tutorial m System Activity Transmit upload the configuration to the PCAN Router Pro via CAN bus Result Via transmitting the corresponding bit the LED can be switched on or off i D Jj Tip When expanding the example to 8 LEDs and you own a PCAN Explorer Part No IPES 005028 a symbol file can be created see the appropriate manual containing each switch value in symbolic form Remark With the help of a PCAN Explorer Part No IPES 005028 and the Instruments Panel Add in Part No IPES 005028 a graphical interface for the visualization of the switch can easily be created 59 PCAN Router Pro PPCAN Editor Tutorial m System c CA NAufgabe5r ipf rc m Transmit
Download Pdf Manuals
Related Search
Related Contents
Aqua Master 2016 Washing Machine LavadoraAutomatica Copyright © All rights reserved.
Failed to retrieve file