

To better follow the simulation, decrease the simulation speed in the EventController.Tecnomatix plant simulation software Multi CAD: Editing Imported 3D Data in Solid Edge Run the simulation to watch the parts moving along the Conveyor triggering the sensor and increasing the counter. param sensorID: integer, Front: booleanĪpply the source code by clicking the button on the Edit ribbon tab and then close the method window. To do so, select the text, then click it with the right mouse button and select Copy on the context menu, or press Ctrl+A, Ctrl+C, and then Ctrl+V. This places it at the start of the Conveyor.Ĭlick the button in the text box Control, select counter and then click OK.Ĭlick OK again to apply your changes and to close the dialog window of the Conveyor.Ĭopy the following source code and paste it into your method. Insert a Method from the tab Information Flow in the Toolbox below the object Conveyor.Ĭlick the Method with the right mouse button and rename it to counter.Ĭlick New and enter 0 as the Position of the sensor. On the tab Display select the Font size > Large. This way the value of the Variable is automatically set to 0 when the simulation starts. Select the check box Initial value and enter the value 0. Insert a Variable into your simulation model from the tab Information Flow in the Toolbox above the Conveyor.ĭouble-click the Variable and name it NumberOfDevices. Plant Simulation provides the proprietary programming language SimTalk for this purpose. You can write source code in a Method to define special behavior which cannot be set by selecting or entering settings into the dialogs of the objects. We will then use a Method to make Plant Simulation increase a counter whenever a part passes the sensor. To count the parts entering the Conveyor, we will insert a sensor at the beginning of the Conveyor.

As you run the simulation, you will see the parts moving along the Conveyor to the station PreTest.
