Getting Started VISSIM
Getting Started with the NI LabVIEW C Generator

Getting Started with the NI LabVIEW™C Generator Use the LabVIEW C Generator to generate generic C code from VIs.The generated C code can run on most platforms.Note Refer to the LabVIEW C Generator Readme,which is available by openingreadme_C_Generator.html on the NI LabVIEW C Generator CD,for system requirementsand instructions about installing the C Generator.This manual contains a step-by-step tutorial that shows you how to generate C code from an exported VI and use that generated C code on a target.In this tutorial,you specify a VI to export for C codegeneration,configure C code generation settings,define the function prototype for the exported VI,generate C code,and use the generated C code on a non-LabVIEW target.The tutorial also describeshow to create and configure the generated C code so you can use it in the following commonly usedtargets:•A32-bit Windows platform(Win32)DLL created with the Microsoft Visual Studio compiler.•A static library created in Cygwin using GNU Compiler Collection(GCC).•An ARM application built in KeilµVision for a Luminary Micro EK-LM3S8962target.Note You must configure some settings differently for each target.As you use this tutorial,refer to the Win32DLL,Cygwin Static Library,and EK-LM3S8962Application sections ofthis manual for target-specific instructions.ContentsInstalling Additional Third-Party Software (1)Creating the LabVIEW Project (2)Creating a Build Specification (2)Creating a VI for C Code Generation (3)Defining the Function Prototype (5)Setting C Code Generation Options (7)Testing the VI (7)Generating C Code in LabVIEW (9)Building the Generated C Code (11)Win32DLL (11)Cygwin Static Library (13)EK-LM3S8962Application (15)Where to Go from Here (16)Installing Additional Third-Party SoftwareYou must install the following third-party software based on the target on which you want to use thegenerated C code:•Win32DLL–Microsoft Visual Studio2008compiler—Refer to the Microsoft Web site at for more information about installing Microsoft Visual Studio.–GNU Make for Windows—Refer to the Make for Windows Web site at/packages/make.htm for more information aboutinstalling the GNU Make utility.•Cygwin Static Library–Cygwin1.7.5or later—Refer to the Cygwin Web site at for more information about installing Cygwin.Install Cygwin with the following packages:•binutils2.20.51or later•gcc–g++3.4.4or later•make3.81or later•EK-LM3S8962Application–RealView Microcontroller Development Kit,including KeilµVision3or later—Refer to the Keil Web site at for more information about installing KeilµVision. Creating the LabVIEW ProjectUse LabVIEW projects(.lvproj)to group together LabVIEW files and non-LabVIEW files,createbuild specifications for exporting VIs for C code generation,and generate C code.You must use aLabVIEW project to generate C code.Complete the following steps to create a project.unch LabVIEW.2.Select File»New Project to display the Project Explorer window.The Project Explorer window displays a new untitled project,which includes the My Computertarget.The Project Explorer window includes two pages,the Items page and the Files page.TheItems page displays the project items as they exist in the project tree.The Files page displays theproject items that have a corresponding file on disk.Project items on the Files page both reflectand update the contents on disk.You can switch from one page to the other by clicking the Itemsand Files tabs.3.Right-click the untitled project in the Project Explorer window and select Save from the shortcutmenu.4.In the Name the Project dialog box,enter GreatestCommonDivisor and select a location tosave the project file.5.Click the OK button to save the project.Creating a Build SpecificationYou use a build specification to specify how the C Generator generates C code for exported VIs.Youcan have multiple build specifications under the same My Computer target.For example,if you want to generated C code from an exported VI for a Win32DLL and a Luminary Micro EK-LM3S8962target, you can create a separate build specification for each of these targets.Complete the following steps to create the build specification.1.In the Project Explorer window,right-click Build Specifications under My Computer and selectNew»C Code Generation from the shortcut menu to create a C code generation build specification.LabVIEW displays the C Code Generation Properties dialog box.2.On the Information page of the C Code Generation Properties dialog box,enter GreatestCommon Divisor in the Build specification name text box to rename the build specification.3.In the Destination directory text box,specify a location to save the generated C files.Getting Started with LabVIEW C (EK-LM3S8962Application)Set the value of the Destination directory option tolabview\examples\CGenerator\Tutorial\Keil–ARM LM3S8962.The C Generatorinstalls an exampleµVision project(.Uv2)you will use in this tutorial to build the generated Ccode into an ARM application.TheµVision project includes the generated C code from this location.4.Verify that the Information page appears similar to the following figure.Figure1.Defining the Build Specification Information5.Click the OK button to close the build specification.bVIEW displays a dialog box to notify you that you have not selected a VI to export.Click theYes button.7.Save the project.Creating a VI for C Code GenerationAfter you create a LabVIEW project and C code generation build specification,you can create a newVI or add an existing VI to the project.This tutorial uses an existing example VI,Greatest Common Divisor.vi,which is installed with the C Generator.Complete the following steps to add the VI to the project.1.In the Project Explorer window,right-click My Computer and select Add»File from the shortcutmenu.Note You must include the VI you want to generate C code for under My Computer.You cannot generate C code from any other targets in the Project Explorer window.©National Instruments Corporation3Getting Started with LabVIEW C Generator2.In the Select a File to Insert dialog box,navigate tolabview\examples\CGenerator\Tutorial\Greatest Common Divisor.vi.Click theAdd File button.The VI appears under My Computer,as shown in the following figure.Figure2.Adding the VI to the Project3.Save the project.4.Open the VI and view the block diagram,which is shown in the following figure.Figure3.Viewing the Greatest Common Divisor.vi Block DiagramGetting Started with LabVIEW C The Greatest Common Divisor.vi computes the greatest common divisor between two numbers.Tip When you create a new VI to export for C code generation,you must account for differencesin VIs you develop to run as LabVIEW applications and VIs you develop for C code generation.Exported VIs and all VIs in their hierarchies support some block diagram objects differentlyfrom VIs running as LabVIEW applications.Refer to Developing VIs for C Code Generationin the LabVIEW Help for more information about these differences.Select Help»LabVIEWHelp to search the LabVIEW Help.Defining the Function PrototypeUse the build specification to specify which VI you want to export for C code generation and to define the function prototype that the C Generator generates for that VI.Complete the following steps to define the function prototype.1.Double-click the Greatest Common Divisor build specification in the Project Explorer windowto display the C Code Generation Properties dialog box.2.Select Source Files from the Category list in the C Code Generation Properties dialog box todisplay the Source Files page.3.From the Project Files tree,select GreatestCommonDivisor.vi and click the Add Item arrowbutton next to the Exported VI listbox to specify the VI you want to export for C code generation,as shown in the following figure.Figure4.Specifying a VI to Export for C Code Generation©National Instruments Corporation5Getting Started with LabVIEW C GeneratorLabVIEW automatically displays the Define VI Prototype dialog box when you specify a VI inthe Exported VI e the Define VI Prototype dialog box to define the parameters of thefunction prototype that the C Generator creates from the exported VI.Notice that the text displayedin the Function Name text box—GreatestCommonDivisor—matches the name of the VI youselected for export.Also notice that the parameters displayed in the Parameters list match theinputs and outputs of the exported VI.The Function Prototype text box displays a preview of thefunction prototype that the C Generator generates based on the current settings in the dialog box.4.Select returnvalue in the Parameters list of the Define VI Prototype dialog box.5.In the Current Parameter section,set the VI Output option to gcdxy.The gcdxy output of theGreatest Common Divisor.vi is now the return value of the function prototype.The FunctionPrototype text box in the Define VI Prototype dialog box,displays a preview of the functionprototype,as shown in the following figure.Figure5.Defining the Function Prototype6.Click the OK button to close the Define VI Prototype dialog box.Note When you create a VI you want to export for C code generation,you must select apattern to use for the connector pane and assign all front panel controls and indicators to theconnector pane terminals.If you do not set up the connector pane for the exported VI,youcannot configure parameters for the function prototype in the Define VI Prototype dialogbox.Refer to Assigning Terminals to Controls and Indicators in the LabVIEW Help for moreinformation about setting up the connector pane for a VI.Getting Started with LabVIEW C Setting C Code Generation OptionsFrom a LabVIEW block diagram,the C Generator creates ANSI C code that you can compile on many targets.You must specify platform-specific settings for the target on which you want to use the generatedC code.Complete the following steps to set C code generation options for the target.1.Select C Code Generation Settings from the Category list in the C Code Generation Propertiesdialog box to display the C Code Generation Settings page.2.Specify the endianness and alignment for the target on which you want to use the generated C code.(Win32DLL)Set the Endian format option to Little endian and the Alignment option to4.(Cygwin Static Library)Set the Endian format option to Little endian and the Alignment optionto8.(EK-LM3S8962Application)Set the Endian format option to Big endian and the Alignmentoption to8.Note Refer to Determining Endianness and Alignment in the LabVIEW Help for moreinformation about determining endianness and alignment for the target on which youwant to use generated C code.3.Click the OK button to close the dialog box.Testing the VINational Instruments recommends you test the exported VI before generating C code and test generatedC code before you use it externally.You can test the exported VI in LabVIEW to simulate the behaviorof the generated C code.The C Generator includes syntax checking of the exported VI.When you create a C Code Generation build specification,the C Generator enables syntax checking for the exported VI.When LabVIEWchecks the syntax of the VI for which you want to generate C code,LabVIEW is checking that the CGenerator can create generic C code based on the design of the exported bVIEW always checks the syntax of the exported VI before it builds the VI.Complete the following steps to test the exported VI in LabVIEW and check the syntax of the exported VI.1.Open Greatest Common Divisor.vi.2.Enter two numbers in the x and y controls.Click the Run button,,in the VI.The VI displaysthe greatest common divisor of the two numbers.3.View the block diagram.If the block diagram is not visible,select Window»Show Block Diagram.4.Add a Timed Loop to the block diagram.The Timed Loop is located on the Timed Structurespalette.Because the Timed Loop is unsupported by the C Generator,LabVIEW displays the Warningbutton,,in the VI toolbar,as shown in the following figure.©National Instruments Corporation7Getting Started with LabVIEW C GeneratorFigure6.Displaying Warnings on the Block DiagramLabVIEW displays the Warning button during syntax checking if the exported VI hierarchy containsunsupported data types,VIs,functions,or structures.While syntax warnings do not prevent youfrom running the exported VI in LabVIEW,you cannot generate C code for the VI until you correctall syntax warnings.5.Click the Warning button in the VI toolbar to display the Error list window,which explains thatthe Timed Loop is unsupported by the C Generator,as shown in the following figure.Getting Started with LabVIEW C Figure7.Displaying Warnings in the Error List Window6.Remove the Timed Loop from the block bVIEW no longer displays the Warning buttonin the VI toolbar because the syntax is correct.Note If you remove the checkmark from the Show Warnings checkbox in the Error listwindow,LabVIEW no longer displays syntax warnings for C code generation.If you disablewarnings,you can check the syntax of the exported VI by right-clicking the C Code Generationbuild specification in the Project Explorer window and selecting Check Syntax from theshortcut menu.Generating C Code in LabVIEWThe LabVIEW C Generator uses the options you specify in the C Code Generation Properties dialog box to generate C code from the block diagram.The C Generator generates each VI in the VI hierarchy into a separate C file using a C function name,which is more restrictive than a VI name.Anynon-alphanumeric characters become underscores.If the VI name begins with a non-alphanumericcharacter,the C Generator prepends A_to the beginning of the C function name.Complete the following steps to generate C code from the exported VI.1.Expand Build Specifications in the Project Explorer window.2.Right-click the Greatest Common Divisor build specification and select Build from the shortcutmenu.Tip You can check the syntax of the exported VI before you build by right-clicking thebuild specification and selecting Check Syntax from the shortcut menu.©National Instruments Corporation9Getting Started with LabVIEW C GeneratorLabVIEW displays the Build status dialog box while it generates C code for the exported VI.3.Click the Explore button in the Build status dialog box to open the directory containing thegenerated C code.The C Generator generates the C code to the location you specified in theDestination directory option on the Information page of the C Code Generation Propertiesdialog box.Tip To open the directory containing the generated C files,you also can right-click theC Code Generation build specification in the Project Explorer window and select Explorefrom the shortcut menu.The C Generator generates the following files:•Greatest_Common_Divisor.c contains the exported function.You must include this file in the linker input list.•Greatest_Common_DivisorLib.h contains the library interface that specifies the generated function you defined in the Define VI Prototype dialog box.You must include this file in theexternal application.•NI_GMath_lvlib_Gcd.c contains an internal function that implements a subVI,Gcd.vi.You must include this file in the linker input list.•LVForms.h contains declarations for the entry point functions for each VI.This file is required for compiling the generated C files.•LVFuncsUsed.h contains usage information to support source-level dead-code stripping.This file is required for compiling the generated C files.•LVGlobs.h contains declarations for global initialization functions and data type information used in an external application.This file is required for compiling the generated C files.•Makefile is an example makefile.When you use the make command,the GNU Make utility reads this file.After the C Generator generates Makefile,the C Generator does not overwrite this fileif you regenerate the C code.If you want to generate a new example Makefile,you must deletethe file before regenerating the C code.Note LabVIEW code depends on the LabVIEW run-time library,which includes supportfor all basic functions.You must link to the LabVIEW run-time library with all exportedVIs.The LabVIEW run-time library source is located in the labview\CCodeGen\libsrcdirectory.You also must link to the LabVIEW analysis library if the exported VI usesmath or signal processing VIs.The LabVIEW analysis library source is located in thelabview\CCodeGen\analysis directory.You also must link to the LabVIEWsimulation library if the exported VI uses the Simulation VIs and functions.The LabVIEWsimulation library source is located in the labview\CCodeGen\simulation.•dependencies.mk is the secondary makefile.The C Generator includes all LabVIEW settings, such the build specification name and C code generation option values,that are required to generateC code.The C Generator updates this file if the hierarchy of the exported VI bVIEWalso automatically overwrites this file during the build process.DllMain.c,which is not created when the C Generator generates C code,is an example entry point fora DLL.This file is required for building DLLs that run on Windows.This file is located in thelabview\CCodeGen\libsrc\platform\win directory.Getting Started with LabVIEW C Building the Generated C CodeIn general,you include the generated C code on a target in one of the following ways:•Add the necessary files directly into the C project.•Build the generated C code files into a static library,or archive file,and link the static library into an application.•Build the generated C code files into a DLL and load the DLL from an application at run time.Before you use the C code that the C Generator generates from the exported VI,you must configure the target.Refer to the Win32DLL,Cygwin Static Library,and EK-LM3S8962Application sections of this manual for target-specific instructions on including the generated C code.Note You must install third-party software to complete this part of the tutorial.Refer to theInstalling Additional Third-Party Software section of this manual for more information aboutadditional software.Win32DLLComplete the following steps to use the generated C code in a Win32DLL created with the Microsoft Visual Studio compiler.Note By default,the C Generator creates a Makefile for a Win32DLL created with theMicrosoft Visual Studio compiler.1.Open Makefile,which is located in the directory that contains the generated C files.2.Ensure that the following source files are included:BDLIBS1=CCGArrSupport.c CCGArrSupport2.c CCGArrSupport3.cCCGClusterSupport.c CCGCmplxSupport.c CCGEnumSupport.c CCGDVRSupport.cCCGFXPSupport.cBDLIBS2=CCGFltSupport.c CCGIntSupport.c CCGStrSupport.c CCGTimeSupport.cCCGTokString.c CCGUDClassSupport.c CCGVariant.c CCGXMLSupport.c ExecStack.cBDLIBS3=LVBlockDiagram.c LVCGenRTInit.c LVContext.c LVHeap.c LVTdp.cMemCheck.c nbemptybin.c nbfifo.c nbfifo_inst.c nbitemtable.c NumText.cViLib.c rtmath.cBDLIBS=$(BDLIBS1)$(BDLIBS2)$(BDLIBS3)FPLIBS1=LVArrayControl.c LVBoolean.c LVClusterControl.c LVEnumCtl.cLVFrontPanel.cFPLIBS2=LVListbox.c LVNumeric.c LVRadioClustCtl.c LVRing.c LVScrollbar.cLVString.c LVTab.c LVTable.cFPLIBS3=LVTimestamp.c LVTree.c Pict.cFPLIBS=$(FPLIBS1)$(FPLIBS2)$(FPLIBS3)COMMSLIBS=CCGVIRefSupport.c crc.cLVLIBS=arrresize.c©National Instruments Corporation11Getting Started with LabVIEW C GeneratorCOMMONLIBS=Headless.cTip Refer to Including Generated C Code in External Applications in the LabVIEW Helpfor more information about which source files you must compile.3.Ensure that the following compiler flags are set:CLFLAGS=/D"CGEN_LIBFUNC_PREFIX=__declspec(dllexport)"/D"_CRT_SECURE_NO_WARNINGS"/MT/Zp4/W3/nologo/cThe/c flag is set to compile C code.The/Zp4flag sets the alignment to4for allocating structs.The/D"CGEN_LIBFUNC_PREFIX=__declspec(dllexport)"/D preprocessor define alsomust be set for the LabVIEW run-time library.You do not need any OS-or CPU-specificpreprocessor defines for the LabVIEW run-time library.4.Ensure the following include paths are set:INCLUDES=/I"."/I"$(LVPATH)\CCodeGen\include\blockdiagram"/I"$(LVPATH)\CCodeGen\include\comms"/I"$(LVPATH)\CCodeGen\include\frontpanel"/I"$(LVPATH)\CCodeGen\include\platform\win"/I"$(LVPATH)\CCodeGen\analysis\development\include"/I"$(LVPATH)\CCodeGen\analysis\LV\source\include"5.Save and close the Makefile.6.Open the LabVIEW analysis library Makefile,which is located in thelabview\CCodeGen\analysis directory.7.The LabVIEW analysis library Makefile must include OS-and CPU-specific preprocessor defines.The following preprocessor defines are set:CLFLAGS=/D"LV_Embedded"/D"NoFFTtablePersist=1"/D"COMPILE_FOR_SMALL_RT=1"8.Close the Makefile.9.Open and review LVDefs_plat.h,which is located in thelabview\CCodeGen\include\platform\win directory.LVDefs_plat.h contains basic constants and macros that the C Generator needs to generate Ccode.This file provides the mapping between generic C function calls that the C Generator generatesand platform-specific,run-time functions.LVDefs_plat.h also contains platform definitions ofdata types for the compiler.To properly define data types,you must know the compiler definitions of those data types.Todefine the generic function calls,you must know how the target SDK implements these functioncalls.LVDefs_plat.h defines the data types and function calls correctly for a Win32DLL createdwith the Microsoft Visual Studio compiler.10.Close LVDefs_plat.h.11.Open and review LVSysIncludes.h,which is located in thelabview\CCodeGen\include\platform\win directory.LVSysIncludes.h contains platform-specific header files,toolchain-specific header files,andstandard C header files.Most files in the labview\CCodeGen directory include LVSysIncludes.h.12.Close LVSysIncludes.h.Getting Started with LabVIEW C Running the GNU Make Utility to Create a Win32DLLYou use the GNU Make for Windows utility to build applications and libraries automatically from the generated C code.Before you can run the Makefile in the directory that contains the generated C code, you must set up the required toolchain.Complete the following steps to set up the toolchain and run the GNU Make utility.1.Set up the PATH environment variable in Windows to include make.exe.2.Ensure the VSPATH variable in Makefile specifies the location of the Microsoft Visual Studiocompiler,cl.exe.3.Run the Visual Studio Command Prompt to set up the environment for the compiler.Refer to theMicrosoft Visual Studio compiler documentation for more information about setting up theenvironment.4.Call the make command from the command line to run the GNU Make utility on the Makefile inthe directory that contains the generated C code.Running and Calling the Generated C CodeNow you can call the Win32DLL.You can declare the exported function prototype as shown in thefollowing example:extern int GreatestCommonDivisor(int x,int y);You can call the exported function as shown in the following example:gcd=GreatestCommonDivisor(12,15);To load the DLL automatically when the application starts,you can add Sharedlib.lib to the linker inputs.The GNU Make utility generates Sharedlib.lib.Cygwin Static LibraryComplete the following steps to use the generated C code in a static library created in Cygwin usingGCC.1.Open the directory that contains the generated C code files.2.Open the labview\examples\CGenerator\Tutorial\Cygwin directory.3.Replace the Makefile in the directory that contains the generated C code with thelabview\examples\CGenerator\Tutorial\Cygwin\Makefile.When the C Generator generates C code,the C Generator always creates a Makefile for a Win32DLL created with the Microsoft Visual Studio compiler and a Makefile.cygwin for a staticlibrary created with Cygwin.You must replace the generated makefiles with the example Makefile,which is customized for this tutorial.4.Copy labview\examples\CGenerator\Tutorial\Cygwin\main.c into the directory thatcontains the generated C code.5.Open the Makefile.6.Ensure that the following source files are included:BDLIBS1=CCGArrSupport.c CCGArrSupport2.c CCGArrSupport3.cCCGClusterSupport.c CCGCmplxSupport.c CCGEnumSupport.c CCGDVRSupport.cCCGFXPSupport.cBDLIBS2=CCGFltSupport.c CCGIntSupport.c CCGStrSupport.c CCGTimeSupport.cCCGTokString.c CCGUDClassSupport.c CCGVariant.c CCGXMLSupport.c ExecStack.c ©National Instruments Corporation13Getting Started with LabVIEW C GeneratorBDLIBS3=LVBlockDiagram.c LVCGenRTInit.c LVContext.c LVHeap.c LVTdp.cMemCheck.c NumText.c ViLib.c rtmath.cBDLIBS=$(BDLIBS1)$(BDLIBS2)$(BDLIBS3)FPLIBS1=LVArrayControl.c LVBoolean.c LVClusterControl.c LVEnumCtl.cLVFrontPanel.cFPLIBS2=LVListbox.c LVNumeric.c LVRadioClustCtl.c LVRing.c LVScrollbar.cLVString.c LVTab.c LVTable.cFPLIBS3=LVTimestamp.c LVTree.c Pict.cFPLIBS=$(FPLIBS1)$(FPLIBS2)$(FPLIBS3)COMMSLIBS=CCGVIRefSupport.c crc.cLVLIBS=arrresize.cCOMMONLIBS=Headless.cTip Refer to Including Generated C Code in External Applications in the LabVIEW Helpfor more information about which source files you must compile.7.Ensure that the following compiler flag is set:CFLAGS=–O2The–O2flag is set to optimize the C code and is an optional flag.Tip If you are using an x86target,you must set the–malign–double GCC command line option.You also must set the Alignment option to8on the C Code GenerationSettings page of the C Code Generation Properties dialog box.8.Ensure the following include paths are set:INCLUDES=–I$(LVPATH)/CCodeGen/include/platform/cygwin–gcc–I$(LVPATH)/CCodeGen/include/comms–I$(LVPATH)/CCodeGen/include/blockdiagram\–I$(LVPATH)/CCodeGen/include/frontpanel–I.9.Notice that the Makefile also includes the following settings:.DEFAULT_GOAL=defaultdefault:$(APPLICATION).aGCD.exe:main.o$(APPLICATION).a$(LD)$(LDFLAGS)–lm–o$@main.o$(APPLICATION).aGetting Started with LabVIEW C By default,running the Makefile creates a.a file that you can link to your application.TheMakefile also can create an executable program,GCD.exe.10.Save and close the Makefile.11.Open and review LVDefs_plat.h,which is located in thelabview\CCodeGen\include\platform\cygwin–gcc directory.LVDefs_plat.h contains basic constants and macros that the C Generator needs to generate Ccode.This file provides the mapping between generic C function calls that the C Generator generatesand platform-specific,run-time functions.LVDefs_plat.h also contains platform definitions ofdata types for the compiler.To properly define data types,you must know the compiler definitions of those data types.Todefine the generic function calls,you must know how the target SDK implements these functioncalls.LVDefs_plat.h defines the data types and function calls correctly for a Cygwin target.12.Close LVDefs_plat.h.13.Open and review LVSysIncludes.h,which is located in thelabview\CCodeGen\include\platform\cygwin–gcc directory.LVSysIncludes.h contains platform-specific header files,toolchain-specific header files,andstandard C header files.Most files in the labview\CCodeGen directory include LVSysIncludes.h.14.Close LVSysIncludes.h.Running the GNU Make Utility to Create an ExecutableYou use the GNU Make utility to build applications and libraries automatically from the generated Ccode.Before you can run the Makefile in the directory that contains the generated C code,you must set up the required toolchain.Complete the following steps to set up the toolchain and run the GNU Make utility.e the Cygwin command line to verify that GCC and the GNU Make utility are on the PATH.2.To create GCD.exe,call the make GCD.exe command from the command line.Running and Calling the Generated C CodeYou now can run GCD.exe to test the exported function.When you run the application,main.c callsGreatestCommonDivisor(12,15).The expected output of the exported function is3.EK-LM3S8962ApplicationThe C Generator installs aµVision project(.Uv2)you can use to build the generated C code in an ARM plete the following steps to use the generated C code in an ARM application built inKeilµVision for a Luminary Micro EK-LM3S8962target.1.In KeilµVision,open labview\examples\CGenerator\Tutorial\Keil–ARMLM3S8962\example.Uv2.2.Expand the LM3S8962target in the Project Workspace window.3.Expand the Generated Files folder.Notice that folder includes GCD.c andNI_Gmath_lvlib_Gcd.c,which are the generated C files.4.Right click the LM3S8962target in the Project Workspace window and select Options for Targetfrom the shortcut menu.5.On the Target tab,notice that Operating system is set to Nothing.Do not set this value to RTX,which is incompatible with the generated C code.6.On the Target tab,ensure that the Use MicroLIB option does not contain a checkmark.This optionis incompatible with the generated C code.©National Instruments Corporation15Getting Started with LabVIEW C Generator。
OMNet操作指导

