Home

CAN Create User`s Manual

image

Contents

1. Save Database Publish compile the design and formats the graphics into the structure that the display can read script file is created Route compiles the design physical Route Results gives warnings and errors after compiles Save Database Archives the component library Debug only 11 2 6 File Toolbar Tools Under the Tools menu options include Connect Window Draw Wire Draw Dot Draw Part Draw Label Open Image Library Options Select Used to click drag and edit parts within the workspace Draw Wire Left click to start drawing a wire left click to end wire and left double click will terminate wire and open wire properties Also can right click to stop creating wire without going into properties Draw Dot Place an intersection dot on crossing wires when dot doesn t automatically appear Draw Part Place a building component part into the workspace Contains categories Constants Display Flops Gates Math and Timers Draw Label One click wire properties instead of double clicking Open Image Library Shows a list of images loaded unloaded in CANlogic user folder and subfolders 12 2 6 File Toolbar Tools Cont Options Show All End Points Displays all end points of wires not just intersection points Show All Labels Displays the default labels of all wires used Show Part References Displays on all parts the reference code name Show Route Order Labels parts with
2. Draw Y to 182 and Folder to User Manual Next set Image to Page Right Make sure Page is set to 0 and transparent is check Click OK 14 Connect a TRUE constant to both newly created BITMAPs 15 These BITMAPs need touch areas Go to ee Parts gt Display and select TOUCH Set Draw X to 0 Draw Y to 182 Width to 100 and Height to 60 Keep Draw Page 0 so that this touch area will appear on all the pages made Click OK 16 Insert asecond TOUCH and go to the part properties Set Draw X to 224 Draw Y to 182 Width to 100 and Height to 60 Keep Pen Draw Page 0 Click OK 17 To select between pages an ENCODE part is used Navigate to Parts gt Math and select ENCODE Place it near the two newly created TOUCH parts Using the wire tool connect the TOUCH at region 0 182 to node 1 on the ENCODE Next connect TOUCH at region 224 182 to node 2 on the ENCODE 18 Finally navigate to Parts gt Display and select PAGE Uses positive non zero input to select the appropriate page to draw to the display Insert PAGE near the output node of the ENCODE part Change to wire and connect the ENCODE output node to the PAGE input 29 TOUCH 224 182 100 60 Page TOUCH 49 1 2 43 45 i 7 a 3 19 Put a background on page 2 by inserting Parts gt Display BACKGROUND Under part properties change Draw Page to 2 Change folder to User Manual and Image to bluebg Click OK 3 5 Using Text 20 To add text to
3. Set1 6 Image numeral6 Set1 7 Image numeral7 Set1 8 Image numeral8 70 10 Label Set1 9 Image numeral9 18 Another set of numbers will be needed so insert 10 more BITMAPs Use Draw X 125 and Draw Y 64 for all Repeat step 17 except use the naming convention Set2 0 Set2 1 and so on to Set2 9 19 Insert aGREATEREQUAL a NOT and 2 BITMAPs Label the GREATEREQUAL top to bottom as Set Val and 100 Const Branch two wires from the GREATEREQUAL output connecting to one of the BITMAPs and the to the NOT The output of the NOT should attach to the second BITMAP For the BITMAP without the NOT before it set Draw X to 100 and Draw Y to 64 Set Folder to User Manual and Image to numeral1 Click OK On the second BITMAP set Draw X to 100 and Draw Y to 64 Change Folder to User Manual and Image to Blank24 Click OK 20 To change the Mode on the Thermostat aCOUNTER and a DECODE is needed Insert those and label the COUNTER Inc as Mode Count Load as First and Value as Zero Under COUNTER properties change the Range to 2 and leave Disable Overflow unchecked Click OK Wire the COUNTER to the DECODE labeling the wire as Mode For the DECODE label the wires top to bottom as Mode Off Mode Cool and Mode Heat Use nodes 0 1 and 2 100 152 21 Place 3 BITMAPs into the workspace Label them as Mode
4. to true then to false 9 3 Result THERMOSTA reme 19 ser 99 F COWEN RAISE MODE HEAT FAN HIGH BET 1 3 arr1i 1 arr1 2 SETI SET SET BETI arr1 7 arr1 8 SET1 9 COIAHewWNHHO COIDAMeWNHO BITMAP 100 152 COOL BITMAP 100 152 HEAT 18EFFF3B IFFFFFFF CONSTANT 255 ENABLE CONSTANT TX TEMP DATA Tx LSEFFF3 OID Bwhr RAI SE LOWER EXT MODE EXT FAN HW FAN ONE ONE RAISE LOWER HW RAISE HW LOWER NE TWO 0 MODE TCH MODE COUNT HW MODE LOWER TCH HW LOWER RAISE TCH RAISE HW RAISE FAN TCH LOWER FAN COUNT HW FAN THERMOSTAT remp 199 F sex 99 F COWER ae Ve MODE HEAT FAN HIGH TEMP VAL AFT VAL DISPLAY Page 1 100 170 rege BITMAP 100 170 BITMAP 100 170 MEDIUM BITMAP 100 170 PAN HIGH Rx RAT SE LOWER EXT MODE EXT FAN OnuIHnnPwrNre FAN OFF FAN LOW LED FAN Cc MODE OFF MODE COOL MODE HEAT FALS FALSE FALSE FALSE FALSE LED MODE es 3 F SAU SWNRrO SAU SWNrO Byte Byte TX TEMP DATA a D z u FIRST LOAD TEMP UPDATE TEMP 13EFFF4B Rx LIFFFFFFF Tx 18EFFF4C OuIHnin PwrMre OID PwnNre 95 203 BITMAP 95 203 UPDATE TEMP DEFAULT CNT Chapter 10 simulating with Hardware 10 1 Using the Message window 1 Locate the CANcreate file chap_9 ccs or use your own created file from chapter 9 Located under Manual Tutorials 2 Go to Connect and S
5. 58 or Below With Library Windows 7 run the CANcreate software If it is not in open find the original extracted folder ex EI User No User Name Deskop CANcreate if on desktop Open the ka mS folder and double click the CANcreate application run file The software should open up Next go to tools and click Open Image Library Find the Open Folder button and click it Can also use the Open Application Folder button under Help gt About The folder that opens up is the application folder You can choose to leave the folder in this location or copy all the contents into a newly created folder somewhere more Open Folder di Content di Library m User CANcreate cdf ms CANcreate _ CANcreate exe cdf ms p referable CANcreate exe manifest _ CANcreate manifest S PCAN_USB dIl 11 2 Preventing Accidental Touch Problem You and or the daily users of a created program are consistently hitting touchable areas on the device unintentionally im 1000ms Solution Open up the CANcreate file and ie oe locate the TOUCH parts that are giving trouble Add a DELAYON right after the TOUCH part and before whatever function it is executing Set the DELAYON timer to 100ms or higher ex 1000ms is a 1 second hold This will then require the touch zone to be held for the specified period of time before going TRUE 04 11 3 Touch Parts Not Working Proble
6. 9 DISPLAY Page 1 a 4 Return to the Select Part window and under the Display section select BACKGROUND Place background into the workspace 26 5 Exit the Select Part window and go to tools gt Select to return to the pointer 6 Double click the background part and the BACKGROUND Properties window will appear Change the Draw Page value to 1 If set to 0 the Background would show up on all pages Under Folder select User Manual and then blackbg under the image section Click OK Observe in the Display a black background should now be shown instead of the red X 7 Open up the Draw Part window and navigate to the Constants section Select TRUE and place it in the workspace near BACKGROUND Switch to Draw Wire Tools gt Draw Wire Click the red output node of TRUE and then click the red input node of BACKGROUND Result Following steps 1 to 7 is seen below 3 2 Using Bitmaps DISPLAY Page 1 8 Go to Tools gt Draw Part gt Display select BITMAP Place a BITMAP part into the workspace Change to select tool and double click BITMAP Set DrawX to 90 and DrawY to 125 Next set Draw Page to 1 and locate User Manual under the Folder drop down menu In image find click_btn Click OK The button image now is shown in the BITMAP part and on the Display Note The BITMAP location can also be edited by clicking and dragging the image on the Display Arrow keys can also be used to fine adjus
7. Click OK Attach a wire to its output and label it DEC 11 Run the simulator press Up to increase the bars and down to decrease the bars 41 5 2 Extension More Labeling 12 Now repeat steps 4 to 11 with the back light controls Skip step 6 Refer to the following steps to get new names and locations 13 For the 5 BITMAPS use Image back_line and these locations 1 Draw X 186 Draw Y 140 2 Draw X 186 Draw Y 125 3 Draw X 186 Draw Y 110 4 Draw X 186 Draw Y 95 5 Draw X 186 Draw Y 80 14 Label them using labels B_0 B_1 B 2 B_ 3 and B 4 15 For the counter use labels B_INC for Inc B_ Dec for Dec B_ Reset for Reset B_ Load for Load and continue to use FOUR for Value The output label should be NUMBER_BACK 16 Recreate the GREATEREQUAL functions except replace NUMBER with NUMBER_BACK and the output from F_0 to B_0 and so on 17 For the LESS and GREATER parts just replace NUMBER with NUMBER_BACK Make the GREATER output B_ Load and the LESS output B_ Reset 18 Set the up button to Draw X 247 and Draw Y 61 Next set the down button to Draw X 247 and Draw Y 136 19 Finally for the two TOUCH parts set one to Draw X 243 Draw Y 61 Width 50 and Height 50 Then set the output to B_Inc For the second TOUCH part set Draw X 243 Draw Y 136 Width 50 and Height 50 20 Test in simulat
8. Ei View EULA for printing 5 Setup will now download Microsoft XNA Framework and install it This can take a few minutes Do you accept the terms of the pending License Agreement If you choose Dont Accept install will close To install you must accept this agreemert je dns Open File Security Warning 6 After setup is done installing it is possible a Publisher cannot be verified window will The publisher could not be verified Are you sure you want to i 2 a run this software appear click install anyway to continue Name setup exe Publisher Unknown Publisher Type Application From C Documents and Settings mbushiDesktop CANcr 7 The installation is now complete the CANcreate interface window should open on your screen E nahe If not use CANcreate execution file in the This file does not have a valid digital signature that verifies its publisher ou should only run software from publishers you trust extract folder to run Run Cancel How can decide what software to run 8 To locate the installed folder follow the instructions under the Set Up Image Library section 1 2 Set Up Image Library Windows XP Windows 7 With Windows 7 run the CANcreate software If it is not open find the original extracted folder ex User Name Desktop CANcreate if on desktop Open the folder and double click the CANcreate application run file The software should open up Next
9. Page4 Page Five buffer label control PR Page5 Page Ctrl For the first BUFFER set the control wire to Page2 Home and the input to Page One For the second BUFFER set the control wire to Page2 Prev and the input to Page Five For the final BUFFER set the control wire to Page2 Nxt and the input to Page Three 17 For Page 3 set the output of the 3 BUFFERs to Page Ctrl For the first BUFFER set the control wire to Page3 Home and the input to Page One For the second BUFFER set the control wire to Page3 Prev and the input to Page Two For the final BUFFER set the control wire to Page3 Nxt and the input to Page Four 18 For Page 4 set the output of the 3 BUFFERs to Page Ctrl For the first BUFFER set the control wire to Page4 Home and the input to Page One For the second BUFFER set the control wire to Page4 Prev and the input to Page Three For the final BUFFER set the control wire to Page4 Nxt and the input to Page Five 55 19 For Page 5 set the output of the 3 BUFFERs to Page Ctrl For the first BUFFER set the control wire to Page5 Home and the input to Page One For the second BUFFER set the control wire to Page5 Prev and the input to Page Four For the final BUFFER set the control wire to Page5 Nxt and the input to Page Two PAGE2 HOME PAGE2
10. Route Project Co py A a Turn On Off Simulation m Paste d Connect to Device Delete Oo Zoom in Shortcuts New Ctrl N Publish F5 Open Ctrl O Route F6 Save Ctrl S Simulator On F8 18 2 11 Tools Sidebar Select S i 4 Draw Wire W Draw Dot D Draw Part P oe Place Label L 19 2 12 Parts Descriptions Constants Constant Set a constant variable Integer SONSTANT Value Max 32 bit signed False Sets connection to Boolean false True Sets connection to Boolean true Disk Memory Set save and restore value to from memory address on device Display Background Sets a background image on display 320x240 max resolution BACKSROUND Bitmap Sets image on top of background and is moveable over X Y coordinates CANError Use to debug and error check CANRX CAN system receiver 0 LFFFFFFF oO IN Whore F 20 2 12 Parts Descriptions Cont O CANTX CAN system transmitter Tx 1l 2 3 4 5 6 7 8 CA a HJ hA vu Display Shows program output and simulates physical display 320x240 Execute Can run an external file saved on SD card Page Changes display pages based on numerical input Needs positive non zero input to select draw page Text Write text to the display at X Y coordinates Touch Creates area on display that accepts touch
11. a TRUE to the BACKGROUND 3 Next switch to Place Label and click the wire between TRUE and BACKGROUND In the drop down menu type TRUE Click OK This same label can now be applied to other wires elsewhere and then will take on the state of this original labeled wire Lights Note Can also double click on wire while in Select tool 4 Insert 5 BITMAPS with the following X and Y coordinates Each will have the same image from User Manual and Image front_line Draw X 80 Draw Y 140 Draw X 80 Draw Y 125 Draw X 80 Draw Y 110 Draw X 80 Draw Y 95 Draw X 80 Draw Y 80 oe eo i 5 Draw a wire from each BITMAP without attaching any of them to another part Double click the wire from 80 140 BITMAP and under the drop down menu type F_0 For the 80 125 BITMAP double click the wire and label it F_1 For the 80 110 BITMAP label the wire F_2 For the 39 80 95 BITMAP label the wire F_3 Finally for the 80 80 BITMAP label the wire F_4 6 Before creating the counter constants need to be established Insert 5 CONSTANT parts Set each respectively as values O 1 2 3 and 4 Next attach open ended wires to each and label each wire corresponding to the value So ONE for the 1 value TWO for the 2 value and so on 7 Under Part gt Math select a COUNTER and insert it in the workspace Attach open ended wires to all 5 inputs of the COUNTER Label each wire with
12. an EXECUTE part with file Diag bat This will enable the setting of the time and date when the program is run from the device 11 5 Bitmap Rendering Too Slow Problem The Bitmap is rendering onto the device s screen very slowly Solution This can occur from a couple of factors One the bitmap can be too large of an image or two the bitmap has transparent properties For the first factor this can be solved by chopping the bitmap up into smaller bitmaps The smaller images will load faster and speed up image rendering For the second factor the bitmap that under part properties has the box for transparency checked can be changed to load faster Using a bitmap with transparency requires more cycles within the program to draw the image because it needs to duplicate the background in the transparent sections To fix this one can edit the image and replace the transparent sections with the correct background that would be behind it This will soeed up rendering Slow Q Faster 36 11 6 Bitmap won t Disappear Problem The Bitmap is set to true then false but won t disappear from the screen Solution This can occur in some situations mainly in terms of trying to cover up information on the screen and remove bitmaps from view To fix this the simplest solution is overwriting the bitmap with another bitmap So create a bitmap from the background or something that makes sense set it to the same X and Y and set it
13. be able to cycle through images to create a slideshow effect and simulate animation 1 Open up a new CANcreate workspace and assemble the AND DELAYON circuit explained in the blinking tutorial steps 5 to 7 2 Insert a DISPLAY and a BACKGROUND Set the background to bridge 3 Next go to Part gt Math and insert a COUNTER Attach the Inc node on the COUNTER to the wire between the two DELAYONSs 4 Now go to Part gt Math and select a DECODE Insert it next to the COUNTER Under COUNTER properties set range to 3 Attach the output of the COUNTER to the input of the DECODE 5 Insert 4 BITMAPs all at Draw X 150 and Draw Y 60 For each change Folder to User Manual Make sure transparent is checked Set each BITMAPs Image to fire1 fire2 fire3 and Tire4 respectively WOIGAMSWNrO 6 Connect fire1 BITMAP to the node 0 output of the DECODE Connect fire2 to node 1 fire3 to node 2 and fire4 to node 3 7 Run the Simulator and the fire animation should repeat 0 1 2 3 4 5 6 7 8 9 38 Chapter 5 Labels and Inputs 5 1 Labeling At the end of this Labels and Inputs tutorial you will be educated on using wire labeling correctly and efficiently You will also be able to create multiple function touch inputs 1 Open up a new CANcreate workspace and insert a DISPLAY 2 Now insert a BACKGROUND and under User Manual set Image to Lights Wire
14. clock System clock used for PC simulation and RTC real time clock is used when executing on hardware DelayOff Delay on the falling edge DelayOn Delay on the rising edge Timer Outputs a pulse every specified time period Timer is 50 duty cycle half on half off EX 100ms period 50ms on 50ms off TimerCounter Counts up in set range according to set timer 25 Chapter 3 The Basics 3 1 Printing to Display The basics to any form of programming utility starts with a Hello World problem At the end of this Hello World tutorial you will be to print to a display using a background and bitmap parts Also create touchable areas make multiple pages display text and run the software simulator Note Make sure the image library is set up before continuing 1 Start up the CANcreate application and a new blank project workspace will be displayed If it is already open make sure it s a blank project by clicking to File gt New 2 Go to tools gt Draw Part and the parts window will pop up or press P on the keyboard Note Can also right click anywhere on the workspace and select Draw Part 3 Under the drop down menu go to Display From there select DISPLAY There now should be a transparent blue rectangle following your pointer Place the display into the workspace by left clicking the grid field The cursor can be used on the DISPLAY part to display the X Y coordinate in the lower right corner
15. go to tools and click Open Image Library Find the Open Folder button and click it The folder Open Folder that opens up is the application folder Can also go Ji ee to Help gt About and use the Open Application Folder button to locate the Image Folder You can choose to cancreste cdf ms leave the folder in this location or copy all the E CANcreate contents into a newly created folder somewhere L CANcreate exe cdf ms CANcreate exe manifest _ CANcreate man fest PCAN USB dll more preferable Navigate to User folder within your CANcreate folder and copy the Manual folder to this location Any images or folders put into this User folder will be accessible within the CANcreate program When setting BITMAP or BACKGROUND properties the folder can be set to User Manual to access asset images 1 3 Installing Program to Device Publish Design EIER Target Filename CAMyProgram MyProgramScript csc Open Containing Folder Success publishing design shat meee Publish Publish amp Close 1 Once completed with a project go to Publish and Select Publish or press F5 2 A window titled Publish Design will open In the Target Filename use browse to select a folder that will be copied onto the micoSD card And name your program s script Example If new folder is MyProgram and name for script is MyProgramScript Target Filename C MyProgr
16. input at X Y coordinates Value Takes in numerical data and outputs it to the display at X Y coordinates when enabled Flops Pulse Outputs a brief pulse when enabled 21 2 12 Parts Descriptions Cont Gates Math AND 2 3 4 5 AND gate with varying inputs Buffer Tri State buffer with active high control Nand Functions as Nand gate Nor Functions as Nor gate Not Functions as Not OR 2 3 4 5 OR gate with varying inputs Add Adds two integer values top is added to bottom Average Outputs average of inputting values based on power property 2 so O average 1 1 average 2 6 average 64 where the u resultant is the number of samples BitAND AND operation of two integers in bit form Used for bit masking to determine whether a bit is set or cleared EX 0010 and 0010 becomes 0010 BitOR OR operation of two intergers in bit form Used for Bit form Used for bit masking to determine whether a bit is set or cleared EX 0101 or 0011 becomes 0111 22 2 12 Parts Descriptions Cont Counter Increment Decrement value with reset and load functionality The range property can be used to prevent overflow and maintain a certain set of numbers Decode 1 to 10 decoder that selects based on integer input Fa a En Da U La a IA Decrement Decreases integer value Divide Divides two integer values top is divided by the bottom Encode 10 to 1 encoder
17. numbers representing order of execution Show Input Pins Highlights the input pins of all parts Auto Save Set auto save on or off Set how often to save Max Undo Set the maximum number of times for undo ing actions 13 2 7 File Toolbar Simulator Under the Simulator menu options include Simulator Connect window Help 4 Simulator On Pause Simulator Step Simulator Reset Simulator Simulator Options Simulator On F8 Starts the simulator for current program from last run state When running the icon on the quick access toolbar is highlighted P Simulator On Simulator Off Wire Colors during Simulation Black Contains False value Zm Green Contains True value Blue Contains Integer value Pause Simulator Pauses simulator at current point in time Step Simulator F7 Runs simulator step by step through program Reset Simulator Resets the simulator values to original states Simulator Options Update Period Default is 100ms specifies how quickly the simulator updates while running 14 2 7 File Toolbar Simulator Cont Steps Per Update Default is 1 specifies how many steps are changed in the simulation during each period Note In order to simulate timer resolutions below 100ms the update period and steps per update must be changed from default In general period should be half the lowest timescale and at least 2 updates per period to capture 50 duty c
18. set all the DELAYON timers to 100ms For the output of the DELAYON with the TOUCH 46 38 label the wire DF Page2 For the output of the DELAYON with the TOUCH 228 38 label the wire PF Page3 For the output of the DELAYON with the TOUCH 46 138 label the wire DR Page4 Finally for the output of the DELAYON with the TOUCH 228 138 label the wire PR Page5 8 Next is to create the pages for each tire Insert 4 BACKGROUNDs Set the first to Draw Page 2 and under User Manual Image to tire1 Set the second to Draw Page 3 and under User Manual Image to tire2 Set the third to Draw Page 4 and under User Manual Image to tire3 Set the first to Draw Page 5 and under User Manual Image to tire6 Set each to TRUE 9 There are 3 buttons on each of those pages so 12 BITMAPS need to be inserted For page 2 set one BITMAP to Draw X 160 Draw Y 100 Draw Page 2 and under User Manual Image to home Click OK For the second BITMAP set Draw X 81 Draw Y 104 Draw Page 2 and under User Manual Image to prev For the third BITMAP set Draw X 224 Draw Y 104 Draw Page 2 and under User Manual Image to next 10 Repeat step 9 using the same locations and images except change the Draw Page Repeat for pages 3 4 and 5 Set all the BITMAPS to TRUE 53 11 Those buttons need TOUCH parts so insert 12 TOUCH parts with 12 DELAYONSs Set each DELAYON to 100ms and attach it to the
19. to TRUE Cover with 11 7 why Bitmaps are Renamed Problem When looking in the folder of a published program the images are all renamed to shorter names Solution This happens because this is part of the publishing process The script requires the image names to be 8 characters or less It is best to get accustomed to naming all images beforehand in this form O7 11 8 Bitmap Image Support Problem Bitmap image is not showing up when running on device Solution The only supported image format is PNG images Other image types aren t accepted and won t be displayed to the screen correctly 11 9 Tutorial Images not Displayed Problem Background and Bitmap images don t show up when a premade tutorial is opened All are replaced with red X images Solution Make sure that the Manual Images folder is in the User folder where the CANcreate software runs from Once folder is copied over the images should appear in the tutorial correctly 11 10 New Library Images not Listed Problem After putting new images into the User folder they don t appear in the Image Library when placing a Background or Bitmap Image Library Name Battery Bridge BridgeSm City Color Engine Home House Hydraul Sunset Switches SwO ff SwOffT SwOn SwOnT SysMon Tanks Manualamb blue Manual amb red Manual back_line hd ar rol hI ark ha 4 Folder Library Library Library Library Library Library Li
20. two TOUCH parts into the workspace Label the output of one to Mode TCH and the output of the other to Fan TCH Under properties for the Mode TCH TOUCH part set Draw X to 239 Draw Y to 36 Width to 65 6 64 and Height to 64 Click OK For the second TOUCH part set Draw X to 239 Draw Y to 107 Width to 64 and Height to 64 Click OK 1239 107 64 64 Page 0 130 90 64 64 Page 0 Insert 2 more TOUCH parts Label the output of one to Raise TCH and output of the other Lower TCH On the TOUCH with output Raise TCH set Draw X to 50 Draw Y to 90 Width to 64 and Height to 64 Click OK On the second TOUCH part set Draw X to 130 Draw Y to 90 Width to 64 and Height to 64 Click OK Now an increase temperature circuit must be made Insert an AND2 two DELAYONSs a PULSE a NOT and an OR2 part Label the two inputs on the AND2 Raise and Raise FB Connect the output of the AND2 to one of the DELAYON parts Change the DELAYON properties to a 50ms timer Branch two wires from the output of the DELAYON to the input of the OR2 and the second DELAYON part Change the timer on the second DELAYON to 50ms too Wire the output of the DELAYON to the NOT gate and label its output Raise FB Locate the PULSE part and label its input as Raise TCH Next wire the output of the PULSE to the other input on the OR2 gate Finally label the output of the OR2 as Add Temp Repeat s
21. will be needed so insert 10 more BITMAPs Use Draw X 125 and Draw Y 36 for all Repeat step 10 except use the naming convention Temp2 0 Temp2 1 and so on to Temp2 9 12 Now insert a COUNTER Under COUNTER properties change the Range to 200 and leave Disable Overflow unchecked Click OK Label Load as Load Temp and Value as Default CNT Insert a MODULUS part and connect it to the output of the COUNTER Label that wire as Temp Val Label the bottom input of the MODULUS as Ten Const Place a DECODE part next to the MODULUS and wire them together Label the DECODE outputs as MU starting from the top Temp1 0 Temp1 1 and so on until Temp1 9 68 LE OD 1 0 U ee La eS 13 Next insert a DIVIDE a MODULUS and a DECODE Label the DIVIDE inputs top to bottom as Temp Val and Ten Const Connect the output to the top input of the MODULUS For the bottom input label it as Ten Const Wire the MODULUS output to the DECODE Label the DECODE outputs as starting from the top Temp2 0 Temp2 1 and so on until Temp2 9 Os g es Cal oO eA 14 Insert a GREATEREQUAL a NOT and 2 BITMAPs Label the GREATEREQUAL top to bottom as Temp Val and 100 Const Branch two wires from the GREATEREQUAL output connecting to one of the BITMAPs and the to the NOT The output of the NOT should attach to the second BITMAP For the BITMAP without the N
22. CAN Receiver 8 1 Using CANRX At the end of this CAN Receiver tutorial you will be able to use the CANRX part to take in information and process it within the program Also learn about how to simulate input values within the software simulator and use the execute part to call other program scripts 1 Open up a new CANcreate workspace and insert a DISPLAY 2 Insert a TRUE constant and label the wire true 3 Add in a BACKGROUND part and set the folder to TRELAR User Manual and Image to temp_sensor Click OK Set to true 4 Now add in 6 BITMAP parts For five of them set the folder to User Manual and Image to temp_ block Use the following Draw X and Draw Y instructions for each BITMAP 1 BITMAP 1 Draw X 214 Draw Y 131 Wire Label Temp 1 2 BITMAP 2 Draw X 214 Draw Y 109 Wire Label Temp 2 3 BITMAP 3 Draw X 214 Draw Y 87 Wire Label Temp 3 4 BITMAP 4 Draw X 214 Draw Y 65 Wire Label Temp 4 5 BITMAP 5 Draw X 214 Draw Y 52 Wire Label Temp 5 214 65 BITMAP 214 52 BITHAP 214 23 BITHAP 58 5 Forthe sixth one set the folder to User Manual and Image to temp_block_top Set Draw X to 214 and Draw Y to 23 Label the wire Temp Max Click OK 6 Under Part gt Display select CANRX Insert it into the workspace Under part 18FEF44B Rx 1FFFFFFF properties change the CANID to 18FEF44B and CAN Mask to IFFFFFFF This will ch
23. Find the wire after the SUBTRACT that is labeled Temp Calc Double click the wire There is a box titled Simulation Value The default value is O but change it to 160 Click OK This enables the simulation to test certain values coming from the CANRX potentially when physically running The 160 representing a degree value in Fahrenheit Note This only works if the program has not been routed If routed the values on the CANRX are the ones needed to be edited to see changes in the simulation TEMP CALC Simulation Value 160 16 Run the simulator The value 160 should be displayed on the screen with the thermometer at max and Danger blinking on the screen Other values can be tested by changing the simulation value Look at the results of changing the value to 12 45 67 82 and 123 8 3 Result VALUE l I H u MAX I a N I I r oO oO h E ip u u a me co TEM co TEM co TEMP CALC co TEM co 2 eens co N 91 8 4 Extension Execution Uses The execution part can be used not only to run the set clock and calendar functions but to run other program scripts A good use of this is the need to have multiple language support Using the previously completed Temperature Sensor complete these steps to make a Spanish compatible version 1 Open the Temperature Sensor project and resave it with _ En Ex The
24. OT before it set Draw X to 100 and Draw Y to 36 Set Folder to User Manual and Image to numeral1 Click OK On the second BITMAP set Draw X to 100 and Draw Y to 36 Change Folder to User Manual and Image to Blank24 Click OK 69 15 The set section needs similar circuits as well Insert aMODULUS and DECODE part Label the MODULUS inputs top to bottom as Set Val and Ten Const Connect the output to the DECODE part Label the DECODE outputs as starting from the top Set1 0 Set1 1 and so on until Set1 9 16 Next insert a DIVIDE aMODULUS and a DECODE Label the DIVIDE inputs top to bottom as Set Val and Ten Const Connect the output to the top input of the MODULUS For the bottom input label it as Ten Const Wire the MODULUS output to the DECODE Label the DECODE outputs as starting from the top Set2 0 Set2 1 and so on until Set2 9 17 To use your own font for the set numbers each number must be imported as a BITMAP too Insert 10 BITMAPS Each one will have Draw X 150 and Draw Y 64 Use the following Images and labels for each Folder is User Manual L 2 Label Label Label Label Label Label Label Label Label Set1 0 Image numeralO Set1 1 Image numeral1 Set1 2 Image numeral2 Set1 3 Image numeral3 Set1 4 Image numeral4 Set1 5 Image numeral5
25. Off Mode Cool and Mode Heat For Mode Off set Draw X to 100 Draw Y to 152 Folder to User Manual and Image to mode1 100 152 COOL Eu Click OK For Mode Cool set Draw X to 100 Draw Y to 152 Folder to User Manual and Image to mode2 Click OK For Mode Heat set Draw X to 100 Draw Y to 152 Folder to User Manual and 200232 Image to mode3 Click OK E 22 To change the Fan on the Thermostat a COUNTER and a DECODE is needed Insert those and label the COUNTER Inc as Fan Count Load as First and Value as Zero Under COUNTER properties change the Range to 3 and leave Disable Overflow unchecked Click OK Wire the COUNTER to the DECODE labeling the wire as Fan For the DECODE label the wires top to bottom as Fan Off Fan Low Fan Med and Fan High Use nodes O 1 2 and 3 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 23 Insert 4 BITMAPs Label them as Fan Off Fan Low Fan Med and Fan High Set each Draw X to 100 and Draw Y to 170 Change each Folder to User Manual For the Fan Off Image use fan1 For the Fan Low Image use fan2 For the Fan Med Image use fan3 Finally for the Fan High Image use fand FZ 100 170 BITMAP 100 170 BITMAP 100 170 24 To have the thermostat display what action it is performing the following is ne
26. Oo HMI SYSTEMS CAN Create User s Manual Rev 1 1 13 2012 CAN Create User s Manual Index Chapter 1 Installation pg3 1 1 Windows XP Windows 7 1 2 Set up Image Library 1 3 Installing Program to Device 1 4 Necessary Batch Files Chapter 2 Interface pg 7 2 1 CAN Create Workspace 2 2 File Toolbar 2 3 Quick Access Toolbar 2 4 Tools Sidebar 2 5 Part Descriptions Chapter 3 The Basics pg 26 3 1 Printing to Display 3 2 Using Bitmaps 3 3 Using Touch 3 4 Creating Pages 3 5 Using Text 3 6 Using a Counter and Math Parts 3 7 Running the Simulator 3 8 Result Chapter 4 Basic Animation pg35 4 1 Blinking 4 2 Image Slideshow Chapter 5 Labels and Inputs pg39 5 1 Labeling 5 2 Extension More Labeling 5 3 Multi Function Input Short Long Presses 5 4 Result Chapter 6 Calendar and Time pg46 6 1 Calendar Part 6 2 Clock Part 6 3 Result Chapter 7 Advanced Page Navigation 7 1 Multiple Page Setup 7 2 Using Buffers for Pages 7 3 Result Chapter 8 CAN Receiver pg 58 8 1 Using CANRX 8 2 Simulation Values 8 3 Result 8 4 Extension Execution Uses Chapter 9 CAN Transmitter pg65 9 1 Using Personal Font 9 2 Using CANTX 9 3 Result Chapter 10 Simulating with Hardware 10 1 Using the Message Window 10 2 Using a Switch pg 52 pg 80 Chapter 11 Troubleshooting FAQ pg 84 11 1 Locating Installation Location 11 2 Preventing Accidental Touch 11 3 Touch Parts Not Worki
27. Z PREY PAGE2 NXT a oo PAGE a ARE Eee PAGE3 HOME PAGE3 PREY PAGE3 NXT E en He Bora PAGE ao 20 The final step is to make sure when the program starts that the page is set to page one Insert a DELAYON and a PULSE part Attach a TRUE to the input of the DELAYON and attach the output of the DELAYON to the PULSE input The output of the PULSE should be Home Page1 Finally set the timer on the DELAYON to 5ms 21 Run the simulator clicking on each tire to go to its individual page and then using the buttons to navigate between Using buffers creates More ways to navigate pages over just using a counter 56 7 3 Result BACKGROUND za 42 80 PF PAGE3 46 138 42 80 Page 1 228 138 42 80 Page 1 TOUCH HOHE PAGE1 KERN Gee DF PAGEZ KERN HE PF PAGE3 230 140 PAGE THREF PAGE FIYE DR PAGE4 PAGE FOUR PR PAGES HOME PAGE 1 PAGE FIVE 224 104 Next 224 104 DLAFLAY Page 1 enae2 REN Next PAGE PIVE CED PM IHEE CTRL THOR 5 224 104 FREIEN seer ities THUE 234 104 rei ener 4 PReV BGH 7 K Prev Next FREE COCTEL PME THREE CTRL PAGE PIVE B mmar ener kee FREI RR PAGES RT 160 100 44 64 160 100 44 64 Page 4 KOCH KOCH PME 0E CTRL PAGE POUR CTEL PME TWO CTRL 81 104 80 56 Page 4 TOUCH PAGE POOR 224 104 80 56 Page 4 TOCH 160 100 44 646 160 100 44 66 Pege 3 vage 5 TOCH TOCH 81 104 0 5 Page 5 TOCH 224 104 80 56 vage 5 TOCH 37 Chapter 8
28. am MyProgramScript csc 3 Make sure Publish Images box is checked and click Publish When completed the message Success publishing design will be displayed Note Can use Open File to view the contents of the script file or Open Containing Folder to see contents of the folder 4 Next connect your microSD card to the computer and navigate to My Computer Locate the microSD Drive right click and select Format A window will pop up change File System drop down menu to FAT32 Create a volume name such as HMILCD Click Start 5 Copy the entire newly created folder contents onto the microSD card Then two batch files need to be added onto the card Open a text file type in the name of your program script with the csc ending Save the file onto the microSD as autoexec bat Create a second text file type clock then on the line below it type the name of your program script with the csc ending Save this file onto the microSD as diag bat When completed eject the microSD card and it is ready to run on your touch display 1 4 Necessary Batch Files Autoexec bat needed a autoexec Notepad File Edit Format View Help myprogram csc Diag bat optional only used for programs involving time diag Notepad File Edit Format View Help clock myprogram csc Chapter 2 Interface 2 1 CAN Create Workspace Terran n20 0 W File u I a oe x BO ESA x r oie Access To
29. ange depending on the CAN device and what information is needed This is merely an example of what the Hex values would be Click OK 7 Label the RX node RX Message This is where the full Hex code will be taken in Then label the wire from node 1 of the CANRX as Temp Upper and node 2 as Temp _Lower Note Node 1 is the first Byte of the data Node 2 is the second Byte of the data and so on 8 Next create a blinking circuit like in chapter 4 An AND2 two DELAYONs and a NOT gate are needed Attach a TRUE to one of the AND2 inputs and the output of the NOT gate to the second input Wire the output of the AND2 gate to a DELAYON input Connect the output of that DELAYON to the other DELAYON Then connect the output of that DELAYON to the input of the NOT gate Make the first DELAYON 100ms and the second DELAYON 150ms Label the wire between them Blink 59 9 Now insert an AND2 gate and a BITMAP Set the first AND2 input as Temp Max and the second as Blink T Danger Wire the AND2 output to the BITMAP Under the BITMAP properties set the Draw X to 21 and Draw Y to 134 Change the Folder to User Manual and Image to temp _warning Click OK 21 134 10 To decode the Hex input values a logic circuit is needed Insert 3 constants set values as 32 256 and 273 Label their wires Const 32 Const 256 and Const 273 11 Add in a MULTIPLY ADD DIVIDE a
30. blem The program is not behaving correctly or executing logic as it should be Options Show All End Points Show All Labels Show Part References Show Route Order Show Input Pins Auto Save 10 minute s Mas Unda z cans Solution Make sure the design is routed and use the Tools Options then check show Route Order Verify that it has a value that isn t 1 It possible to simulate some designs without routing but in order to execute logic it needs to be routed rated ee a _ Der Ber Per Beer Be Peer Be Pe BEE BEE Be Er Ber Br Ber Ber Ber Br Br Br 09
31. brary Library Library Library Library Library Library Library Library Library Library User Manual User Manual User Manual sarkkdan al Filename C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders C Users Chris Desktop Folders CAL leorck Christi Mack tant Ealdarst Im Publish As BATTERY BRIDGE BRIDGESM SWITCHES SWOFF SWOFFT SWON SWONT SYSMON TANKS AMB BLUE AMB RED BACK_LIN RI ACKER Location Library Library Library Library Library Library Library Library Library Library Library Library Library Library Library Library Library User User User 38 Solution Open the Image Library see above click Refresh and then Reload to have CANcreate software import the newly added images 11 11 Design not working Correctly Pro
32. e Minutes to one EQUAL input and the 60 CONSTANT to the second input Connect the EQUAL output to the COUNTER Inc input Set Replace wire to Reset Reset_Hours wire to Load and Zero to Value Finally label the COUNTER output to Hours 14 Using the last EQUAL and COUNTER set a wire Hours to one EQUAL input and the 24 CONSTANT to the second input Connect the EQUAL output to the COUNTER Inc input Set Replace wire to Reset and label the COUNTER output as Days 49 15 Finally insert 3 VALUE parts into the workspace Set each Enable to TRUE For the first VALUE set Draw X 186 Draw Y 143 Width 30 and Height 0 Set foreground to 0 0 0 which is red green blue Set background to 246 182 0 Click OK Label the Value input to Days wire 16 For the second VALUE set Draw X 186 Draw Y 173 Width 30 and Height 0 Set the foreground and background color to that stated in step 15 Click OK Label the Value input to Hours wire 17 For the last VALUE set Draw X 186 Draw Y 200 Width 30 and Height 0 Set the foreground and background color to that stated in step 15 Click OK Label the Value input to Minutes wire 186 143 Page 0 186 173 Page 0 156 200 18 Test with the simulator Hold the R button for 5 seconds to replace the tire The date replaced will appear and as each minute passes the age will update Holding the T button while on the device will
33. eded Insert a GREATER a LESS and an EQUAL part Label the inputs of the GREATER top to bottom as Temp Val and Set Val The output should be Cool Label the inputs of the LESS top to bottom as Temp Val and Set Val The output should be Heat Label the EQUAL inputs top to bottom as Temp Val and Set Val The output should be Blank 25 Finally insert 3 BITMAPs Label them as Blank Cool and Heat For each Draw X 95 Draw Y 203 and Folder is User Manual For Blank 73 set Image to thermo_blank Click OK For Cool set Image to Cooling Click OK For Heat set Image to heating Click OK 9 2 Using CANTX 26 To communicate to the CAN system insert a CANRX and a CANTX Go to properties of the CANRX and set the CAN ID which would be the ID of the device that it will be communicating with For this example set it to 18EFFF4B and the CAN Mask to 1FFFFFFF Click OK Set the CAN ID on the CANTX to 18EFFF4C and use the same CAN Mask from the CANRX Click OK Assumptions that there will be no negative numbers or ones over value 199 27 For the RX node on the CANRX label it Update Temp and node 1 as Default CNT For the TX node on the CANTX label it as TX Temp Data 74 For node 1 label it Set Val set node 2 as mode and node 3 as Fan Now insert a TIMER and set
34. eled wire as Month to one of the COUNTER s Value input Repeat with the other 2 COUNTERS using Day and Year Wire a VALUE part to each of the outputs of the COUNTERs Set each VALUE Enable to a TRUE connection 10 For the COUNTER with Month as Value set the VALUE part to Draw X 108 and Draw Y 87 Then set Width 30 and Height 0 Set foreground to 47 0 0 0 which is red green blue Set background to 246 182 0 Click OK For the COUNTER with Day Value set the VALUE part to Draw X 164 and Draw Y 87 Then set Width 30 and Height 0 Change foreground and background color to that previously stated Click OK For the final COUNTER with Year Value set the VALUE part to Draw X 226 and Draw Y 87 Then set Width 50 and Height 0 Change foreground and background color to that previously stated Click OK 6 2 Clock Part 11 Under Part gt Timers select CLOCK Next insert 3 CONSTANTS 3 EQUALS and 3 COUNTERS Set one CONSTANT to 0 second to 60 and the third to 24 12 Connect the Sec output from CLOCK and the 0 CONSTANT to the EQUAL inputs Label the wire from the O CONSTANT as Zero Then connect that output to one of the COUNTERs On that same COUNTER set a wire 48 Replace to the Reset input Set a wire Reset_Min to the Load input and set a Zero wire to the Value input Finally label the COUNTER output wire to Minutes 13 Using the second EQUAL and COUNTER set a wir
35. how Message Window 7 aoe lo Message Length Data Court 18EFFF3Bh 8 01 00 00 00 00 00 DD 00 0 3 Under the Receive or Transmit boxes right click and options are shown To create a new Receive message right click in the box and select new A New Message window will pop up There the ID length and Data can be inputted Length Data 0 7 4 For this program set the ID to 18EFFF3B length to 8 and data to 01 00 00 00 00 00 00 00 Click OK Observe that the source is User but this will test as if the message was coming from a hardware device 30 6 Receive Message Length Data Period 18EFFF3Bh 8 01 00 00 00 00 00 00 00 0 Test with the same ID but with the following data To change the mode use data 00 01 00 00 00 00 00 00 To change the fan use OO 00 01 00 00 00 00 00 Just run the simulation and values will be received into the program logic 10 2 Using a Switch ra If you want to test using a switch to control variables without a touch screen device use the following procedure Make sure the chap_9 ccs is open go to connect options and change the connection type to 514UTC USB Set up the switch with preprogramed logic or navigate to Switch Demo File and use the usermanual external sw cfg crm file to program the switches Once all the addresses are set up connect it to the computer via USB 10 Enable CAN Simulation and turn the S
36. imulator on The switch should now control the increasing decreasing of the temperature changing the mode and the fan The LEDs should change according to the settings of the mode and fan 11 Open the Message Window to see the receiving and transmitting messages between the program and the hardware 12 Both Mode and Fan are OFF ol Messages heceive Message Length Data 13EFFF3Eh 0000 00 00 00 00 00 00 Transmit Message Length Data TSEFFF3Ch g FF FF 01 01 00 00 00 00 TSEFFFACh g 44 00 00 00 00 00 00 00 13 Change in Mode Receive Message Length Data 18EFFF3BH 0001 00 00 00 00 00 00 Transmit Message Data TSEFFF3Ch FF FF ON 01 0000 00 00 TSEFFFACK 44 00 00 00 00 00 00 00 Period 1035 Period 1074 1072 Pernod 1007 1007 Source Hardware Source Design Design Hardware Source Design Design 02 14 Change in Fan Messages Recenve Message 18EFFFSBH Transmit Message Length TSEFFF3Ch 13EFFF4Ch Data 0000 01 000000 00 00 Data FF FF 02 02 00 00 00 00 4A 01 01 00 00 00 O0 00 15 Changes on Hardware Feriod 1025 Pernod 329 323 Source Hardware Source Design Design 33 Chapter 11 Troubleshooting FAQ 11 1 Locating Installation Location Problem The CANcreate software just installed but you can t locate the execution folder that contains the application and Image Library Solution CANcreate Version 2 0 0
37. m When running the program in the simulator or on device the TOUCH areas won t respond to input They seem not to work and there is no visible sign of the TOUCH part going TRUE while in the CANcreate application 1 CONSTANT Solution This problem is most likely resuts due to multiple sources TOUCH ag parts to one wire and its function To check this route the program and then go to Route Results under Publish There should be a warning where it states what wire has the X number of sources This can occur even if the TOUCH parts are assigned to different pages they are still all connected to the same wire There are two methods of fixing paceman this problem One way is to set HIER different DELAYON timers for each 5 TOUCH part in your program The Hesse second way is to give each TOUCH part an individual wire name and e p duplicate the same code for each to use Re route and make sure the warning has been fixed 11 4 Device Time 1s Incorrect Problem When running the program on the device the clock and or calendar is incorrect Yet the clock and calendar were correct in the simulator Solution This occurs because the simulator uses the computer s system clock and calendar when running the program On the device there is no built in clock and calendar so it must be set using the Diag bat descripted in Chapter 1 Your program must contain a TOUCH part attached to
38. nd Image to blackbg 3 Insert a BITMAP and under properties set Draw X to 80 and Draw Y to 90 Next change Folder to User Manual and Image to amb red Connect a TRUE to BACKGROUND 4 Now time to work on the blinking circuit Go to Part gt Gates and insert an AND2 To one of its inputs connect a TRUE 5 Next go to Part gt Timers and select DELAYON Insert 2 of these into the workspace Under properties for each DELAYON change Timer to 50ms Click OK 6 Connect the output of the AND2 to the input of one of the 50ms DELAYONs Now connect the output of that DELAYON to the input of the other DELAYON 35 7 Go to Part gt Gates and select a NOT Insert the NOT connecting its input to the last DELAYON s output Finally connect the output of the NOT to the second input of the AND2 gate 8 Lastly insert another BITMAP and under part properties set Draw X to 80 and Draw Y to 90 Next change Folder to User Manual and Image to amb blue Click OK Connect its input to the wire between the two DELAYONSs Insert another NOT gate and connect it to the wire going to the amb blue and its output to the amb red 9 Run the simulation and watch the ambulance light blink Note The combination of these DELAYONs creates a 100ms delay which is 10 frames per second This is the highest recommended frame rate for the display 36 4 2 Image Slideshow At the end of this Slideshow tutorial you will
39. nd SUBTRACT Start with the MULTIPLY setting the inputs as Temp Upper and Const 256 Connect that output to the ADD and the second ADD input to Temp Lower Connect that output to the DIVIDE and the second DIVIDE input to Const 32 Finally connect that output to the SUBTRACT and the second input to Const 273 The SUBTRACT output should be Temp Calc This is a random scaling factor that allows for a 16bit number to be expressed with the software 12 Insert 6 more constants using the values 25 50 75 100 125 and 150 Label them like earlier such as Const 25 and so on CONST 150 CONST 125 CONST 100 CONST 75 CONST 50 NST 25 60 13 Next insert 6 GREATEREQUAL parts Use the following to label each one correctly 1 Input 1 Temp Calc Input 2 Const 150 Output Temp Max 2 Input 1 Temp Calc Input 2 Const 125 Output Temp 5 3 Input 1 Temp Calc Input 2 Const 100 Output Temp 4 4 Input 1 Temp Calc Input 2 Const 75 Output Temp 3 5 Input 1 Temp Calc Input 2 Const 50 Output Temp 2 6 Input 1 Temp Calc Input 2 Const 25 Output Temp 1 14 Finally add in a VALUE part Set Draw X to 100 and Draw Y to 189 Change the Foreground to 0 0 0 and Background to 140 140 140 Click OK Set the Val node to Temp Calc and the Enable to TRUE 61 8 2 Simulation Values 15
40. ng 11 4 Device Time is Incorrect 11 5 Bitmap Rendering Too Slow 11 6 Bitmap Won t Disappear 11 7 Why are Bitmaps Renamed 11 8 Bitmap Image Support 11 9 Tutorial Images not Displayed 11 10 New Library Images not Listed 11 11 Design not Working Correctly Chapter 1 Installation 1 1 windows XP Windows 7 Once HMI Systems has provided your CAN Create zip file follow the steps below to install the software onto your computer 1 First locate your zip file Then exact the file to a folder using a standard extracting tool Windows extractor WinRAR WinZip etc by right clicking and selecting extract Given the option extract to folder on the desktop di Application Files CF CANcreate 2 Open the newly created folder and there should be three files seen to the right E setup TO CANcreate Setup For the following components 3 Double click the setup execution file to begin installation Microsoft XNA Framework Redistributable 4 0 Please read the following license agreement Press the page down keyto see the rest of the agreement 4 The CANcreate Setup window will open up on your screen asking to accept the ee er E MICROSOFT XNA FRAMEWORK 4 0 license agreement for Microsoft XNA zz ese license terms are an agreement between Microso Framework Click Accept to continue ee hr A D EG which includes the media on which you received it if any The tarman slan manh ta mms Aine anh
41. olbar Tools Sidebar zu Main Grid Workspace Once installed the CAN Create workspace above will be shown The main grid area will be where the wires and parts will be combined together to program your device There are 3 main sections to the interface the File toolbar the quick access toolbar and the tools sidebar 2 2 2 9 File Toolbar 2 10 Quick Access Toolbar 2 11 Tools Sidebar 2 2 File Toolbar File ad File Edit View Publish Tools Simulator Connect Window Under the File menu options include ate ES CANcreate v2 0 Untitled Edt Wiem Publish Tools Simulator Connect Window Help Mew trl M Open Chrl 0 Save Ctrl 5 Save Os Close Close All 1 CABocuments and Settings mbushi Desktop LANlogichrrdemo final ccs 2 Weddserver modules 516C4NDirr demolfinallirrdemoz ccs 3 CADocuments and Settingsmbushi Desktop LANlogichrrdemoz ccs 4 CADocuments and Settings mbushi Desktop C4Nlogicirrdemoz pages ccs SCH Documents and Settings mbush Desktop LAnllogichrr thermo ccs 6 C Documents and Settings mbushiDesktop C4Nlogicirr timer ccs 7 Weddserver modules 516C4NDrr demolfinalirrdemoe pagez ccs Exit New Create a new blank CANcreate workspace Open Open a saved CANcreate project from a folder located on your computer Save Save the current CANcreate project Save As Save the current project in a specified location Close Close the current active project works
42. open up the set time screen since the clock needs to be set on the device 50 6 3 Result DISPLAY Page 1 186 143 Page 0 166 173 Page 0 166 200 Page 0 51 Chapter 7 advanced Page Navigation 7 1 Multiple Page Setup At the end of this Page Navigation tutorial you will be able to handle multiple page programs better and create wrap around page navigation using buffers 1 Open up a new CANcreate workspace and insert a DISPLAY 2 Now insert aBACKGROUND and under User Manual set Image to tires Wire a TRUE to the BACKGROUND 3 Add 4 BITMAPS into the workspace Each will use Folder User Manual and Image tireico1 Use the following Draw X and Draw Y for each BITMAP Set each to TRUE 1 Draw X 48 Draw Y 40 Draw Page 1 2 Draw X 230 Draw Y 40 Draw Page 1 3 Draw X 48 Draw Y 140 Draw Page 1 4 Draw X 230 Draw Y 140 Draw Page 1 4 Now create 5 CONSTANTS Set them as values 1 2 3 4 and 5 Label wires from each as Page One Page Two and so on up to Page Five 5 Insert a PAGE part and label the input wire as Page Ctrl 6 After that insert 4 TOUCH parts and 4 DELAYON parts Use the following values for each TOUCH part 1 Draw X 46 Draw Y 38 Width 42 Height 80 2 Draw X 228 Draw Y 38 Width 42 Height 80 TOUCH 3 Draw X 46 Draw Y 138 Width 42 Height 80 4 Draw X 228 Draw Y 138 Width 42 Height 80 7 Attach a DELAYON to each of the TOUCH outputs and
43. or to make sure this functions the same as the front light control 42 Lights 247 61 T BITH I IAP e 47 136 MAP B_INE RUE RUE B T 243 61 50 50 Page T TOUCH 243 136 50 50 Page 0 TOUCH 5 3 Multi Function Input Short Long Presses 22 This will create multiple control options through the same button For the front up button holding the button will slowly increase the light and the down button when held will reset the light to zero 23 Locate the TOUCH 20 61 that is outputting to INC Delete the output wire from the TOUCH Now insert an AND2 gate a DELAYON and a NOT gate Attach the output of the TOUCH to the AND2 input and the output of the NOT gate to the AND2 input Draw a wire from the output of AND2 to the DELAYON Next wire the output of DELAYON to the NOT gate Label the wire between the AND2 and the DELAYON as INC Finally set the DELAYON timer to 10ms 43 24 Run the simulator and hold the up button for the front the bars should increase without clicking 25 Next is to change the down button Draw a wire from TOUCH 20 136 wire labeled DEC Insert an AND2 gate and a DELAYON Attach one input of the AND2 to the newly created wire and also connect this wire to the input of the DELAYON Connect the output of the DELAYON to the second AND2 input Label the output of the AND2 as Reset 120 136 a0 50 Page 0 26 Run the simulator and test the long
44. output of each TOUCH part 12 For the TOUCH parts on page 2 set the first one to Draw X 160 Draw Y 100 Draw Page 2 Width 64 and Height 64 Label the wire output from the DELAYON as Page2 Home For the second TOUCH part set Draw X 81 Draw Y 104 Draw Page 2 Width 80 and Height 104 Label the wire output from the DELAYON as Page2 Prev For the third TOUCH part set Draw X 224 Draw Y 104 Draw Page 2 Width 80 and Height 56 Label the wire output from the DELAYON as Page2 Nxt 13 Repeat step 12 except change the Draw Page and the output wire label Do this for pages 3 4 and 5 Label the outputs the same as page 2 but change the number in the name see below 54 2 Using Buffers for Pages 14 To create the page navigation buffers are going to be used For the main home page insert 5 BUFFERs Label each of the output wires to Page Ctr e MU For the inputs label them as Page One Page Two and so on Use the following to know what to set the control wire 1 4 5 15 To prevent TOUCH area issues from multiple sources to the same wire each page needs its own logic and wire label names Insert 12 BUFFERs 3 will be used for each page 16 For Page 2 set the output of the 3 BUFFERs to Page One buffer label control Home Pagel Page Two buffer label control DF Page2 Page Three buffer label control PF Page3 Page Four buffer label control DR
45. p File Edit Format View Help Therm_En csc Therm_Sp csc 10 Run the simulator for the Spanish version and it will run just like the English one The batch files can t be tested with the program simulator but holding either the English or Spanish button for 5 seconds will launch the other script Install the scripts onto the device to see them in action TEMP CALC gt FHP MAX 2 me TEMP cerns 2 es TENP CAIC 2 p 4 CONST 10 TEMP CALC 2 TEMP comaT 75 gt TEMP CALC gt consr 50 TEMP CALC con 25 64 Chapter 9 CAN Transmitter 9 1 Using Personal Font At the end of this CAN Transmitter tutorial you will be able to create and use your own font to simulate a thermostat Also use the CANTX part to transmit data to an external source to use 1 Open up a new CANcreate workspace IEZ TTIE and insert a DISPLAY Tee 199 F ee SET 99 F j 2 Insert a TRUE part and label the wire a DER True Place a BACKGROUND into RAISE wy the workspace set it equal to TRUE MODE HEAT FAN HIGH and under properties set Folder to U TE User Manual Then set the Image to o thermo controller Click OK o DISPLAY Page 1 00 00000000 3 Next insert a PULSE Labeling the input True and the output as First 4 Now insert 3 CONSTANT parts Use the values 0 10 and 100 Label them as Zero Ten Const and 100 Const 5 Place
46. pace Close All Close all active project workspaces List of previously opened documents Re open recent files Exit Close CANcreate application 2 3 File Toolbar Edit Under the Edit menu options include Bl CANcreate v2 0 Untitled oJ File Publish reper Unda Chri z ut Ctrl Copy Ctrl C Paste Ctrl Delete Del Find Ctrl F Find Next F3 Undo Undo a previous action Cut Copy and delete a selected object Copy Copy a selected object Paste Paste a selected object Delete Delete a selected object Find Find a certain part by typing in label or using the drop down menu Find Next Use to find the next part of the same type after using the find option 2 4 File Toolbar View Under the View menu options include ate v2 0 Untitled Publish Tools Simulator Conng oom In T FE zoom ue Next Page Previous Page To navigate and get an overview of the workspace use zoom Zoom In Zoom Out When designing your GUI for organization parts can be created on multiple pages Note Each page isn t its own project parts will interact with each other and labeled wires will connect across multiple pages Next Page Page Down Previous Page Page Up 10 2 5 File Toolbar Publish Under the Publish menu options include 2 0 Untitled View Publish Tools Simulator Connect i 23 Hd Publish F5 IE Route F Route Results _tri F6
47. press down button No matter value it is at when held for 1 second it will reset to 1 bar Note Although this program works correctly in the software simulation if setup on hardware it wouldn t The light bars would not be erased from the screen because on hardware BITMAPs are only erased by being overwritten Blank black images would need to be drawn to the screen when decreasing the lights to get rid of the bars from the screen 44 5 4 Result DISPLAY Page CONSTANT CONSTANT 243 61 50 50 Page 0 TOUCH 243 136 50 50 Page 0 TOUCH BITMAP 60 125 20 136 50 50 Page 0 TOUCH DISPLAY Page 1 186 140 BD ITMAP 186 125 a ITHAP 186 110 B2 ITMAP 186 95 a ITHAP 186 80 B4 ass 45 Chapter 6 Calendar and Time 6 1 calendar Part At the end of this Time tutorial you will be able to better understand how to use the clock and calendar parts within both the simulator and on the physical device 1 Open up a new CANcreate workspace and insert a DISPLAY 2 Now insert aBACKGROUND and under User Manual set Image to tire_calendar Wire a TRUE to the BACKGROUND Label that wire TRUE to use later 3 Go to Part gt Timers and select CALENDAR Attach wires to each of the outputs and label them top to bottom Month Day and Year 4 Next insert 2 BITMAPs Set each to TRUE For the the first BITMAP Set Draw X to 0 Draw Y
48. rm_En ccs 2 First is to add in another BITMAP Set it to TRUE and leave Draw X Y equal to 0 Change Folder to User Manual and Image to temp_spanish Click OK 3 Next insert a TOUCH part Set Draw X and Draw Y to 0 Make the Width 120 and the Height 42 Click OK Wire a DELAYON to the TOUCH part Set the timer to 5000ms 5 seconds Finally wire an EXECUTE part to the output of the DELAYON Under Filename type Temp Spa bat This will be the batch file that runs the Spanish program script 4 Now copy all the contents of the workspace and open a new blank file Paste the contents and save this new workspace with Sp ae Ex Therm_Sp ccs 5 Goto the BACKGROUND properties and change the Image to temp_sensor_spanish Click OK 6 Locate the BITMAP at 0 0 and go to part properties Change the Image to temp _english Click OK 7 Next find the Danger BITMAP Under part properties change Draw X to 14 and Draw Y to 121 Change the Image to temp_spanish_warning Click OK 63 8 Finally find the EXECUTE part and go to properties Change the Filename to Temp Eng bat Click OK 9 To make the batch files open up a blank Notepad window Type the name of your Spanish program csc and save as Temp Spa bat Open up a second blank Notepad window Type the name of your English program csc and save as _Temp bat Bal temp eng File Edit Format View Hel
49. running the wires will bold with either black green or blue colors 34 Scrolling the pointer over the wire the box in the lower right corner near the where the Page number is will tell the value on the wire For example roll the pointer over the wire between the TRUE and the black BACKGROUND This wire will be true and hence is green Roll over any black wire and that will show up as false 35 In simulator mode the DISPLAY screen in the workspace can be clicked and interacted with as if it were the physical touch display Hello World Click 36 Clicking the blue button will result in the button confirming it was clicked 33 by flashing green and Hello World will be displayed on the screen Notice the changing in values along the wires in the workspace Click the blue button again to hide Hello World Clicking next will go to Page 2 and clicking back will return to Page 1 37 Click the simulator button or F8 to turn off the simulation 3 8 Result 90 125 Page TOUCH 224 182 BITMAP BITMAP 2 WOAAHAMSWNHrO PAGE Page 2 110 90 Page 2 TEXT 150 40 CONSTANT CONSTANT 34 Chapter 4 Basic Animation 4 1 Blinking At the end of this Blinking tutorial you will be able to create a basic bitmap animation that blinks on the screen at a certain rate 1 Open up a new CANcreate workspace Insert a DISPLAY 2 Add in a BACKGROUND under properties change Folder to User Manual a
50. t 9 Repeat step 8 except this time under the image drop down menu select clicked_btn This button will appear over the previous BITMAP 2 Result Following steps 8 to 9 is seen below 3 3 Using Touch 10 Next is to make that button click able Go to Draw Parts gt Display and find TOUCH Place a TOUCH part into the workspace Switch to select and double click the TOUCH part Change DrawX to 90 and DrawY to 125 This is the location of the top left corner of the button Change Width to 150 and Height to 40 This creates a touch area around the button that will recognize input Finally change the Draw Page to 1 Click OK 11 To have only one of the buttons displayed at a time a NOT gate is needed Go to DrawParts gt Gates and select NOT from the list Place it near the blue button Switch to Draw Wires and connect the output ofthe NOT to the input of the blue button BITMAP Now connect the TOUCH output to the NOT input and the green button BITMAP input Result Following steps 10 to 11 is seen below 28 3 4 Creating Pages 12 To navigate between pages more buttons are needed Go to Parts gt Display and select BITMAP Under Part properties set Draw X to 0 Draw Y to 182 and Folder to User Manual Next set Image to Page Left Make sure Page is set to 0 0 so the BITMAP will be drawn on all pages and transparent is checked Click OK 13 Insert another BITMAP Under part properties set Draw X to 224
51. t MODULUS Connect it to the output of the COUNTER For the second input node of MODULUS insert a CONSTANT part and under part properties change Constant to 2 Click OK 28 Next in Part gt Math select EQUAL and insert it near the output of MODULUS Change to wire and connect them For the second input node of EQUAL insert a CONSTANT part and under part properties change Constant to O By default the value should be 0 Click OK 31 29 Go to Part gt Gates and select NOT Attach NOT to the output of EQUAL Delete the TRUE connect to the Hello World TEXT part Then attach the output of NOT to the Hello World TEXT 30 Now insert 3 BITMAPS first one is Draw X 61 Draw Y 82 Draw Page 1 Folder User Manual and Image blank Repeat for the next one except change Draw X to 139 and Draw Y to 82 For the final one repeat again except with Draw X 185 and Draw Y 82 Change to wire tool and connect each of these BITMAPS to the wire between EQUAL and NOT Hello World 76 90 Faga 1 EITHAF LES BEEZ ELTMAE 31 Finally delete the TRUE connected to the green button BITMAP and connect the button BITMAP to the wire between TOUCH 86 130 and COUNTER 32 BITMAP 90 125 150 40 Page U TOUCH 3 7 Running the Simulator 32 Time to test the program First turn on the simulator Either click the button in the quick access toolbar or press F8 33 Once the simulator is
52. tep 7 to create a decrease temperature circuit Change any label that was Raise TCH before to Lower TCH Also change any label that was Raise FB to Lower FB Finally change Raise to Lower and the output of the OR2 to Sub Temp 66 9 Insert aCOUNTER Label the Inc to Add Temp the Dec to Sub Temp the Load to First and the Value to Default CNT Change the output to Set Val Under COUNTER properties change the Range to 200 and leave Disable Overflow unchecked Click OK 10 To use your own font for the temperature readout each number must be imported as a BITMAP Insert 10 BITMAPS Each one will have Draw X 150 and Draw Y 36 Use the following Images and labels for each Folder is User Manual 1 Label Temp1 0 Image numeral0O 2 Label Temp1 1 Image numeral1 3 Label Temp1 2 Image numeral2 4 Label Temp1 3 Image numeral3 5 Label Temp1 4 Image numeral4 67 6 Label Temp1 5 Image numeral5 7 Label Temp1 6 Image numeral6 8 Label Temp1 7 Image numeral7 9 Label Temp1 8 Image numeral8 10 Label Temp1 9 Image numeral9 125 36 ja ITMAP 150 36 125 36 125 36 Fi 6 P ITMAP 150 36 125 36 125 36 THAP ITMAP 150 36 15 125 36 3 3 ITHAP 150 36 125 36 ITMAP ITMAP 11 Another set of numbers
53. that outputs input that is true Outputs true as an integer value MO h U ide eA Equal Checks two values to be equal and outputs Boolean value Greater Check value to be greater than the other and outputs Boolean value Top is greater than bottom input GreaterEqual Checks value to be greater than or equal to the other and outputs Boolean value Top is greater than or equal to bottom input Increment Increases integer value Zo 2 12 Parts Descriptions Cont Less Check value to be less than the other and outputs Boolean value Top is less than bottom input LessEqual Checks value to be less than or equal to the other and outputs Boolean value Top is less than or equal to bottom input Modulus Modulus division of two integers Top is modulusly divided by bottom input Multiply Multiplies two integers Top is multiplied by the bottom input Mux 2 to 1 Mux with active high control NotEqual Checks values to be not equal and outputs Boolean value Subtract Subtracts two integers Top is subtracted by the bottom input ToBits Unpackages byte into bits d OF OT ee a Hmo ToByte Packages bits into a byte lt gi U e 24 2 12 Parts Descriptions Cont Timers Calendar Get month day and year from system clock System clock used for PC simulation and RTC real time clock is used when executing on hardware Clock Get hours minutes and seconds from system
54. the following names INC for Inc DEC for Dec RESET for Reset and LOAD for Load For the value wire double click the wire and click the drop down menu to see the list of labels Select FOUR to use that label and associate this wire with the CONSTANT part FOUR 8 Draw a wire from the output of the COUNTER Label it NUMBER Now go to Part gt Math and select GREATEREQUAL Insert 5 of these Attach open ended wires to both the inputs and outputs of the GREATEREQUALS Select 1 of them and using pre existing labels label the topmost input wire 40 NUMBER and the bottom one FOUR The output wire should be labeled F_4 Select the next GREATEREQUAL label the inputs NUMBER and THREE and the output F_3 Repeat for the next 3 GREATEREQUALS for TWO ONE and ZERO using F_2 F_1 and F_O 9 Next is to create buttons to make the light level increase and decrease Insert 2 BITMAPS set them both to TRUE For one set Draw X to 20 and Draw Y to 61 Under Folder go to User Manual and set Image as up button For the second BITMAP set Draw X to 20 and Draw Y to 136 Under Folder go to User Manual and set Image as down_ button 10 Insert a TOUCH part Set Draw X to 20 Draw Y to 61 Width to 50 and Height to 50 Click OK Attach a wire to its output and label it INC Insert a second TOUCH part set Draw X to 20 Draw Y to 136 Width to 50 and Height to 50
55. the Timer to 1000ms 1SEFFFAB Px 1FFFFFFF Label the output as TX Temp Data This will then send data ever second 1000ms over the CAN connection Insert an OR2 part label the inputs as First and Update Temp Label the output as Load Temp This will update the temperature when a new data is received 28 Insert a second part of CANRX and CANTX For the CANRX set the CAN ID to 18EFFF3B and CAN Mask to 1FFFFFFF Label node 1 as Raise Lower node 2 as Ext Mode and node 3 as Ext Fan For the CANTX set the CAN ID to 18EFFF3C Label the TX node as Tx Temp Data node 1 as Enable node 2 as Enable node 3 as LED Mode and node 4 as LED Fan 75 18EFFF3E 1FFFFFFF 29 Add in 3 CONSTANT parts Set them as values 1 2 and 255 Label them one two and Enable Also insert a FALSE and label it False 30 To decode the receiving message some calculations are needed Insert 4 EQUAL parts Use the following labels 1 2 3 4 Input 1 Ext Mode Input 2 One Output Hw Mode Input 1 Ext Fan Input 2 One Output Hw Fan Input 1 Raise Lower Input 2 One Output Hw Raise Input 1 Raise Lower Input 2 Two Output Hw lower 31 Next insert 4 OR2 parts Label them using the following 1 2 Input 1 Raise TCH Input 2 Hw Raise Outp
56. the display navigate to Parts gt Display and select TEXT Insert it and go to part properties Set Draw X to 76 and Draw Y to 90 Next set Draw Page to 1 Under Text type Hello World Inthe 3 boxes above the Foreground button set each to 255 Inthe 3 boxes above the Background button set each to 0 Make sure transparent is unchecked Click OK Helle World Page 1 Y to 90 and Draw Page to 2 In the text section type Page 2 Above the Foreground button set each box to 255 Above the Background button set Red and Green to 0 and Blue to 255 Click OK Page z 12110 90 Page amp TEXT E 22 Connect a TRUE constant to each of those TEXT parts 30 3 6 Using a Counter and Math Parts 23 In this section a counter and some simple gate combinations are going to be used to display and hide the Hello World text First draw a box and highlight the wires between the TOUCH 90 125 and the 2 Click button BITMAPS Including the NOT gate Press Delete 130 125 150 33 24 Attach a TRUE constant to the blue button BITMAP 25 Now go to Part gt Math and select COUNTER Insert it next to the TOUCH 90 125 Change to wire and attach the TOUCH to the Inc node 26 Go to Part gt Constants and select CONSTANT Insert it near the COUNTER and connect it to the Value node Under part properties change Constant to 2 Click OK 90 125 150 40 Faga O CONSTANT 27 Return to Part gt Math and selec
57. to 0 and change Folder to User Manual Set the Image to tire_time_btn_1 Click OK For the second BITMAP set Draw X to 264 Draw Y to 0 and set Folder to User Manual Set the Image to tire_replace_btn_1 Click OK 46 5 After that insert 2 more BITMAPS Set one to Draw X 0 Draw Y 0 and under User Manual Image to tire_time_btn_2 Click OK Set the second to Draw X 264 Draw Y 0 and under User Manual Image to tire_replace_btn_2 Click OK 6 Insert a TOUCH at Draw X 0 Draw Y 0 Width 55 and Height 50 Attach a DELAYON to the output and set the timer to 5000ms 5 seconds Now go to Part gt Display and select EXECUTE Attach this to the output of the DELAYON Change the EXECUTE Filename to DIAG BAT Note This execution will only work once on the device not in the simulator 7 Label the wire between the DELAYON and the EXECUTE as Timeset Create a wire attached to the BITMAP 0 0 with the red T button and label it Timeset 8 Insert another TOUCH at Draw X 264 Draw Y 0 Width 55 and Height 50 Insert a DELAYON and attach it to the output Then attach the output of the DELAYON to the BITMAP 264 0 with the red R button Change the timer on the DELAYON to 5000ms Finally label the wire between the DELAYON and BITMAP as Replace 9 Now insert 3 COUNTERS and 3 VALUE parts under Part gt Display Set a labeled wire as Replace to each of the LOAD inputs Next set a lab
58. ut Raise Input 1 7Mode TCH Input 2 Hw Mode Output Mode Count 76 U 3 Input 1 Lower TCH Input 2 Hw Lower Output Lower 4 Input 1 Fan TCH Input 2 Hw Fan Output Fan Count 32 Finally the bits have to be packaged into bytes to be transmitted Insert 2 TOBYTE parts For the first one set nodes O to 3 as Fan off Fan Low Fan Med and Fan High All the rest of the nodes should be labeled as False The output should be Led Fan For the second one set nodes O to 2 as Mode Off Mode Cool and Mode Heat Label the rest of the nodes as False The output should be LED mode If using a switch to test values and functionality of the program on hardware these will tell the hardware what color to make the LEDs and what the mode fan settings are 77 33 Run the simulator The Default set and temp should be O Click Raise and Lower to change the set amounts They can also be held down to change value without clicking The Fire lce button will change the mode and the Fan button will change the fan speed If the temperature is greater than the set value heating will appear If it is lower cooling will appear Note In order to change the temperature value in simulation mode you must change the value on the CANRX object Change Default CNT to the value you want ex 74 and then set Update Temp
59. ycle pulses Timer objects are affected more than delay objects 15 2 8 File Toolbar Connect Under the Connect menu options include Connect Window Help za a Enable CAN Simulation Enable CAN Simulation Use to attach USB from physical device and observe program running in the simulator while running on device Can be used to change test values and other data manipulation When running the icon on the quick access toolbar is highlighted with a blue box Show Message Window Shows the data receiving and transmitting messages Can right click and simulate hardware incoming messages Connect Options Connection Type Switch between PCAN GridConnect USB and 514UTC USB 16 2 9 File Toolbar window amp Help Under the Window menu options include Window Close All Documents 1 Untitled z C Documents and Settings imbushiDesktop LANlogichrdemo Final ccs Close All Documents Closes all open projects List of opened windows Gives a list of currently open projects which can be selected to be the current active project Under the Help menu options include Abou About Version number and copyright information Open Application Folder locates the image library 17 2 10 Quick Access Toolbar J u pS Open Project New Blank Project Zoom out Previous Page Save Project Next page i Publish Project Cut

Download Pdf Manuals

image

Related Search

Related Contents

MWS3A-PRM-2CH - CP Electronics  IPC-SHCL-2T    Sony TL HP90 Corded Phone (TL  - Techtop Canada  

Copyright © All rights reserved.
Failed to retrieve file