Download Smart Touch Modules User`s Manual Introduction
Transcript
andersDX Smart Touch Module User Manual Interfaces to Inspire Manualrevisionhistory Issue Date Comments 1.0 Page2of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ Contents Introduction ............................................................................................................................................... 5 2What’sinthebox .................................................................................................................................. 8 2.1 SmartTouchModule................................................................................................................... 8 2.2 I/OCableandUSBtoUARTConverter...................................................................................... 10 2.3 USBtoUARTboard ................................................................................................................... 11 2.4 ACPowerAdaptorModule ....................................................................................................... 11 2.5 USBCable .................................................................................................................................. 12 2.6 GraphicTestingUserBoard ...................................................................................................... 12 2.7 GraphicTestingBoardPCSerialCable.................................................................................113 2.8 GraphicTestingBoardtoSmartTouchModulecable ............................................................113 2.9 NetworkcableforGraphicTestingBoard................................................................................. 14 2.10 SoftwareDVDcontaining...................................................................................................... 14 2.11 Othercomponents ................................................................................................................ 14 2.12 Hardwarerequirements........................................................................................................ 15 3STMQuickStart .................................................................................................................................. 16 3.1 ConnectingtheSTMtoyourPC,andstartingthedisplay ........................................................ 16 3.2Showmoduleinformation........................................................................................................ 17 3.3 InstalltheUSBtoUARTDrivers ............................................................................................... 17 3.4 Installthe‘Arranger’package ................................................................................................... 18 3.5 Install.NETFramework3.5 ....................................................................................................... 18 3.6 Installthe‘CommandPilot’package ........................................................................................ 18 4EasyGraphicArrangerpackagecomponentsandlayout ................................................................... 19 4.1 ProjectManager........................................................................................................................ 21 Page3of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 4.2 PictureOrganiser ...................................................................................................................... 22 4.2.1FontOrganiser ........................................................................................................................ 24 4.3 MemoryArea ............................................................................................................................ 24 4.4 EditPageToolbar ...................................................................................................................... 25 4.5 UARTFunctionToolbar ............................................................................................................. 26 4.6 PictureTypeandAttributeArea ............................................................................................... 27 4.7 PictureStatusWindow.............................................................................................................. 30 4.8 PictureEffectModification ....................................................................................................... 31 5.AnExampleConfigurationExercise ................................................................................................... 32 5.1 PopulatingyourPictureOrganiser............................................................................................ 33 5.2 BuildingyourconfigurationontheLayoutGrid ....................................................................... 35 5.3UsingFontsandgeneratingTextMessages .................................................................................. 37 5.3.1 UsingCustomFonts .......................................................................................................... 39 6.Saving,uploadingandtestingyourconfiguration ............................................................................. 40 6.1SavingyourconfigurationasaProjectonyourPC’sharddrive.................................................... 41 6.2 OutputyourconfigurationasaBinaryfileontoaUSBmemorystick ...................................... 42 6.3 DownloadingaProjectBINfilefromUSBmemorysticktoSTMmemory .............................443 6.4 DrivingtheSTMusingArranger ..............................................................................................443 6.5 MoreaboutCommandStringsandprototyping...................................................................... 45 6.5.1 CommandPilot.................................................................................................................. 45 6.5.2 GraphicTestingBoardandcables..................................................................................... 47 Page4of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ SmartTouchModulesUser’sManual Introduction Anymachineorprocessyoubuild,whateveritsapplication,musthaveauserinterface.Alifthas buttonsthatletyouchoosetheflooryouwant,andadisplaytoshowwhichflooryou’reon.A nuclearpowerstationhasarathermorecomplexsetofbuttonsanddisplays,buttherequirementis thesame–tolettheusercommandtheprocess,andseetheprocess’sstatus. Originally,suchuserinterfaceshadtobephysicallyassembled,bitbybit,usingswitches,buttons, lampsandmetersastheprocessdictated.Aswellasbeingslow,thisapproachwasnoteasily amenabletomodificationorextension.Thentheadventofindustrialcomputerhardwareand softwareallowed‘virtual’userinterfacesusingCRTandthenflatpaneldisplayscreens.However, evenwithsoftwarepackages,designingaviewablecontrolstrategycouldbetimeconsuming–and integratingaflatpaneldisplayintoacontrolsystemcouldbeevenmorefrustrating,astheeffort involveddidn’tseemtohelpthemarketablefunctionalityofthemachinemuch. TheAndersSmartTouchModule(STM)youhavejustpurchasedhasbeendevelopedasaneasyto use,simplyintegratedalternativetosuchapproaches.ItcomprisesaTFTdisplayreadyassembled withalldriveelectronicsandanoptionaltouchscreen,whichyoucanconnecttoyourtarget machinewithjustasimple,standardserialinterface.Draganddropiconsforpushbuttons,switches, lamps,metersandotheritemsfromtheSTMiconlibraryontothedisplay,addtext,anditbecomes yourtargetmachine’scontrolpanel. TheSTMfeaturesarealtime,dynamicuserinterface.Theoptionaltouchscreenallowsyoutopress anON/OFFswitch,seeitsIconchangestateontheSTM,andobserveyourtargetmachine’sreaction totheswitchingevent.LampIconswillappearaslitorunlitandmeterswillshowarangeofvalues, dependingonCommandStringssuppliedbyyourtargetmachinethroughtheseriallink.Animations canbedisplayedbysequenceddisplaysofIconsets. Page5of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ TheprocessofconfiguringyourSTMandintegratingitwithyourtargetmachinecomprises8steps: 1. Installthesupplied‘Arranger’packageonyourPC,anduseittolayoutyourIconsand textmessagesasyouwishthemtoappearonyourSTM‘controlpanel’. 2. StoreyourcompletedlayoutasaprojectonyourPC 3. TransferyourprojectIconsandotherimagestotheSTMusingaUSBmemorystick 4. ConnectyourSTMtoaUSBportonyourPCusingtheUSBtoUARTconvertersupplied. 5. UsetheArrangerpackagetosendcommandstringswhichithasautomatically generatedtotheSTMandwatchtheireffectontheSTM’sdisplay.Arrangerisactingasa simulatorforyourtargetmachine. 6. UsetheCommandPilotsoftwarepackagesuppliedtosimulateyourtargetmachine’s actionsbypreparingcompleteCommandStringsequencesandsendingthemtothe STM.TheydefinewhichIconstoretrievefrommemory,anddisplay.Thesecommand stringsaredefinedandunderstoodbytheSTM.TheyincludecodestohandleSTMtouch screenevents,sothattheSTMcansupplyswitchandpushbuttoninputstoyourtarget machineaswellasdisplayingyourtargetmachine’soutputsonlampandmeterIcons. 7. Then,dispensewiththePCandusetheGraphicTestingBoardsuppliedtoemulatethe behaviourofyourowntargetmachinehardware,sendingCommandStringstotheSTM. 8. ConnectyourSTMastheControlPanelforyourtargetmachine,usingaseriallink.Install andruntheCommandStringsequencesprototypedusingCommandPilotandthe GraphicTestingBoard. YourSTMissuppliedwithallnecessarycables,hardwareandsoftware.Asafirststep,youcan powerupyourSTMwiththepowersupplyprovidedandseethe‘Anders’logoappearontheSTM screen.ThenyoucanconnecttheSTMviathecablesprovidedtoaUSBportonyourPC,andfollow theinstructionstoinstalltheappropriateUSBdriversforPC–STMcommunication. Next,youcaninstalltheArrangersoftwarepackageprovidedontoyourPC.TheArrangerhasa libraryofIconsforinputdevicessuchaspushbuttonsandswitches,andoutputdevicessuchas lampsandmeters.Youcanselectthedevicesyouwant,thendraganddropthemontoanArranger workareathatrepresentsthelayoutofyourSTM’sTFTdisplay.SomeoftheseIconsaredualstate devicessuchasLampsorSwitchesthatcanbeONorOFF.TheSTMhandlesthisbycreatingtwo Iconsforeachdualstatedevice:onedisplayingthedeviceinitsONstate,andtheotherdisplayingit initsOFFstate.Duringconfiguration,bothIconswilloccupythesamepositiononthedisplay.Later however,duringonlineoperation,yourtargetmachinewillcommandeithertheONorOFFversion oftheIcontobedisplayedasappropriatetothemachine’scurrentstatus. Page6of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ Similarly,therearemultistatedevicessuchasMeters.ThesehaveafamilyofIconstorepresentfull scale,zero,andsomeintermediatevalues.TheSTMalsohasotherfeatures,includingaBuzzer,a RealTimeClockwithAlarm,andtextdisplayfacilities.Achoiceoffonts,fontsizesandbackground coloursisavailable.Anyfontcanbeused,includingChineseandothergraphicstypes. Theoutputfromyour‘Arranger’configurationeffortwillbeaprojectfolder.Thiscomprises: abinaryimagefilecontainingallthegraphicselementstobestoredonyourSTM AprojectfilewhichyoucanstoreandrecallatanytimetorunonArranger.Itincludes automaticallygeneratedCommandStringswhichArrangercansendviaseriallinkfromthe PCtotheSTMtocallstoredIcons,backgroundpicturesandtextmessagesfromSTM memorytodisplay. Referenceimage,textandotherfiles YoucanthenusetheCommandPilotandGraphicTestingBoardprototypingtoolsprovidedtowrite completecontrolprogramsusingCommandStrings,andtestthembeforeinstallationontoyour targetmachine. Chapter2belowdescribesthecomponentsprovidedwiththeSTMkit,andthespecificationsofthe PCyouwillneedtoruntheSTMArrangerandCommandPilottools.Chapter3isaQuickStartguide, showingyouhowtopoweruptheSTMandseethatitisworkingOK,installthesoftwareonyourPC, andconnectthePCtotheSTMandpowersupply.Chapter4introducesthelayoutandcomponents oftheArrangerpackage.Chapter5describeshowtousetheArrangerpackageforanexample configuration.Chapter6explainshowtouseArrangerinCommunicationsmodetosendcommand stringstoyourSTM.ItalsointroducesCommandPilotandtheGraphicTestingBoard,andtheirrole asprototypingtoolsforCommandStringprograms. Page7of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 2. What’sinthebox TheSTMkitasdeliveredcomprisesasetofhardwareandsoftwarecomponents: 2.1 SmartTouchModule ThisisaTFTofanysizefrom3.5”to10.4”,dependingonpurchase,integratedwiththeSmartTouch controllerboardandoptionallyatouchscreen.TherearedifferentversionsoftheSmartTouch board;theversionyouhavedependsonthesizeofyourTFTdisplay.Thedifferentversions,STM Type1andSTMType2havedifferentlayoutsasshownbelow: STMType1: I/Ocableconnector GreenPOWERLED RedUpdateLED101 USB201Port JumperJ204 Fig2.1 SmartTouchModule(STM)boardType1 Page8of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ Comeswithdisplays: STM FG0502W00100R FG064VW00100R FG070WW00100R FG080SW00100R FG102WW00100R STMType2 Display 5” 6.4” 7” 8” 10.2” LEDandJumpertable: Name J204 LED Status Short=Update Open=Normal Lit=PowerOK Off=PowerOFF LED101 Flashesduringupdate USB201 USBPort Fig2.2 SmartTouchModule(STM)boardType2 Page9of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ Comeswithdisplays: STM FG050VW00100R FG056VW00100R FG104SW00100R Display 5” 5.6” 10.4” LEDandJumpertable: Name J301 LED101 Status Short=Update Open=Normal Lit=PowerOK Off=PowerOFF LED201 Flashesduringupdate USB303 USBPort 2.2 I/OCableandUSBtoUARTConverter Connectorfor STMboard USBtoUART board 12VdcPower Connector USB Connector Fig2.3 I/OCable(RefLACABLE08FDR)withUSBtoUARTboardconnected Page10of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 2.3 USBtoUARTboard Fig2.4 USBtoUARTboard 2.4 ACPowerAdaptorModule Fig2.5ACPowerAdapterModule Rating:100–240V/47–63Hz12VDC/2.5A Page11of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 2.5 USBCable Fig2.6USBCable ConnectsUSBtoUARTboardtoPCUSBHostPort.USBTypeAconnectors 2.6 GraphicTestingUserBoard Fig2.7 GraphicTestingUserBoard Page12of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 2.7 GraphicTestingBoardPCSerialCable Fig2.8 TestboardSerialCable ConnectsGraphicTestingBoardtoCOMPortonPC 2.8 GraphicTestingBoardtoSmartTouchModulecable Fig2.9 GraphicTestingBoardtoSmartTouchModulecable Cableref:LACABLE009FDR Page13of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 2.9 NetworkcableforGraphicTestingBoard Fig2.10 NetworkcableforGraphicTestingBoard Cableref:LACABLE010FDR 2.10 SoftwareDVDcontaining ‘Arranger’ConfigurationPackage CommandPilotPackage DriversforUSBtoUARTConverter Documentation Specifications ExampleProjects,IconsandBackgroundPictures 2.11 Othercomponents 2xJumpers–toplaceSTMintoModuleInformation/USBMemoryStickUpdatemode 1xCR1220LithiumBatteryforSTMRealTimeClock Page14of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 2.12 Hardwarerequirements YouneedaPCtorunthe‘Arranger’packageandassociatedsoftware,andtotesttheSTM.Minimum specificationsforyourPCare: Pentiumlllorhigher 512MBormorememory Harddiskcapacityof1GBormore CD/DVDROM Screenresolutionofatleast800x600(1024x768recommended) WindowsXP32bitOS Page15of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 3. STMQuickStart TheSTMQuickStartprocedureisintendedtointroduceyoutotheconceptsoftheSTMandits interactionwiththe‘Arranger’packageandassociatedtools.TheQuickStartprocedurealonewill notequipyoutogenerateSTMprojects,butitwilldemonstratehowtoassemblethemodulesand showwhattoexpect. Alsooncompletionofthe‘QuickStart’procedureyouwillbereadytostartyourconfiguration exerciseusing‘Arranger’. 3.1 ConnectingtheSTMtoyourPC,andstartingthedisplay Fig3.1ConnectingtheSTMtoyourPC ConnecttheI/OCabletotheI/OconnectorontheSTMasshown. ConnecttheUSBtoUARTconvertertotheI/OCable. ConnecttheUSBCablebetweentheUSBtoUARTconverterandaUSBportonyourPC ConnectthePowerAdaptercabletothepowerinputconnectorontheI/OCable TheTFTdisplayshouldnowlightandshowtheAndersElectronicslogoandthetitle‘Smart TouchModules’ Page16of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ Note:TheConnectiontothePC’sUSBportisnotrequiredfortheSTMdisplaytolightandshow theLogo. 3.2Showmoduleinformation RemovepowerfromtheSTMmodule MountJumperJ204(STMType1)orJ301(STMType2)(See2.1formoreinformation) ReapplypowertoseemoduleinformationontheSTMdisplayasshowninFig3.1below: Powerdownandremovethejumperagaintorestorenormaldisplayoperation Fig3.2ModuleInformationdisplay 3.3 InstalltheUSBtoUARTDrivers EnsuretheSTMDVDsuppliedismountedonyourPC’DVDdrive ConnecttheUSBCablebetweentheI/OCableandaspareUSBportonyourPCifyouhave notalreadydoneso. Whenthisconnectionisfirstmade,thePCshoulddetectthepresenceoftheUSBtoUART converterasaUSBdevice.Ifso,thePCwillpromptyoutoinstallthreenewdrivers: Page17of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ o FDTUSBWriterToolA o FDTUSBWriterToolB o USBSerialPort FollowthedialogueandthePCwillinstallthesedriversfromtheDVD. 3.4 Installthe‘Arranger’package WiththeDVDstillmounted,navigateto D:\STM20101126\Tools(software)\EasyGraphicArranger\Program Where‘D’referencesyourDVDdrive. YouwillnowseetwoWinRARcompressedarchives: ANDERSGRAPHIC_Arranger(3.3.1.1)x64) And ANDERSGRAPHIC_Arranger(3.3.1.1)x86 Choosethex64versionifx64,andthex86versionifx86.UseaWinRARdecompressionutilityto extracttheSetup.exefileandrunit.Onsuccessfulcompletionoftheinstallationyouwillseean ‘ANDERSGRAPHIC_Arranger’IcononyourDesktop.Doubleclickonthistoopenthe‘ANDERS GRAPHIC_Arranger’UserInterface. 3.5 Install.NETFramework3.5 IfyourPC,doesnothave.NETFramework3.5,orhasanearlierversion,installasbelow: SelectandopentheWinRARarchiveasdescribedabove.Withinthearchive,opentheDotNetFX35 foldertoseedotNetFX35Setup.exe.RunthistoupdateyourPCto.NETFramework3.5. 3.6 Installthe‘CommandPilot’package WiththeDVDstillmounted,navigateto D:\STM20101126\Tools(software)\ANDERSCommand_pilot2(18311)\Program Where‘D’referencesyourDVDdrive. YouwillnowseetwoWinRARcompressedarchives: Page18of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ ANDERSCommand_pilot2(18311)(x64) And ANDERSCommand_pilot2(18311)(x86) Choosethex64versionifx64,andthex86versionifx86.UseaWinRARdecompressionutilityto extracttheSetup.exefileandrunit.Onsuccessfulcompletionoftheinstallationyouwillseean ‘ANDERSCommand_pilot2’IcononyourDesktop.Doubleclickonthistoopenthe‘ANDERS Command_pilot2’UserInterface. 4. EasyGraphicArrangerpackagecomponentsandlayout TheEasyGraphicArrangerPackage–or‘Arranger’forshort–providesanEditingtoolsetallowing youtobuildyourcontrolconfigurationbydragginganddroppingIcons,andaddingtextmessages. ThereisalsoaCommunicationstoolsetthatallowsyoutouseArrangerasasimulatorforyourtarget machine,sendingCommandStringstotheSTMviaaseriallink.Youcanthenobservetheresultson theSTM. DoubleclickonyourANDERSGraphic_ArrangerdesktopiconandArrangerwillstart.AUser Interfacescreenwillappear,readyforyoutoconfigure.SelectcontrolinputandoutputIconsfrom Arranger’sIconlibrary,anddraganddropthemintoalayoutasdesiredontheSTMdisplay.Fig4.1 showsanextremelysimpleconfigurationexample.Itcomprisesaswitchandayellowindicator lamp.Asonewouldexpect,theswitchisaninputdevicethatcanindicatetoyourtargetmachine thatitiseitherONorOFF,whiletheyellowindicatorlampisanoutputdevicethatcanbesetto eitherONorOFF,drivenbyavariablewithinyourtargetmachine. Fig4.1showsthelayoutandkeyareasoftheArrangerinterface.Arrangerisbasedaroundthe LayoutGridareathatcoversthemajorityoftheinterfacewindow.InFig4.1thisisdisplayingthe switchandindicatorlamp‘configuration’whichisbuiltinthesamewayasthemorerealistic configurationsyouwillgenerateforyourownapplication. Fig4.1alsoshowsthekeycontrolareasyouwillbeusing,labelledasbelow: 1. ProjectManager 2. PictureOrganiser 3. STMMemoryStatusInformation 4. EditPageToolbar 5. UARTFunctionToolbar Page19of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 6. PictureTypeandAttributeArea 7. PictureStatusWindow 8. PictureEffectModification TheArrangerinterfacealsocontainstwoothercontrolareaswhicharenotimmediatelyvisiblewhen youopentheArrangerinterface,butcanbeselectedfordisplayandinteractionwhenrequired.The firstconcernsCommandStringsandUARTcommunications,andthesecondconcernsFontsandText Messages. 1 3 2 3 4 5 LayoutGridarea 6 8 7 Fig4.1‘Arranger’UserInterfaceshowingkeyfunctionareas Page20of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 4.1 ProjectManager AB CDEFG Fig4.2ProjectManagerareaofArranger UsetheProjectManagertoLoadandSaveprojectfilesandrelatedinformation: A: CreateanewProject.ClearstheUserInterfaceandallowsyoutostartworkonanew,blank project. B: OpenProject.Allowsyoutoopenanexistingproject,suchasoneofthesamplesprovided ontheDVD,oranotherprojectyouhavebeendeveloping. C: Quickaccesstoprojectsyouhaverecentlybeenworkingon. D: SavetheprojectyouarecurrentlyworkingontoyourPC’sharddrive E: ToolsusedforoutputtingdatatoyourSTMmodule.AlsoallowsstartupofFontdialogue. F: ‘AboutEasyGraphicArranger’ G: ExitfromEasyGraphicArranger Page21of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 4.2 PictureOrganiser TheDVDshippedwithyourSTMcontainsasetofpictures, dividedintolibrariesfordifferentSTMpanelresolutions. UsingthePictureOrganiserareaoftheArrangerscreenas shownhereinFig4.3,youcanbrowseanappropriatelibrary, selectanddisplayacolumnofpicturestofulfilyourproject requirements.Theseactas‘Parent’pictures.Draggingand DroppinganyoftheseontotheLayoutGridwillcreate‘Child’ pictures.ApartfromBackgroundpictures,eachpicturecan havemorethanoneChild.Forexampleyoumaywishtohave fourSwitchesforyourtargetmachine,tostartdifferent processes.YoucancreatethisbyDraggingandDroppingthe Power01SwitchPairontotheLayoutGridfourtimesto createfourPower01Switchpairinstances. ArrangercompilestheChildpicturesandotherinformation ontheLayoutGridintoasinglebinaryfileforloadinginto STMmemory.Chapter5–AnExampleConfigurationExercise –willdescribethisinmoredetail. Thepicturesareavailableinthreemodes: Mode1(SinglePicture) Mode2(Button) Mode3(MultiIcon) Mode1,SinglePicturetypesareusedmainlyforLogosand BackgroundPictures.Infact,theArrangerclassifiesLogoasa typeofBackgroundPicture. Mode2,ButtonTypepicturesalwaysexistaspairs,suchas Power00andPower01.Thisisbecausetheyrepresent Buttons,Switches,Lampsandotherdevicesthathavetwo states–ONandOFF.Onecomponentofthepicturepairis usedtodisplaythedeviceinitsONstatewhiletheother displaysthedevice’sOFFstate. Page22of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ Fig4.3PictureOrganiser Mode3,(MultiIcon)picturesexistasasetsuchasCMeter00,CMeter02,CMeter03…..CMeter08to representameterthatcandisplay0,FullScaleoroneofsevenintermediatereadings.Notethe differentpositionsoftheredneedleinthevisibleCMeterpictures. NotetheBackgroundPictureCountsettingboxontheupperrightofthePictureOrganiserarea, shownassetto‘2’.Thisisbecausewewanttwobackgroundpicturesforoursimpleproject–aLogo picturewhichisinitiallydisplayedwhentheSTMispoweredup,andaBackgroundpictureforthe singlepagethatwillcontainourconfiguration.Largerconfigurationscancontainmorepages,each withitsownBackgroundpicture.Justclickontheboxarrowstoincrementordecrementthe numberofBackgroundpicturesassigned. TheAdditiontabatthebaseofthePictureOrganiserallowsyoutoselectpicturesfromthesupplied DVDpicturelibrariesoranothersource,andaddthemtothePictureOrganiserList,wheretheyare automaticallyappendedtotheend.BecausetheBackgroundPictureCountissetto2,thefirsttwo picturesareautomaticallyassignedasBackgroundtype,whiletherestareassignedasIcons.The ‘Insert’taballowsyoutoinsertpicturesintothelistratherthanappendingthem.Clickonany picture,andusethe‘Insert’functiontoplacethenewpictureimmediatelyaboveit.Clickonan unwantedpicture,thenonthe‘Delete’tabtodeleteit.The‘Addition’,Insertion’and‘Delete’ commandscanalsobeaccessedbyrightclickingonanypictureinthePictureOrganisercolumn. YoucanalsobuildyourownpicturelibrarieswithimagesforuseasLogoorBackgroundpictures,or controlIcons.TheseshouldbeBitmap(.bmp)orJPEG(.jpg)files.NotehoweverthatPhotoshopJPEG filesarenotsupported.Ifyouhavesuchfiles,convertthemtoacompatibleformatusingACD. Boththehorizontalandverticalpixelcountshouldbeamultipleof8.Attemptstoloadimagesnot complyingwiththisrequirementwillinvokean‘ImageSizeNotSupported!’message. AlsonotetheRadiobuttonpairatthetopofthePictureOrganiserarea,where‘Picture’isshownas selected.If‘Digit/Font’isselectedinsteadthePictureOrganiserareabecomesaFontareainwhich textmessagescanbeassembledanddroppedontothedisplaygrid.ParametersincludingFonttype, size,colourandbackgroundcolourcanbedefined.4.2.1belowdescribesthisinmoredetail. Page23of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 4.2.1FontOrganiser ByclickingontheDigi/FontradiobuttonatthetopofthePicture Organiser,aFontOrganiserliketheoneontherightcanbe displayed. TheFont‘Anders1’hasbeencreatedusingArrangereditingtools. Theseallowchoicesoffonttype,size,colour,backgroundand positionoffontwithinitsbackgroundarea.Thecharactersetcan alsobechosen.(ieA,B,Cetc,a,b,cetc,1,2,3etc) TheFontboxcanthenbedraggedoverthelayoutgrid.Thisaction willopenupalarge‘SelectFont’dialoguebox,allowingyouto composetextmessageswhichyoucandragintopositionasdesired onthescreen. Note:EachTextMessagehasamaximumsizeof16characters. YoucanAddotherFontsto,orDeleteFontsfromtheFont OrganiserbyusingtheAdditionandDeletebuttonsatthebaseof theOrganiser. Chapter5.3laterintheManualshowshowtocreateFontsand TextMessages. Fig4.4FontOrganiserarea 4.3 MemoryArea TheMemoryArea,shownasArea3inFig4.1,andshownagainwiththePictureOrganiserareainFig 4.3above,comprisesahorizontalstatusbartitled‘Memory’andaverticalstatusbartitled‘Cache’. Neithercapacityshouldbemorethan95%.ThebarsrefertomemoryareaswithintheSTM, displayingtheirusageandremainingcapacity.‘Cache’comprisesfastbatterybackedSDRAM,while ‘Memory’isslowerbutlargercapacityFlash.Tomaximiseperformance,picturesthatareused frequentlyshouldbeselectedforCacheduringconfiguration(See4.6below).TheSTMwillcopy suchpicturesfromitsFlashmemorytoitsCacheduringpowerup. Whileaddingpicturesandtexttoyourconfiguration,itisimportanttoallocatetheseequallyto avoidexceedingcapacityinonememoryareawhileunderutilizingtheother. Page24of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 4.4 EditPageToolbar A B C D E Fig4.5EditPagetoolbar TheEditPageToolbarallowsyoutomatchyourLayoutGridtoyourtargetSTMresolution.Clickthe LogotabtodisplaytheLogoareaorthePage1tabtodisplaythefirstpageforyourconfiguration layoutasyoubuildit.EditPageToolbarfunctionsareasbelow: A: SetPanelSize.UsethistomatchthedisplayresolutionofyourtargetSTM.Clickingthiswill displayaPanelResolutionboxallowingyoutochoosebetweenStandardandOtheroptions. Standardoptionsreflectstandarddisplayresolutions,including800x480forthe7”STM usedinourexample.‘Others’allowsyoutoincrementordecrementhorizontalandvertical resolutions,apixelatatime,toaccommodateanyrequiredprofile. B: AddPage:Allowsyoutoaddapagetorundifferentbackgroundpicturesandanincreased numberofactiveIconsifyourapplicationrequires. C: InsertPage:Ifyouwanttoinsert,forexample,anewpagebetweenPage2andPage3,then Clickonthe‘Page3’tab Clickonthe‘InsertPage’function AnewPagewillbeinsertedbetweenPage2andPage3. D: DeletePage:Ifyouwishtodelete,forexample,Page4,thenclickonthePage4taband thentheDeletePagefunction.Page4willbedeleted. Page25of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ Note:Thereisno‘AreyouSure?’function–thepagewilldisappearimmediatelytheDelete Pagefunctionisclicked,evenitispopulatedwithaconfiguration. E: 4.5 Grid:ClickonthistodisplayacoordinategridonallpagesexcepttheLogopage:Clickagain toremovethegriddisplay. UARTFunctionToolbar A B C Fig4.6 UARTFunctionToolbar TheUARTFunctionToolbarsupportsyouwhenyouwishtorunserialcommunicationswithyour STM.Thefunctionsareintroducedhereandexplainedinmoredetaillater. A: SelectMode.ClickonthistodisplayCommandStringsandSerialPortSettings insteadofPictureinformationbelowtheLayoutGridarea. B: SelectCommandFormat:ThisaffectshowCommandStringsareformattedand packagedfortransmissionfromyourPCacrosstheseriallinktotheSTM. C: CopyCommandtoClipboard.Asyoudraganddroppicturesandtextmessagesonto theLayoutGrid,ArrangergeneratesCommandStringsdescribingeachpicture’s positionontheLayoutGrid–whichwillalsobecomeitspositionontheSTMscreen. YouwillneedtousetheseCommandStringsaspartofyourcontrollingsoftware whenyouwanttodrivetheSTMfromyourtargetmachine.Thisfunctionallowsyou highlightandcopyoneormoreCommandStringstoyourclipboard,fromwhereyou canpastethemintoyourowndocumentationorsoftware. Page26of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 4.6 PictureTypeandAttributeArea Fig4.7 PictureTypeandAttributearea ThisareaofArrangerallowsyoutosetupattributesappliedtotheParentpictureslistedinthe PictureOrganisercolumn–see4.2above.AttributesappliedtoanypicturewithintheOrganiser areawillbydefaultalsoapplytoanyofits‘Child’picturescreatedbydragginganddroppingintothe LayoutGrid. TheSelectcomponentmodedropdownmenuallowsyoutospecifythemodeofanobjectbefore youdropitontothelayoutgrid.Modescanbe: Mode1(SinglePicture)MostlyusedforLogosandBackgroundPictures Mode2(Button)UsedforSwitches,Lampsandanyother2stateON/OFFdevices Mode3(MultiIcon)(Meter)UsedforMetersorotherMultistatedevicesthatcanbe at0,FullScaleoranintermediatevalue. Mode4(Digit/Font)fordisplayingTextstrings TheMemory/CachedropdownmenuallowsyoutochoosewhethertostoreIconsortextinthe STM’sCacheorMainMemory–tradingoffperformanceagainstavailablestoragearea. TransparentisanattributethatcanonlybeappliedtoIconsstoredinSTMcache.Bydefaulteach Icon’sTransparencyissetto0.ThismeansthattheIconwillappearasasolidobjectontheSTM screen,entirelyobscuringtheareaofbackgroundpictureitcovers.Transparencyiseffectivelysetto 0ifthecheckboxnexttothe‘Transparency’scrollboxisunchecked.Ifitischecked,thescrollbox canbeusedtoincrementtheIcon’sTransparencytoanyvalueupto15,whentheBackground picturedominatestheIcon.TheseeffectscannotbeseenontheArrangerscreen,butonlyonthe IconsastheyappearontheSTMTFTdisplay. SieveiscontrolledinasimilarwaytoTransparency.Fig4.8showstheeffectofchanging TransparencyandSievesettings:TopLeft=0.TR=4,BR=8andBL=15. Page27of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ Transparency Sieve Fig4.8 EffectofTransparencyandSievesettingsonGreenLampIcon,visibleonSTMTFTscreen TheremainingoptionsinthePictureTypeandAttributeareaapplytoMode3MultiIcondevices suchasMeters,whichcanhaveseveralstates.Insomesituations,suchasademosystem,itmaybe desirabletoshowametercyclingthroughallofitspossiblestatestoshowwhatcanbedone. AlternativelyamultiIconsetmaybecreatedtoimplementananimateddisplayotherthanameter. Inothersituations,suchaswhentheSTMisbeingdrivenbyyourtargetmachineinareal application,themetershouldremainatonestateuntilaCommandStringfromthetargetmachine callsforadifferentstate.Theparagraphsbelowdescribehowtosetuptheresponseyourequire withtheoptionsavailable. Sequential/Order=SequentialANDRepeat/None=Repeat. TheCMeterIconontheSTMdisplaywillincrementfrom0,throughallofitsintermediatestatesto FullScale.Itwillthenresetto0andrepeatthecycleuntilfurtherinput Sequential/Order=SequentialANDRepeat/None=None. TheCMeterIconontheSTMdisplaywillincrementfrom0,throughallofitsintermediatestatesto FullScale.Aftercompletingthisonce,itwillremainstaticuntilfurthercommand. Sequential/Order=Order(Repeat/None=Don’tcare) NormallyaMode3AnimationcomprisesasetofpreconfiguredIcons(suchastheCMeterexample) wheretheentiresetisdroppedontotheLayoutGridtoperformasasingleanimatedIcon.Choosing theOrderoptionallowsyoutoassignuptofourIconsintothefourboxeswithinthePictureStatus Window.Theycanthenoperateasoneanimation. Page28of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ TimerClassandTimes Thesecanbeconfiguredtogethertodefinethetimeintervalbetweensuccessiveincrementsina sequentialmeterdisplay. TimerClassA=1/20thSec.(50mS) TimerClassB=1S Timesisamultiplicationfactorthatcanbesettoanyvaluefrom0to127.Forexample,with settingsofTimerClass=BandTiming=2,therewillbea2Sdelaybetweeneachincrementofthe CMeterdisplay PID:AmaximumoffourMode3Iconsareallowedinanyoneconfiguration,labelledasPID0toPID 3.Setthemaximumnumberhere.Attemptstoconfiguremorethanthiswillcauseerrormessages. Attribute/Commandradiobuttons:TheseswitchthelowerpartoftheArrangerdisplaybetween thePictureStatusWindow(discussednext)andaCommandWindow.TheCommandWindowshows theCommandStringgeneratedforanyIcon,whichcanbedisplayedbyclickingontheIcon.The WindowallowstheCommandString’sformattobevariedbetweenFDTProtocolandCcoding compatibility. HoverthemousepointeroveranyIconontheLayoutGridtoviewitsAttributesettings. Page29of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 4.7 PictureStatusWindow Whereas4.6–PictureTypeandAttributeArea–concernedtheparentpicturesinthePicture Organiserarea,thePictureStatusWindowandPictureEffectModificationareaconcernthe individualChildpictureswithintheLayoutGrid.Optionsfromtheseareasallowyoutooverride someoftheattributesthattheChildpicturesinheritfromtheirParents.So,twoChildpicturescan havedifferentattributeseventhoughtheyweregeneratedfromthesameParent.DifferentMeters couldrunondifferentTimers,forexample. Fig4.9 PictureStatusWindow Fig4.9showsthataCMeterIconhasbeenhighlightedwithintheLayoutGrid.ItisPIDRef1:Thefirst CMeterontheGridisPIDRef0.ThePIDRefcanbechangedaslongasnotwomultiIcondevices havethesamereference,andthePIDvalueisnogreaterthan3. Total=3.Bydefault,ifamultiIcondeviceisinSequentialmode,itwillcyclethroughitsfullrangeof settings–9inthecaseoftheCMeterIconprovided.Howeverthiscanbelimitedifsodesired.Fig 4.8showsalimitof3:OntheSTMdisplay,theCMeterwillincrementto3,thenstoporresetto0 readyforthenextcycle.Inthiscase,theMeterisinRepeatmode. See4.8belowforinformationonthe‘OK’buttonwhichappliesinthisareaaswell. Page30of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 4.8 PictureEffectModification Jogcontrols Fig4.10PictureEffectModificationarea TheaboveillustrationshowsthePictureEffectModificationAreaasitwouldappearifitcouldallbe seenatonce.InrealitytheScrollBarnexttotheOKbuttonhastobeusedfornavigationwithinthe Area. Clickonanyiteminthelayoutgrid,andthePictureEffectModificationareawillshowthestatusof thatitem,andallowyoutomakechanges. TheMemory/CacheboxallowsyoutoviewandchangethestorageareafortheselectedIcon. TheLocationboxesdisplaytheXandYcoordinatesoftheselectedIcononthelayoutgrid.Theco ordinatereferencesapplytotheTopLeftoftheselectedIcon.Youcanchangethesebyusingthe arrowstoincrementordecrement,orbytypingvaluesdirectlyintotheboxes. TheJogcontrolarrowsallowyoutoadjustyourIcon’spositiononthelayoutgrid.Thedialoguebox aboveallowsyoutoadjusttheresolutionofthearrowjogcommands.Thisisausefulfacilityforfine adjustmentafterdragginganddroppinganIconapproximatelyintoitstargetlocation. YoucanalsochangetheTransparencyandSievesettingsforindividualLayoutGridIcons,and Sequential/Order,TimerandTimessettingsformultiIcondevices.UsetheOKbuttontosaveany changesmadehereorinthePictureStatusWindow.FortheLayoutGridIconselected,thisaction willoverwriteattributesinheritedfromtheparentIconintheOrganiserarea. Page31of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 5. AnExampleConfigurationExercise Theprevious‘IntroductiontoArranger’chapterallowedyoutoexploretheuserinterfaceandgain somefamiliaritywithitsvariouscontrolareas.Armedwiththisknowledge,youcannowbuildand testasimpleconfiguration,whichwillcoveralltheproceduresyou’llneedtouseforyourown,real application.ThisChaptertakesyouthroughthesimpleconfigurationprocess. Let’ssupposeoursimplemachinehasacontrolpanelcomprisinganON/OFFswitch,apower indicatorlampandalevelindicationmeter.Wecanachievethisusingaconfigurationlayoutas shownbelowinFig.5.1: Fig5.1Target‘EasyMachine’layout Page32of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 5.1 PopulatingyourPictureOrganiser OnyourPC,openyourEasyArrangerpackagebydoubleclickingonitsdesktopIcon.Youwillseethe UserInterfacedisplay,readytoacceptyourconfiguration. EnsuretheDVDsuppliedisinyourPC’sdiskdrive. SettheArrangerlayoutgridresolutiontomatchthatoftheSTMpanelyouhavepurchased.Clickon the‘SetPanelSize’Iconinthe‘EditPage’area(SeeFig4.1)andchoosetheStandardorothersize resolutionyourequire.Theexampleusesa7”displaywithan800x480resolution. Inthisexampleconfiguration,onlytwobackgroundpicturesareneeded;theLogo,andabackground picturefortheoneconfigurationpageused.Therefore,setthescrollboxintheupperrightofthe PictureOrganiserareato‘2’.OnceaBackgroundpicturehasbeenloaded,youcannotdecreasethe backgroundpicturenumberinthescrollboxbelow2withoutdeletingthepicture. Nowyoucanstartorganisingthepicturesyouwant,beginningwithalogofordisplayontheSTM screenduringstartup.Clickthe‘Addition’tabatthebaseofthePictureOrganiserareaandyouwill see: Browsebutton Fig5.2PictureLoader Asthelogowillbefulfilledwithasinglepicture,leavethe‘Single’radiobuttonchecked.Clickonthe BrowsebuttonandnavigatetotheDVDdriveroot,andfromthereto: D:\STM20101126\Tools(software)\EasyGraphicArranger\Example\FG070WW001 00R\Standard\800x480_Standard_0.11.23.0\image Page33of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ NotethatfolderFG070WW00100Randitscontentshavebeenchosenbecausetheexample applicationisusinga7”displaywithan800x480resolution. Fromthesetofimagesdisplayedatthislocation,choosetheonetitled‘800X480’andseeitappear intheboxnexttotheBrowsebutton.Clickthe‘Tick’buttonandthe‘800X480’picturewillbe uploadedintothefirstpositionwithinthePictureOrganiser. Repeattheexercise,choosingfile‘WorkPageNew’.ThiswillbecometheBackgroundPictureforyour STM’sdisplayscreen. NowfortheIcons.Clickthe‘Addition’tabagaintoseethePictureLoaderbox.Thistime,however, clicktheMultiselectradiobuttonwithinthebox,becausetheIconyouareabouttoselecthastwo parts–anONandanOFFimage.ClicktheBrowsebuttonand,usingSHIFT+LEFTBUTTON,select thefilesPOWER00andPOWER01.TransferthemintoArranger’sPictureOrganiser,asyoudidwith theBackgroundPictures.YouwillseethetwoIconsdisplayed;thefirstshowingtheswitchONand thesecondshowingtheswitchOFF. IfyouwishtosetTransparencyorSieveAttributesforMode2Icons,settheMemoryAttributeto Cache.Then,followtheprocedurein4.6–PictureTypeandAttributearea. Notethataheading‘Icon’hasbeencreatedforthisandallsubsequentpictures,becauseyouhave informedArrangerthatthereareonlytwobackgroundpictures–whichhavenowbeenassigned. RepeattheexercisetoaddfilesLampGreen00andLampGreen01,whichshowagreenlampOFFand ONrespectively.Repeatonceagain,addingasetof9filescalledCMeter00toCMeter08.CMeter00 showsthemeterat0,CMeter08showsfullscaleandtheotherfilesshowthemeteratintermediate values. Page34of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 5.2 BuildingyourconfigurationontheLayoutGrid WhenyoursetofbackgroundpicturesandIconsiscomplete,andvisiblewithinthePicture Organiser,youcanstartyourconfigurationontheLayoutGrid,beginningwiththeLOGOpicture. First,gotothe‘PictureTypeandAttribute’areaofArranger(SeeFig.4.1)andusetheModedrop downmenuboxtoselectMode1(SinglePicture).ThenusetheMemory/Cachemenutoselect MemoryforstorageoftheLOGOpicturewithintheSTM. NowclicktheLOGOtabatthetopofthegrid,toshowtheLOGOpage.Singleclickonthefirst picturelistedunder‘Background’inthePictureOrganiser,tohighlightit.Next,movethecursorto anypartofthelayoutgridLOGOpage,andsingleclickagain.Youwillseeyourchosenpicture– ‘800X480’–filltheLOGOpageandaccordinglybecometheLOGOimage NowclickthePage1tabandrepeattheexercisetoplacethesecondpictureinPictureOrganiser– WorkPageNewintheexample–asthebackgroundpictureforthelayout.Thereisaslightdifference betweenthisandtheLOGOpictureplacementprocedure:Thereisnoneedtohighlightthepicture. Instead,doubleclickanywhereonthePage1gridlayouttoseethefollowing‘Background’dialogue boxappear: Fig5.3:BackgroundPictureSelectorbox Clickthe‘Up’arrowtoincrementthepictureitemnumberto1,whichrefersto‘WorkPageNew’in ourexample.Thenclickon‘V’toplaceitastheBackgroundPictureforPage1. ToDeletethispictureasPage1’sBackground,youcanrepeatthisprocedure,usingthe‘X’button. NowyoucanplacetheIconsontoPage1,startingwithPower00andPower01,whichrepresentthe DualstateON/OFFSwitch.UsetheModedropdownmenuagain,changingtoMode2(Button). Thiscoversall2statedevices.SelectCacheMemoryasthestorageareawithintheSTMforthe Switch.UsingyourmousewiththeShiftkey,highlightbothoftheSwitchIcons,thendragthemto yourdesiredlocationontheLayoutgrid.YoucanusetheJogarrowslocatedwithinthePictureEffect ModificationArea(SeeFig4.1)toadjusttheIcon’spositiononthescreen. Page35of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ Note:Ifyoudonotcompletealloftheaboveactions,youwillnotbeabletodroptheIconontothe Layoutgrid.Insteadyouwillseeamessagesaying‘Error’. Note:OnlyoneIconisvisible,butbothhaveactuallybeenplaced,withoneundertheother.Clickon thevisibleIcon,andyouwillseebothdisplayedinthePictureStatusWindowareaofArranger.(See Fig.4.1).ThegreyedoutboxeshavenorelevancetoMode2. Note:WhentheseIconsareloadedasapair,Power01(showingSwitchON)appearsfirstinthe PictureOrganisercolumn,withPower00below.ThisordermeansthatwhentheIconpairisdragged anddroppedontotheLayoutGrid,theSwitchwillbeshowninONposition.Ifyouwouldlikeitto insteadappearontheLayoutGridshowingOFFposition,youcanretrievetheOFFandONIcons singlyfromtheDVDlibraryfile,forcingtheOFFIcontothehigherpositiononthePictureOrganiser column.ThisinturnwillrendertheOFFIconasvisiblewhentheIconpairisdraggedanddropped ontotheLayoutGrid. Alternatively,oncetheIconsareplacedontheLayoutGrid,youcanswitchthembyrightclickingon them: BringtoTop.ThisensuresthattheselectedIconwillappearontopofanotherIconatthe samecoordinates SendtoBack.ThisensuresthattheselectedIconwillappearunderneathanotherIconatthe samecoordinates (Ifyouclick‘BringtoTop’or‘SendtoBack’ontwooverlappingIcons,themostrecently selectedIconwins). YoucanalsoDeleteanIconfromtheLayoutareabyrightclickingonitandselecting ‘Delete’.ThishasnoeffectontheparentIconinthePictureOrganisercolumn. RepeattheprocessfortheGreenLampIconpair. ToplacetheCMeterMultiIconset,startbyselecting‘Mode3(MultiIcon)(Meter)’onthe’Mode’ menu.NextsettheotherMultiIconAttributes(Referto4.6PictureTypeandAttributeAreafor informationontheseAttributes’meaningsandhowtochangethem): Sequential/Order PID TimerClass Times Repeat/None Next,usethemouse+Shiftkeytohighlightall9CMeterIcons(CMeter00toCMeter08),thendrag anddropthemontothedesiredlocationwithintheGridLayoutarea. Page36of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ YouwouldprobablyrequiremorethanoneSwitch,LamporMeterinarealapplication.Ifso,you cansetupmultipleIconsbyusingdraganddroptocreatemoreChildIconsontheLayoutGridfrom eachParentonthePictureOrganiser.Bydefault,theChildIconswillinherenttheAttributesoftheir Parents.IfyouwishtochangetheseforoneormoreindividualChildIcons,dosousingthePicture EffectModificationareaofArranger–see4.8formoredetails. 5.3UsingFontsandgeneratingTextMessages ThesetofIconsforourexampleisnowcomplete.NextwecanprepareacoupleofFontsanduse themtowriteTextMessages.IntheProjectManagerarea,(SeeFig4.1)click:Tools/Font/Systemto opentheFontdialogueboxasinFig5.3below: Fig5.4FontDialogueBox Oncetheboxisopen,typethecharactersetrequiredintothecharacterboxatthebaseofthe DialogueBox.Thiscanincludeupperandlowercaseletters,numbersandpunctuationmarks. Youcanthenmodifytheappearanceofyourcharactersetasbelow: ClickontheFontbuttontoseeachoiceoffonttypes(Arial,Calibrietc),styles(Regular, Italic,BoldandBoldItalic)andsizes(8to72points).YoucanalsochooseStrikeoutand Underlineeffects,andScripts(Western,Hebrew,Cyrillicetc). Page37of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ UsetheWidthandHeightarrowboxestosetthesizeofthecharacterbackgrounds UsetheHorizontalandVerticalarrowstopositionthecharacterswithintheirbackground area.The‘Reset’buttonrestoresthecharacterstotheTopLeftcorneroftheirbackground areas. UsetheFColorandBColorbuttonstoassignForegroundandBackgroundcoloursforyour Font.BackgroundisoptionalandisselectedusingtheTickboxtotherightoftheBColorbox. GivetheFontanamesuchasAnders1intheexample,andclickonSAVE.ClosetheFont Dialoguebox. GotothePictureOrganiserarea(SeeFig.4.1)andclicktheDigit/FontradiobuttontoseetheFont Organiserarea.NowclickthearrowonthedropdownmenuatthebaseofthisareatoseeAnders1 orwhatevernameyouhaveusedforyourFont.SelecttheFont,thenclicktheAdditionbuttontothe rightofthemenuandyouwillseeyournewFontaddedtotheFontOrganiserlist.Ifrequired,repeat theexercisetogeneratedifferentFontswithdifferentappearances. Tocreateamessageonthelayoutgrid,draganddroptheappropriateFontfromtheOrganiseronto thelayoutgrid.YouwillseeaMessageGeneratorboxasbelowopen: Fig5.5MessageGeneratorBox Buildyourmessagebyclickingoneachcharacter,thenclickingtheRightArrowbutton.Remove charactersusingtheLeftArrowbutton,andshufflethemusingtheUpandDownbuttons.When yourmessageiseditedtoyoursatisfaction,clicktheOKbuttontoseeitappearonthelayoutgrid. DragitandusetheJogbuttonstopositionitasrequired,asyouwouldforanIcon. Page38of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 5.3.1 UsingCustomFonts Arrangersupportstheuseofspeciallypreparedgraphicsfontsaswellasthestandardfontset.Inthe ProjectManagerarea,(SeeFig4.1)click:Tools/Font/SystemtoopentheCustomFontdialoguebox asinFig5.6below: Fig5.6CustomFontDialoguebox Givethefontanameforusebyarranger–writethisintotheFontNamebox AdjustthesizeofthewordboxusingtheWidthandHeightcontrols Usethe‘Total’controltodefinethenumberofsquarescontainedwithinthebox–for example,26forasinglealphabetrendition. ReadinthecustomcharactersusingtheLoadImagebuttontonavigatetoandselectthe appropriatefiles Note: Characterresolutionallowed: o L=1–4095;W=1–1024 Page39of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ o Characterresolutionmustbedivisibleby8 SavethenewFonttoArranger YoucannowusethenewFonttogeneratetextmessagesinthesamewayasthestandard Fonts.ClicktheDigi/FontradiobuttonatthetopofthePictureOrganiser,thenselectthenew FontusingtheAdditionbuttonatthebase.OnceitappearsintheFontOrganiserlist,youcan dragitintotheLayoutGridtoopentheMessageGeneratorbox. 6. Saving,uploadingandtestingyourconfiguration Asyouhaveseen,ArrangerallowsyoutochooseIconsandbackgroundpicturessuitableforyour application,andlaythemoutasrequired.Atthispoint,itisworthconsideringthenatureofthe informationthatArrangerhascompiledasaresultoftheconfigurationprocess.Thiscomprises: Asetofjpegorbmpimages(Logo,BackgroundPictureandIconimagesthatyouhave assembledintoyourconfiguration) FurthersetsofimagescontainingthecharactersdefinedduringFontconfiguration Attributesfortheseimages,suchastheirMode,MemoryTypeandTransparency XYcoordinateinformationforeachIcon,definingwhereitistobepositionedonthe LayoutGridandthereforetheSTMscreen. TomakethisconfigurationactiveonyourSTM,youneedtoloadthepictureandtextimagesand theirattributesintoyourSTM’smemory,thendisplaythemusingCommandStringsthatcan referencethemusingtheirXYcoordinates. ArrangerandtheSTMincludeasetoftoolsallowingyoutodothis.Functionsareavailableto: SaveyourconfigurationasaProjectonyourPC’sharddrive OutputaBinaryprojectfileimagetoaUSBFlashmemorystick DownloadtheBinaryfilefromtheUSBsticktotheSTMMemory. SwitchArrangerintoCommandmode,fromwhereyoucan: o SetupcommunicationbetweenArrangerandtheSTM,usingtheseriallinkbetween yourPCUSBPortandtheSTM’sSerialPort.ThislinkusestheUSBtoUART Convertersupplied. o ViewtheCommandStringsgeneratedbyArrangerduringtheconfigurationprocess o Sendthem,oneatatime,totheSTMandviewtheireffectontheSTM’sdisplay screen. Page40of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 6.1SavingyourconfigurationasaProjectonyourPC’sharddrive Clickonthe‘SaveProject’menuIconwithintheProjectManagerareaatthetopoftheArranger screen.SeeChapter4.1–ProjectManagerfordetailsonlocatingthis. Choose‘Saveas’fromthedropdownmenutoseeaWindowsdialogueboxthatwillletyounavigate toanywhereonyourPCornetworkorcreateanewfolderforstorage.Onceyouhavesavedyour configurationasaProjectfolder,youwillseeithasastructureasbelow: TestProj1.fdt TestProj1 File Image Output TFont TestProj1.fdtisyourArrangerprojectfile.Whenyouwanttoworkontheprojectagain, openArranger,gototheProjectManagerareaandusetheOPENProjectbuttontonavigate toandreloadTestProj1intoArranger. The‘File’foldercontainstextfileswithattributeinformationfortheconfigurationpictures. The‘Image’foldercontainsasetofjpegorbmpimagesasassembledduringconfiguration. The‘TFont’foldercontainsfurtherfolders,oneforeachFontcreatedduringconfiguration. Withineachofthesefoldersisasetofjpegimages,oneforeachcharacteroftheFont. The‘Output’foldercontainonebinaryfile–FGCIMAGE.BIN–whichisintendedforloading intoSTMmemoryandcontainsallinformationrelatedtothebackgroundpictures,Iconsand textmessages,andtheirattributes. ThisfilecanbecopiedontoaUSBmemorystickfortransfertoSTMmemory.Thisprocessis describedmorefullylaterinthisManual. Page41of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 6.2 OutputyourconfigurationasaBinaryfileontoaUSBmemorystick OnewayofachievingthisusingProjectManagerhasbeendescribedabove,butArrangerhasamore explicitwayaswell.Clickonthe‘Tools’menubuttonwithintheProjectManagerareaatthetopof theArrangerscreen.Inthemenu,clickon‘Output’toseetheSettingdialogueboxasshowninFig 6.1below: Fig6.1‘Setting’dialogueboxforBINfileoutput Aftermakingthesettingsrequired,clickthe‘OK’buttontoseeaWindowsdialoguebox.Usethisto storetheFCGIMAGE.BINfileinyourUSBmemorystick’srootdirectory. Page42of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ 6.3 DownloadingaProjectBINfilefromUSBmemorysticktoSTMmemory OnceyouhavepreparedyourUSBmemorystickasabove,youwillhaveasinglefilecalled FCGIMAGE.BINinitsrootdirectory.NowusethefollowingstepstoloadthisintoyourSTM. NotethatyourSTMcanhaveeitheraType1oraType2controllerboard,dependingonyourSTM TFTdisplaysize.SeeChapter2.1fordetails.Thedefaultjumper,LEDandUSBPortreferencesshown belowareforType1boards;thereferencesinbracketsapplytoType2boards. 1. EnsureyourSTMispoweredOFF. 2. Mountajumper(provided)ontoJ204(J301). 3. PlugtheUSBmemorystickintoUSBport201(303)onyourSTM 4. ApplypowertotheSTMusingthepoweradapterprovided. 5. TheSTMdisplaywillshowamoduleinformationscreen 6. ThegreenLED(LED101)shouldlight,showingPowerOK. 7. TheSTMBuzzershouldsoundtwice 8. RedLED101(201)shouldstartflashing,showingthattheautomaticuploadhasstarted.It willcontinuetoflashthroughouttheupload.Thiscouldtake5–30minutesdependingon FCGIMAGE.BIN’sfilesize. 9. Whentheuploadhascompleted,theSTMBuzzerwillsoundonceandLED101(201)will extinguish. 10. Removepower 11. RemovetheJ204(301)jumperandUSBmemorystick 12. Reapplypower WhentheSTMpowersupagain,itshoulddisplaytheLogoscreenaschosenduringconfiguration. TheSTMwillnotstartshowingIconsoranythingelseuntilitreceivesCommandStringsfrom Arranger(tobedescribednext),CommandPilotoryourtargetmachine. 6.4 DrivingtheSTMusingArranger AfterloadingtheBINimageintotheSTMasdescribed,removepowerfromtheSTM.Connectthe STM’sserialporttoaUSBportonyourPCusingtheUSBtoUARTboardandcablesprovided.See2.2 and2.3fordetailsofthese.ReapplypowertotheSTM. Ifitisnotalreadyrunning,startArrangeronyourPC.Youcanthenretrieveyourprojectfromits harddrivelocationusingeithertheOPENProjectbuttonorthedropdownSELECTProjectmenuin theProjectManagerareaatthetopoftheArrangerscreen. YouneedtofindoutwhichPCCOMportisbeingusedbytheUSBconnectiontotheSTM. Page43of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ Windows’‘DeviceManager’cantellyouthis. Now,youcanconfigurethecommunicationslinkbetweenArrangerandtheSTM.Clickonthe‘Select Mode’buttonwithintheUARTFunctiontoolbarattheleftoftheArrangerscreen.Youwillseea UARTcommandandcontrolareaasbelow: Fig6.2UARTcommandandcontrolarea ThetoppartofthisareacontainsasetofCommandStringsthatpositionalltheBackgroundPicture, IconandTextMessageobjectsonPage1.Thedropdownmenuboxesbelowthisareusedto configureandstartyourSTMseriallink.Configureasbelow: ‘Port’shouldbetheCOMPortassignedbyyourPC’sDeviceManagertotheUSBSTMlink ‘Baudrate’shouldbe115200 ‘Databits’shouldbesetto8 ‘Parity’shouldbesettoNone ‘Stopbits’shouldbesettoOne Clickthebuttonlabelled‘OffLine’.IfyourhardwareandconfigurationfortheSTMPCseriallinkare OK: Thebuttonshouldsay‘OnLine’ Thered‘LED’shouldchangetogreen The‘RightArrow’buttonshouldchangetogreen TheobjectsontheLayoutGridarenolongereditable.HoweverclickingontheGreenLamp orPowerSwitchwillcausethemtovisiblychangestatewhilethemousebuttonisheld down. Atthisstage,yourSTMdisplayshouldstillshowtheLogoimageandnothingelse. Page44of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ NowclicktheRightArrowandyouwillseethePage1BackgroundpictureappearontheSTMscreen, ontopoftheLogo.OntheArrangerscreenyouwillseeabluehighlightlineappearacrossthefirst CommandString(labelledBackGround:0xF10x0A…..).ThisistheCommandStringthatcalledthe BackgroundpicturefromSTMmemoryandplaceditontheSTMscreen.Thebluehighlightline showsthisasthemostrecentlysentCommandString. ClicktheRightArrowagainandseetheGreenLampONIconappearontheSTMscreen.Theblue HighlightbarhasincrementeddowntothenextCommandString–theonethatcalledtheGreen LampONIconfromSTMmemorytoSTMdisplay.Clickagain,toseetheGreenLampOFFIcon appearontheSTMscreen,coveringtheONIcon.ContinueclickingtoseetheotherIconsandtext messagesappearinthesameway.WhenyourentirePage1configurationisshowingontheSTM screen,theblueHighlightbarwillbeoverthelastshownCommandString. 6.5 MoreaboutCommandStringsandprototyping BynowyouhavebuiltyourconfigurationusingArranger,transferredittoyourSTMusingaUSB memorystick,andprovedthatitworksusingCommandStringsgeneratedandissuedbyArranger. ThenextstageinyourprojectwillbetointegratetheseautomaticallygeneratedCommandStrings withothersthatyouwriteintoasourcefilethathandlestheentirecontrolactivity–displayingIcons ontheSTMscreeninresponsetoeventsonyourtargetmachine,andrespondingtotouchscreen eventsifyourSTMhasatouchscreen. TheSTMkityouhavepurchasedfromAndersincludestoolstohelpyoudothis: 6.5.1 CommandPilot AsFigs6.3and6.4belowshow,CommandPilotisasoftwaremodulethatrunsonyourPCalongside Arranger.YoucanuseCommandPilottoactlikeyourtargetmachineinsendingCommandStringsto theSTM,whilecontrollingandrecordingtheCommandStringssent.Aftersettinguptheserial communicationsprotocolasshowninFig6.3,youcanprepareasourcefileofcommandstrings, thenrunaprogramtostreamthemtoyourSTM.YoucanalsosendoneCommandStringatatimein SingleStepmode.Youcanelecttologyourtransmittedandreceivedfiles,andSavethemtoahard driveifdesired. Page45of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ Fig6.3 CommandPilotscreen,showingCommunicationsProtocolsetup Page46of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ Fig6.3 CommandPilotscreen,showingsourcefileoutput 6.5.2 GraphicTestingBoardandcables TheGraphicTestingBoard(GTM)isahardwaremodulewhichyoucanuseasatargetmachine, connectedviaaseriallinktoyourSTM.YoucanloadaprogramcontainingCommandStringsinto theGTM’smemory,thenprompttheonboardmicrocontrollertorunthisprogramandsendthe CommandStringstotheSTM. TheGTBhas2jumpers,4pushbuttonsand8LEDstoassistinsettingupandrunningprograms.It alsohasa65x100mmbreadboardareawithPTHholesona2.54mmgrid. Page47of47 /ŶƚĞƌĨĂĐĞƐƚŽ/ŶƐƉŝƌĞ ǁǁǁ͘ĂŶĚĞƌƐĚdž͘ĐŽŵŝŶĨŽΛĂŶĚĞƌƐĚdž͘ĐŽŵ