Getting Started with the Simulation IDE Exploring the Models1. Make sure project is open.2. Note the folder structure of the INET Framework project: src contains modelcomponents (protocols, apps, etc), and examples contains example simulations.The OMNeT++ programming examples (aloha, cqn, etc.) are mostly single-folder projects.3. Common file types you'll encounter:.neddefinitions of simulation components and networks.cc, .hC++ source files of simulation components.msgmessage descriptions (e.g. protocol headers) that are automatically translated to C++ classes_, _m.hgenerated files, created from msg files during the build process .iniparameter settings and configuration options for simulations Launching Simulations1. Select the .ini file (usually omnetpp.ini) or its parent folder.2. Click Run on the toolbar.3. If the following dialog comes up, choose OMNeT++ Simulation and click OK.4. Launch configurations go to the Run button's menu. Select one to run, or Ctrl+Click to open it for editing.Viewing Simulation Results1. Simulation results are normally saved in the results folder. You may need to select the project and hit Refresh (F5) to see it.2. Double-click any (.vec or .sca) file to open the Analysis Tool.3. The Analysis Tool will let you browse, select, process and plot the results. It will save your analysis into a .anf file in the parent folder.4. Later on you can just double-click the .anf file to open the analysis again. Having .anf files enables you to call up the same charts with different results after new simulation runs.Exploring Simulation Interactions on a Sequence ChartOMNeT++ helps you explore simulation models by letting you visualize interactions on a dynamic sequence chart. The sequence chart works from an event log file (.elog) recorded during simulation execution. Due to the associated overhead, recording has to be turned on explicitly.1. To turn on eventlog recording, open the launch configuration (see Launching Simulations above), select the option in the dialog, then click Apply.2. Run the simulation.3. The event log (.elog) file will be in the results folder, double-click to open it. (You may need to select the project and hit Refresh (F5) to see the file.)4. Sequence chart will open in the editor area.Getting More Simulation Models1. The Help > Install simulation models menu item offers automatic installation of selected simulation models or model frameworks.Currently only the INET Framework is available via this facility, but with time, the list will be to expanded to include other models as well.2. For models not directly available, go to the download area of , which contains a fairly complete list of open-source OMNeT++ simulation models.These models have to be downloaded and installed and/or imported into the IDE manually (see next item).Importing Simulation Models into the IDEIf you have downloaded a simulation model or some other project and you want use the IDE to work with it, it needs to be imported into the workspace.1. Choose File > Import... from the menu.2. In the dialog, select Generic > Existing project into the workspace.More Help on Getting Started1. You can find more introductory material under the Getting Started folder of the OMNeT++ documentation in the IDE help system.2. The documentation is available in PDF format and outside the IDE as well, see the doc folder of your OMNeT++ installation.3. Recommended items:∙TicToc Tutorial: Going through this tutorial is the quickest way pick up OMNeT++ modeling concepts and become productive as fast as possible.∙The OMNeT++ Manual explains everything you need to know for writing OMNeT++ simulations in detail. A must-read if you are serious about working with OMNeT++.∙The IDE User Guide methodically describes the features of the Simulation IDE.Read it to be able to get the most out of the IDE.Screenshot from the TicToc Tutorial:。
Vissim3.6中文使用说明书

Vissim使用说明目录目录 (2)第一章Vissim使用概况 (4)1.1 Vissim快速启动清单 (4)1.2 Vissim桌面 (4)第二章网络 (8)2.1 概况 (12)2.2 网络编辑 (12)2.2.1 背景图 (12)2.2.2 link (13)2.3 机动车 (14)2.3.1 分布 (14)2.3.2 车辆加速度 (15)2.3.3 车辆类型(type),种类(class)和类别(category) (15)2.3.4 交通组成 (17)2.3.5 交通量 (17)2.3.6 期望速度变化 (18)2.4 机动车路径选择/转弯运动 (18)2.4.1 路线定义 (18)2.4.2 方向定义 (18)2.4.3 路线定义和方向定义比较 (19)2.5 公共交通 (19)2.5.1 公交站 (19)2.5.2 公交线路 (20)2.5.2.1 公交线路的定义 (20)2.5.2.2 公共汽车停留时间计算 (22)2.6 无信号控制的交叉口 (22)2.6.1 优先权规则(Right-of-way Designation) (22)2.6.2 停车标志控制 (23)2.7 信号控制交叉口 (23)2.7.1 信号组和信号灯 (24)2.7.2 检测器 (24)2.7.3 信号控制器 (25)2.7.3.1 定时信号控制 (25)2.7.3.2 车辆感应信号控制(可选模块V AP) (25)2.7.4 信号控制类型的切换 (25)2.7.5 信号控制通讯 (26)第三章全局设定 (27)3.1 仿真参数 (27)3.2 驾驶行为 (27)3.3 图形显示 (29)3.3.1 3D显示 (31)3.3.2 3D车辆 (31)第四章仿真和测试 (33)4.1 仿真 (33)4.2 Animation (33)4.3 记录3D录像 (33)第五章结果 (35)5.1 评价设置 (35)5.1.1 屏幕输出 (35)5.1.2 文件输出 (35)5.2 运行错误 (36)第六章评价类型 (37)6.1 行程时间 (37)6.1.1 定义 (37)6.1.2 配置 (37)6.1.3 结果 (37)6.2 延误时间 (38)6.2.1 定义 (38)6.2.2 配置 (38)6.2.3 结果 (39)6.3 数据采集 (39)6.4 排队计算器 (40)6.5 绿时分配 (41)6.6 车辆信息记录 (43)6.7 动态信号配时 (44)6.8 信号变化 (45)6.9 link评价 (47)6.10 观察者 (48)6.11 变换车道 (48)6.12 公共汽车/电车等待时间 (48)6.13 车辆输入 (48)6.14 时间--空间图(x—t图) (49)6.14.1 定义 (49)6.14.2 配置 (49)6.14.3 结果 (49)6.15 速度—距离图(x-v图) (49)6.15.1 定义 (50)6.15.2 配置 (50)6.15.3 结果 (50)6.16 加速度数据 (51)6.17 加速度/速度综合评价 (51)6.18 文件汇总 (51)6.18.1 仿真输出文件 (51)6.18.2 测试状态文件 (54)6.18.3 其他数据文件 (54)第一章Vissim简介1.1 Vissim快速启动清单1.创建BMP格式的背景图。
VISSIM使用指南

INTRODUCTORY TRAININGVISSIMVISSIM is a microscopic, time step and behavior based simulation model developed to model urban traffic and public transit operations. The program can analyze traffic and transit operations under constraints such as lane configuration, traffic composition, traffic signals, transit stops, etc., thus making it a useful tool for the evaluation of various alternatives based on transportation engineering and planning measures of effectiveness.The traffic simulator in VISSIM is a microscopic traffic flow simulation model including the car following and lane change logic. VISSIM uses the psycho-physical driver behavior model developed by Wiedemann (1974). The basic concept of this model is that the driver of a faster moving vehicle starts to decelerate as he reaches his individual perception threshold to a slower moving vehicle. Since he cannot exactly determine the speed of that vehicle, his speed will fall below that vehicle’s speed until he starts to slightly accelerate again afte r reaching another perception threshold. This results in an iterative process of acceleration and deceleration.Open VISSIM and create a new fileFor every transport network a separate VISSIM file is needed. To create a new network the following steps are to be followed.1.Open the master plan of your study area as a background imageBuilding an accurate VISSIM model at least one scaled map that shows the real network. The image file of a digitized map (.jpg, .tiff, .bmp etc.) is to be imported as a background. This background can be displayed, moved and scaled in the VISSIM network window and is used to trace the VISSIM links and connectors.2.Scale the background and save a scaled background.Precise scaling is necessary for an accurate network model. A large scale distance (> 100 m / > 300 ft) is recommended to use.3. Draw links and connectors for streets and junctionsThe level of detail required for replicating the modeled transport network infrastructure depends on the purpose of a VISSIM application. While a rough outline of the analyzed intersection is sufficient for testing traffic actuated signal logic, a more detailed model is required for simulation analyses.Link: The first step in coding a VISSIM network is to trace links. Each approach and section should be represented by one link. A link cannothave multiple sections with a different number of lanes. Connectors (rather than links) should be used to model turning movements.Connectors: In order to create a road network, links need to be connected to other links. It is not sufficient to place one link on top of another link in order for vehicles to continue on the other link. Instead, a connector needs to be created to connect the two links. Furthermore connectors are used to model turnings of junctions.Set Parameters for the new file1.Simulation ParametersTraffic regulations: Specifies the standard driving side (For Ireland, Leftside-Traffic).Simulation Resolution: The number of times the vehicle’s position will be calculated within one simulated second (range 1 to 10) (more than 3 recommended).Random Seed: This parameter initializes the random number generator. Simulation runs with identical input files and random seeds generate identical results. Using a different random seed includes a stochastic variation of input flow arrival times.2.Speed profilesSome parameters in VISSIM are defined as a distribution rather than a fixed value. Thus the stochastic nature of traffic situations is reflected realistically. Most of the distributions are handled similarly and it is possible to use any kind of empirical or stochastic data for definition.Stochastic distributions of desired speeds are defined for each vehicle type within each traffic composition. The minimum and maximum values for the desired speed distribution are to be entered along with two intermediate points are generally adequate to define an s-shaped distribution.3. Vehicle Acceleration and Deceleration FunctionsVISSIM does not use a single acceleration and deceleration value but uses functions to represent the differences in a driver’s behavior. Acceleration and deceleration are functions of the current speed. These functions are predefined for each of the default vehicle types in VISSIM. They can be edited or new graphs can be created4. Dwell Time Distribution (Stops & Parking Lots)The dwell time distribution is used by VISSIM for dwell times at parking lots, stop signs, toll counters or transit stops. Either a normal distribution or an empirical distribution can be provided for transit stops.5. Vehicle type characteristicsIn addition to the default vehicle types (Car, HGV, Bus, Tram, Bike and Pedestrian), new vehicle types can be created or existing types modified. A vehicle class represents a logical container for one or more previously defined vehicle types.6. Create traffic compositionsA traffic composition defines the vehicle mix of each input flow to be defined for the VISSIM network. The relative percentage (proportion) of each vehicle type is to be given.7. Enter traffic volumes at network endpoints and pedestrian volumes at junctionsIn VISSIM, time variable traffic volumes to enter the network can be defined. For vehicle input definition, at least one traffic composition has to be defined. Traffic volumes are defined for each link and each time interval in vehicles per hour. Within one time interval vehicles enter the link based on a Poisson distribution.Fine Tuning of the VISSIM Network1. Enter routing decision points and associated routesA route is a fixed sequence of links and connectors. A route starts from a routing decision point (red cross-section) and extends up to at least one destination point (green cross-section) or multiple destinations. A route can have any length - from a turning movement at a singlejunction to a route that stretches throughout the entire VISSIM network.For static routing decisions, vehicles from a start point (red) to any of the defined destinations (green) using a static percentage for each destination.2. Enter speed changesReduced speed areas: When modeling short sections of slow speed characteristics (e.g. curves or bends), the use of reduced speed areas is advantageous over the use of desired speed decisions. In order for a reduced speed area to become effective vehicles need to pass its start position.Desired Speed Decisions: A desired speed decision is to be placed at a location where a permanent speed change should become effective. The typical application is the location of a speed sign in reality.3. Enter priority rulesPriority rules are to be applied for non-signalized intersections, permissive left turns, right turns on red light and pedestrian crosswalks. The right-of-way for non-signal-protected conflicting movements is modeled with priority rules. This applies to all situations where vehicles on different links/connectors should recognize each other. The two main conditions to check at the conflict marker(s) are minimum headway (distance) and minimum gap time.Conflict areas are a new alternative to priority rules to define priority in intersections. They are the recommended solution in most casesbecause they are more easily defined and the resulting vehicle behavior is more intelligent. A conflict area can be defined wherever two links/connectors in the VISSIM network overlap. For each conflict area, the user can select which of the conflicting links has right of way (if any).4. Enter stop signsIntersection approaches controlled by STOP signs are modeled in VISSIM as a combination of priority rule and STOP sign. A STOP sign forces vehicles to stop for at least one time step regardless of the presence of conflicting traffic while the priority rule deals with conflicting traffic, looking for minimum gap time and headway etc. STOP signs are required to be installed for non-signalized intersections and for right turns on red light.Create Signal ControlsSignalized intersections can be modeled in VISSIM either using the built-in fixed-time control or an optional external signal state generator. (Our license in Trinity has a fixed time control.)In VISSIM every signal controller (SC) is represented by its individual SC number and signal phase. Signal indications are typically updated at the end of each simulation second.Signal control and signal groups are to be modeled from Signal Control window. In Fixed Time Signal Control VISSIM starts a signal cycle at second 1 and ends with second Cycle time.Setup for output files and run simulationstravel time segmentsUsing Travel Time Measurements mode, a section of the network has to be selected on which the travel time is to be measured.The output format can be configured according to the requirement of the user.delay segmentsBased on travel time sections VISSIM can generate delay data for networks. A delay segment is based on one or more travel time sections. All vehicles that pass these travel time sections are captured by the delay segment. A delay time measurement determines - compared to the ideal travel time (no other vehicles, no signal control) - the mean time delay calculated from all vehicles observed on a single or several link sections.queue countersThe queue counter feature in VISSIM provides as output the average queue length, maximum queue length and the number of vehicle stops within the queue. Queues are counted from the location of the queue counter on the link or connector upstream to the final vehicle that is in queue condition. If the queue backs up onto multiple different approaches the queue counter will record information for all of them and report the longest as the maximum queue length.data collection pointsData collection offers the collection of data on single cross sections.QUICKSTART CHECKLIST1. Open VISSIM and create a new file2. Set the simulation parameters3. Create/edit speed profiles4. Check/edit vehicle type characteristics5. Create traffic compositions6. Open the master plan of your study area as a background image7. Place and scale the background image and save background image file.8. Draw links and connectors for roadways tracks and crosswalks9. Enter traffic volumes at network endpoints and pedestrian volumes at junctions10. Enter routing decision points and associated routes11. Enter speed changes12. Enter priority rules for non-signalized intersections13. Enter stop signs for non-signalized intersections14. Create Signal Controls with signal groups15. Enter signal heads in network16. Enter detectors for intersections controlled by traffic actuated signal control17. Enter stop signs for right turns on red18. Enter priority rules19. Create dwell time distributions and place transit stops in network20. Create transit lines21. Setup for output files22. Run the simulation。
VISSIM基本认识及基本操作实验报告

VISSIM基本认识及基本操作实验报告VISSIM基本认识及基本操作实验报告VISSIM基本认识及基本操作实验报告一、实验目的掌握交通仿真系统VISSIM基本功能的使用。
二、实验原理以基本路段、出口匝道、无信号平面交叉口为例,练习基本交通仿真操作。
三、实验内容1、基本路段仿真2、设置行程时间检测器3、道路的连接和路径决策4、冲突区的设置四、实验步骤单击菜单栏上的View,选择Options,在Languages&Units下选择Chinese,切换成中文。
1、基本路段仿真步骤(1)绘制路段:单击“路段&连接器”按钮,切换到路段编辑状态,将鼠标移到视图区,确定任意起点按住鼠标右键,平行向右移动鼠标,在需要的长度放开鼠标右键,路段绘制完成,在弹出的“路段属性”对话框内设置路段属性。
车道数设置为“3”,单击“完成”。
(2)流量设置:单击“车辆输入”按钮,切换到路段流量编辑状态,双击路段,在“车辆输入”对话框输入流量“1500”,车辆构成选择“Default”。
路段起点出现黑色线段,表示已完成流量设置。
(3)运行仿真:菜单栏单击“仿真”—>“参数”,在弹出的“仿真参数”对话框内调节仿真运行速度,为看清车辆行驶,调小速度为“6仿真秒/s”,单击确定。
2、设置行程时间检测器步骤:(1)单击行程时间,左键单击选中主路段,然后在主路段靠近起点某处右键,出现红色竖线,起点检测器设置完成,再在靠近终点处右键出现绿色竖线同时弹出“创建行程时间检测”对话框,单击确定。
(2)评价结果输出:菜单栏单击“评价”—>“文件”在评价对话框内勾选行程时间。
单击确定。
VISSIM注意事项

VISSIM注意事项1 安装在安装过程中发生报错“MS Visual C++ Runtime Error R6030: CRT not installed.”或类似信息。
(#113)出现此类错误报告通常是因为同一时间有其他安装进程正在执行或Windows 系统正在更新。
请在其他文件安装完成后再执行Vissim 软件的安装。
涉及版本:Vissim 6第一次安装VISSIM后,无法运行软件,是什么问题?(#105)这是由于电脑中安装了西门铁克保护终端(SEP)。
这个问题在西门铁克保护终端11的维护升级包(MR)3中得到解决。
VISSIM可以在64位操作系统上运行吗?(#86)可以运行,对于Vissim有32位和64位两种安装文件。
64位的版本只可以在64位的操作系统中运行并且可以使用到超过3GB的内存。
除非您的路网建模工作需要使用额外的内存,我们还是建议您安装32位的Vissim软件,这是因为在64位版本中还存在一些限制:背景矢量图形的格式:不支持SVG(可缩放矢量图形),仅有限支持DXF/DWG文件。
某些外部信号控制接口不适用于64位版本。
然而,以下接口在Vissim 的32位和64位版本中都可以使用:RBC,SCATS,SCOOT,VAP及VISSIG。
某些外部排放模型和外部驾驶员模型不适用于64位版本。
不支持用于过时信号控制接口的DDE接口(外部EXE文件)。
64位版本只有在安装OLE驱动后,才支持数据库的导出。
例如:在使用Microsoft Office的64位版本时需要将文件导出到Microsoft Access(mdb)中。
在使用Vissim的64位版本时我们建议您使用MSSQLServer快速版作为替代。
对于静态3D模型,仅支持V3D格式的文件(SKP,DWF及3DS 不适用)。
哪种显卡最适合Vissim 3D的视频显示?(#6)我们推荐使用AMD Radeon系列的显卡(对于台式机可使用如:Radeon HD 7770或7850)。
vissim8.0安装教程

vissim8.0安装教程
安装步骤:
试装系统:win1064bit
安装版本:Vissim8.0(64bit)
1.解压安装包(注意解压的路径不要有中文)。
2.总共有4个版本,选择需要安装的版本右键点击“以管理员身份运行”。
3.点击“OK”。
4.点击“NEXT”。
5.选择“I accept”,然后点击“NEXT”。
6.选择安装路径,注意不要有中文,然后点击“NEXT”。
7.点击“NEXT”。
8.点击“NEXT”。
9.根据自身情况选择是只对当前用户还是对所有用户建立桌面快捷方式,然后点击“NEXT”。
10.点击“Install”。
11.正在安装的界面。
12.点击“Finish”。
13.打开桌面生成的vissim8.0的快捷方式。
14.选择“creates a new object”,然后点击“OK”。
15.如果想用中文菜单,可以点击Edit-User Preferences,然后在语言栏选择Chinesisch,然后点击“OK”。
16.安装完成后的界面如下。
新编Vissim4.3操作手册

Vissim4.3操作手册(初级)2015年7月目录1 交通流仿真及VISSIM基本原理 (1)1.1 交通流仿真原理 (1)1.2 Vissim基本原理 (1)2 Vissim软件简介 (2)2.1 Vissim主要术语介绍 (2)2.2 Vissim软件功能介绍 (3)2.3 Vissim操作界面介绍 (4)2.4 Vissim仿真基本操作流程 (9)2.5 Vissim模型数据需求 (10)2.5.1准备阶段 (10)2.5.2 网络数据 (10)2.5.3 交通流数据 (10)2.5.4 信号控制数据 (11)2.5.5 公交数据 (11)3 路网属性 (11)3.1 物理路网 (11)3.1.1准备底图的创建流程 (11)3.1.2添加路段(Links) (14)3.1.3连接器 (16)3.2 定义交通属性 (17)3.2.1定义分布 (17)3.2.2目标车速变化 (19)3.2.3 交通构成 (21)3.2.4 交通流量的输入 (21)3.3 路线选择与转向 (22)3.4 信号控制设置 (24)3.4.1信号参数设置 (24)3.4.2信号灯安放及设置 (27)3.4.3优先权设置 (28)4仿真 (30)4.1 参数设置 (30)4.2 仿真 (31)5评价 (32)5.1 行程时间 (32)5.2 延误 (34)5.3 数据采集点 (36)5.4 排队计数器 (38)Vissim4.3操作手册VISSIM为德国PTV公司开发的微观交通流仿真软件系统,用于交通系统的各种运行分析。
该软件系统能分析在车道类型、交通组成、交通信号控制、停让控制等众多条件下的交通运行情况,具有分析、评价、优化交通网络、设计方案比较等功能,是分析许多交通问题的有效工具。
1 交通流仿真及VISSIM基本原理1.1 交通流仿真原理交通流仿真通过构建车辆的通行环境(道路网、交通控制、限速等)、驾驶员行为(跟车、换道超车等)、车辆性能特性、交通需求特性等交通要素的计算机模型,通过“再现”或“预演”交通流在不同的交通流组织方案、交通控制管理方案下的运行特性,达到评价、优选方案的目的。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Getting Started: VISSIMVersion 1February 11, 2013Table of ContentsSection 1: General Settings 1 Section 2: Build a Network 3 Lesson 1.Add a background imageLesson 2.Draw/Edit linksLesson 3.Draw Connectors and Turn LanesSection 3: Add Vehicles 19 Lesson 1.Enter Vehicle CompositionLesson 2.Enter Entry VolumesLesson 3.Enter Routing DecisionsSection 4: Add Controls 29 Lesson 1.Stop ControlLesson 2.Signal ControlSection 4: Run a Simulation 37 Lesson 1.Set Simulation ParametersSection 5: Data Output 41 Lesson 1.Collect Travel Time and Delay Output DataLesson 2.Configure Travel Time MeasurementLesson 3.Configure Delay MeasurementLesson 4.View Output DataSection 1: General SettingsSwitch to English units:1.Go to View, then Options2.Select the Language & Units tab3.Change Distance, Speed and Acceleration to English units.Section 2: Build a NetworkLesson 1: Add a background image1.Go to View > Background> Edit2. Click load and navigate to image file and select Open.* supported background formats3.The image name displays in the background files list and loads in the bottom right handcorner of the screen*click the show entire network button to locate image4.Select Scale to scale the image.5. A scale will replace the mouse icon. Click and drag the scale over a know distance (exacross one 12ft lane)6.Then enter the known distance in the scale window. Click OK7.The image is now scaled. Click the show entire network button.8.Go to View > Save Settings and save your layout settings* You must load settings each time you open a new session.Lesson 2: Draw/Edit links (links are one way):1.Click the link button2.Click and Hold the right mouse button and drag in the direction of travel to create a link.*draw the link in the center of the direction of travel. If one lane- the middle or the lane, if two lanes-the center line, if three lanes-the middle of the center lane, etc….3.Enter the following in the Link Data Window: Street Nameb.No. of Lanes : # of lanes in one direction (thru lanes)c.Behavior Type: Urban or Freewayne Width: leave at 12ft (or reduce to 11ft to view line striping on background image)*SHORTCUT Select “Generate in opposite direction” to create a mirrored link in the oppositedirection (i.e. For a two way street) The link may need to be shifted to the exact offset.4.Repeat to recreate the entire network to be modeled.*CTRL + A will change the link view from centerline (above) to lane (below)To move a link:1.Left click a point on the link and drag to desired location.2.Move as many points as necessary to create the desired alignmenta.To create a point - left click to select a link, then right click to add a pointb.To delete a point – left click a point and drag it over the nearest point Create a curve:1.Draw a line that closely follows the alignmenta.Draw a straight line for begin to end.b.Right click to add four additional points (one before and after each curve)2.Left click and hold on a point to the right of Point 1 (be careful not to select the point itself),drag along the link and release just before Point 2. This box will appear.3.Enter the number of points desired (the higher the number of points the smoother the curve)4.The curve is created5.Select individual points to smooth out the curve if need. Or repeat the process from step 1.Lesson 3: Draw connectors(connectors are used for turn movements)1.Click the link button2.Right click on the westbound link ahead of the intersection and drag to the North leg for a rightturn. This dialogue box will open.a.Select the from and to link lane (lane 1 is the outside lane)Typically right turns come from lane 1 and left turns from lane 2b.Make sure Spline is checked and enter the number of points(2-4 for right turns, 4-6 left turns)c.Click OK3.The connector will show up in pink.4.Repeat for all the turn movements (left and right turn in and left and right turns out)Add turn lanesTurn lanes are needed for the WB left turn, SB right turn, EB Left turn and NB left and right turns.1.Create a separate link for the turn lanes.2.Connect the turn lanes with connectors3.Now you can add your connectors for your turn movements for the intersectionPage intentionally left blankSection 3: Add VehiclesLesson 1: Enter Vehicle Composition (% Heavy Vehicles and desired speed)1.Go to Traffic>Vehicle compositions2.Select the Edit button3.Select 100, Car then Edit4. Change the Rel. flow (relative flow) to 0.960. Change the desired speed (mph range inparenthesis) Click OK5.Repeat for HGV. Change Rel. flow to 0.040. Check desired speed.Lesson 2: Enter Entry Volumes1.Select the Vehicle Inputs icon2.Left click to select a link near the entry point and the right click to place the entry point (a blackline will appear)3.Vehicle Inputs windowa.Enter the Traffic Volume (in the blue box)b.Select the Vehicle Composition (in the yellow box)c.Enter the 99999 as the end of the time period (in the green box)4.Repeat for every entry link (1 each for each end of the road)Lesson 3: Enter Route Decisions (turn movements)1.Select the Routes Button2.Left click on the desired link. Right click to place the beginning of the route. (appears as red line)3.Click ok4.Start with the left turn movement. Leftclick (at the point you want to drive tomake the decision) to select the upstream link for the left turn movement and rightclick on the link. A yellow highlightedroute is shown5. Repeat for the right turn movement (aswell as any other movements)6.Right click off of the link to bring up the Routes menu.7.Select the Decision No. you wish to edit in the left window. Each decision start point (the redline) is assigned a Decision No. (notice the associate route path highlight on the screen)8.Notice in the middle window that each Decision No. has a multiple Route Numbers. Each RouteNo. represents a turn movement. Enter the turn volume for each movement (Route No.) in the last column (0-99999). You can also enter turn percentages instead of turn volumes.( Notice the route will highlight in the background as you select a Route No.)9.Repeat this for every approach at each intersection.Page intentionally left blankSection 4: Add ControlsLesson 1: Add Stop ControlPlace stop sign1.Select the Stop Sign Button2.Left click the link you wish to add a stop control to select3.Right click on the link (at the stop bar location) to place the stop sign.4. Click OKSet conflict areas:1.Select Conflict Area Button2.Click on a conflict area. Let say the left turn from the parking lot onto North Ave.3.The conflicting movements are now hightlighted in all yellow. Right click on the area to rotatethrough the priority options. The movement highlighted in green has the ROW while the movement in red has to yield/giveway to the green movement.a. All movements yieldb. Left turners yield to thru movmentc. Thru movement yields to left turnerd. All movements yield4.Select (b.) to reflect the stop control on the minor road.5.Repeat for all conflicting movements (NBR & EBT, WBL & EBT, SBL & WBT, SBR & WBT, EBL & WBT)Lesson 2: Add Signal ControlEdit Controllers1.Click Signal Control on the Menu Bar and Select Edit Controllers from the drop down menu2.Right click in the box on the right and select New to create a new element3.Give the Controller a Name and change the Type to Ring Barrier Control4.Go to the Ring Barrier Controller tab and click button (next to Data file 2). Name the SignalGroup5.Select Edit Signal Groupsplete Ring Barrier Controller Windowa.SG Number= the signal group number is used to create signal heads. (i.e. you will need aSG number for every signal phase)Minimum of 4 maximum of 8 (for a standard 4 legged intersection)b.Min Green= the minimum green time that the signal group will serve before changing toyellow. In the absence of any extension, the signal group will serve this minimum green timebefore it is eligible to terminate. This value is also used during offset seeking as a minimumvalue that the controller can display for the signal group. If this value is set artificially toohigh, the controller will take longer to get back into coordination and could possibly preventthe controller from getting back into coordination (if you set the min green equal to maxgreen).c.Veh Extension = The allowed time between successful vehicle extensions before a signalgroup will gap out. If the signal group Time To Reduce parameter is non-zero, this allowedgap between vehicles will be reduced according to volume/density timing defined for thesignal group. Volume/density timing parameters are described in Base Timing, Advanced.d.Max 1= the maximum time that the signal group will be allowed to extend before it willmax-out. A max-out will make a signal group eligible to terminate, even though it may nothave gapped-out. Normally, the maximum green timer will not begin counting until anopposing call to the signal group is present. An exception to this rule is when the signalgroup is a flagged as a Max Recall signal group, in which case the maximum green timer willbegin counting as soon as the signal group changes to green. Max 1 is the default maximumgreen time for each signal group.e.Yellow = The time a signal group will time a yellow interval before advancing to red. Thistime cannot be abbreviated by any operation.y = where V is the approach speed (mph)f.Red clearance = The time a signal group will time red before a conflicting signal group willbe allowed to begin timingR = where W = width of the stop line to far side no-conflict point (ft) andV = speed of vehicle, mphg.Min Recall=Signal groups flagged for this option will receive an automatic vehicle call whenthey are not green.Place Signal Heads1.Select the Signal Heads Button2.Left click to select the link you wish to add a signal head3.Right click on the link (at the stop line) to place the signal head.a.SC (Signal Controller) = match to the controller number you set previouslyb.Signal Group = match to the signal group (or phase) from the Ring Barrier Control Windowc.Type = left arrow, right arrow, circular (ball)4.Repeat for all lanesSection 4: Run SimulationLesson 1: Set Simulation Parameters1.Select Simulation from the menu bar and go to Parameters2.Set parametersment = The comment line is stored in the input file and included in both printouts ofthe network and in output files.∙Enter a description.b.Period = The period of time to be simulated. Including initialization period.∙Use a minimum of 4500s ( 15 minutes to fill up the system then 1 hr of simulation)c.Simulation resolution= The number of times the vehicle’s position will be calculated withinone simulated second (range 1 to 10). The higher the value the smoother the simulation ∙Use a value between 5- 10d.Random Seed = Simulation runs with identical input files and random seeds generateidentical results. For meaningful results it is recommended to determine the arithmeticmean based on the results of multiple simulation runs with different random seed settings.∙Use a different number to produce 3-5 runs per alternativee.Simulation Speed = The number of simulation seconds to a real time second.∙maximumRun the Simulation:1.Click Play2.The simulation will runWarningsIf there are any warnings in the simulation the following window will appearSelect Show to view the warningsPage intentionally left blankSection 5: Output DataLesson 1: Collect Travel Time and Delay Output Data1.Decide where to analyze the travel time2.Select Travel Time Sections Icon3.Left click on the starting link of the travel time section to select4.Right click at the exact start point to place start line5.Right click at the exact end point to place travel time end lineplete the Travel Time Measurement windowa.Add a name for this roadway sectionb.Select only the Write (to file) box7.Click OK1.Select Evaluation> File from the mainmenu2.In the vehicles tab check the box for TravelTimes3.Click the configuration buttona.Active travel times - Select the traveltime sections (set in previous lesson)b.Time– select the time frame and intervalto collect the datac.Output– select compiled data4.Click OK1.Select Evaluation> File from the main menu2.In the vehicles tab check the box for Delay3.Click the configuration buttonplete the Delay Measurements windowa.No. active travel times - Select thetravel time sectionsb.Time– select the time frame and intervalto collect the datac.Output– select compiled data5.Click OK* Delay is the average total delay per vehicle in seconds and is measured as the difference in thereal travel time and the theoretical travel timeLesson 4: View Travel Time and Delay Output Files1.Go to the project folder. Notice two files. One with a .RSZ extension and one with a.VLZ extension2.Open the .RSZ file to view the Travel Time Outputa.Travel time= average time it takes to travel (in seconds) along the travel sectionb.# vehicles = number of vehicles that pass the*data provided for each 900s interval3.Open the .VLZ file to view the Delaya.Delay: Average total delay per vehicle (in seconds). The total delay is computedfor every vehicle completing the travel time section by subtracting the theoretical(ideal) travel time from the real travel time. The theoretical travel time is the timethat would be reached if there were no other vehicles and no signal controls orother stops in the network (reduced speed areas are taken into account).b.Stopd: Average standstill time per vehicle (in seconds), not including passengerstop times at PT stops or in parking lots.c.Stops: Average number of stops per vehicle, not including stops at PT stops or inparking lots.d.#Veh: Vehicle throughpute.Pers: Average total delay per person (in seconds), not including passenger stoptimes at PT stops.f.#Pers: Person throughput*data provided for each 900s interval。