vcStatement

vcStatement is the basic implementation for statements in a robot program and a process routine.

Hierarchy

Most statements can be manipulated directly as vcStatement type objects, while others have their own implementations that inherit vcStatement.

vcStatement

vcIfStatement

vcPathStatement

vcPositionStatement

vcMotionStatement

vcScopeStatement

Scope

Statements are created and contained in a vcScope object. The scope of a statement can be manipulated to change the order in which statements are executed and nest statements to form conditional loops and paths in a routine.

Robot Motions

Positions for motion type statements are frames implemented as vcPositionFrame objects. New positions can created using methods in vcPositionStatement. A position can be referenced by more than one statement, thereby allowing statements to call set positions in a robot program.

For information on types of statements, go to Statement Constants.

Common Properties

The following properties are common to all statements.

Name Type Access Description
IsEnabled Boolean RW Defines if the statement is activated or deactivated.
Name String RW Defines the name of the statement.
ParentScope vcScope R Gets the scope of the statement.
Properties List of vcProperty R Gets a list of properties of the statement.
ParentRoutine vcRoutine R Gets the routine of the statement.
Type Enumeration R Gets the statement's type.

See Statement Constants for more information.

Robot Statement Specific Properties

Assign Variable

An Assign Variable statement sets the value of a variable in a routine. The statement and variable must belong to the same routine in a robot program.

Name Type Access Description
TargetProperty String RW Defines the name of variable to assign a value.
ValueExpression String RW Defines an expression that when evaluated returns the value to assign TargetProperty.

Break

A Break statement immediately ends the execution of a While statement. This statement has no other specific properties.

Call Sequence

A Call Sequence statement allows a routine to branch out and execute another subroutine in a robot program.

Name Type Access Description
Routine vcRoutine RW Defines a subroutine in robot program called by the statement.

Notes:

  • In some cases, you may want to use a Return statement in a called subroutine in order to end that branch of execution and complete a Call Sequence statement.

Comment

A Comment statement is a non-executable statement in a robot program that is used to leave comments about the program.

Name Type Access Description
Comment String RW Defines the text of the comment.

Continue

A Continue statement is used to loop back the execution of a While statement to its beginning. This, of course, would skip over all other remaining statements in the scope and reevaluate the condition of the loop. This statement has no other specific properties.

Define Base

A Define Base statement changes the position of a base frame in robot during a simulation. When you reset a simulation, the base frame returns to its initial position.

Name Type Access Description
IPOMode Enumeration RW Defines the interpolation mode of the frame and the external configuration of a referencing robot controller.

0
Default setting, so no effect on robot's external configuration.

1
Robot position inherits orientation of base frame.

2
Robot position inherits orientation of base frame.

Interpolation constants can be used with this property.

Note: A conflict can occur if a base-tool pair in a referencing robot have the same IPOMode property value or cannot be used with the robot's current configuration.

IsRelative Boolean RW Defines if Position is based in base frame coordinate system or its parent coordinate system.

A True value uses base frame coordinate system, so frame will be moved relative to its location at the time of statement execution.

A False value uses the parent coordinate system of base frame defined in Node, so frame will be moved to an absolute location.

Node vcNode RW Defines the parent node of base frame.
Position vcMatrix RW Defines the position matrix of referenced base frame.
Base vcBaseFrame RW Defines the base frame in robot affected by the statement.

Define Tool

A Define Tool statement changes the position of a tool frame in robot during a simulation. When you reset a simulation, the tool frame returns to its initial position.

Name Type Access Description
IPOMode Enumeration RW Defines the interpolation mode of the frame and the external configuration of a referencing robot controller.

0
Default setting, so no effect on robot's external configuration.

1
Robot position inherits orientation of tool frame.

2
Robot position inherits orientation of tool frame.

Interpolation constants can be used with this property.

Note: A conflict can occur if a base-tool pair in a referencing robot have the same IPOMode property value or cannot be used with the robot's current configuration.

IsRelative Boolean RW Defines if Position is based in tool frame coordinate system or its parent coordinate system.

A True value uses tool frame coordinate system, so frame will be moved relative to its location at the time of statement execution.

A False value uses the parent coordinate system of tool frame defined in Node, so frame will be moved to an absolute location.

Node vcNode RW Defines the parent node of tool frame.
Position vcMatrix RW Defines the position matrix of referenced tool frame.
Tool vcBaseFrame RW Defines the tool frame in robot affected by the statement.

Delay

A Delay statement delays the execution of a robot program by a given amount of time.

Name Type Access Description
Delay Real RW Defines the amount of time in seconds of the delay.

Halt

A Halt statement can stop a simulation.

Name Type Access Description
HaltSimulation Boolean RW Defines if the statement stops a simulation.

A True value stops a simulation, whereas a False value has no effect on a simulation.

ResetSimulation Boolean RW Defines if the statement stops and then resets a simulation.

A True value resets a simulation, whereas a False value has no effect on a simulation.

Print Message

A Print Message statement allows you to print feedback in the Output panel.

Name Type Access Description
Message String RW Defines the text of the message.

Program Synchronize

A Program Synchronize statement allows the execution of a robot program to be synced with programs in other robots.

Name Type Access Description
SyncComponents List of vcComponent RW Defines a list of components to sync with the statement.

This means each component is also executing its own Program Synchronize statement.

SyncMessage String RW Defines the message to trigger synchronization.

All components in SyncComponents must use the same message.

WaitSync Boolean RW Defines if the statement sends its message and waits to receive the same message from all other components in SyncComponents.

A True value waits, whereas a False value sends a message and ends the execution of the statement.

Return

A Return statement ends the execution of a routine. In most cases, you would use a Return statement to end the execution of a called subroutine in a robot program. This statement has no other specific properties.

Set Binary Output

A Set Binary Output statement sets the value of a signal mapped to an output port of a robot.

Name Type Access Description
OutputPort Integer RW Defines the port of robot set by the statement.
OutputValue Boolean RW Defines the value of the port set by the statement.

Set Statistics

A Set Statistics statement sets the statistics behavior of a robot.

Type constant: VC_STATEMENT_SETROBOTSTATISTICSSTATE

Name Type Access Description
Statistics vcStatistics RW Defines the statistics behavior of robot referenced by the statement.
State String RW Defines the current state of robot.   When you create a new Set Statiscs statement, the initial state is NULL. You can also add custom states.

Switch Case

Switch Case statement executes the first vcCaseScope for which the value of its CaseCondition property matches that of statement’s Condition property.

Type constant: VC_STATEMENT_SWITCHCASE

Properties

Name Type Access Description
Condition Expression RW

Expression that defines the value against which the case conditions are evaluated.

See also  Robot Statements.
Cases List of vcCaseScope RO All case scopes in this statement. Each scope has an RW property CaseCondition of type String which will be evaluated against statement’s Condition.

Wait for Binary Input

A Wait for Binary Input statement delays the execution of a robot program until the value of a signal mapped to an input port in a robot has a specific value. The evaluation of the port can be cyclic or triggered by a signal event.

Name Type Access Description
InputPort Integer RW Defines the port of robot evaluated by the statement.
InputValue Boolean RW Defines if InputPort value needs to be True or False to complete the statement.
WaitTrigger Boolean RW Defines if InputValue is evaluated when a signal mapped to InputPort has an event, for example a change in its value.

A True value waits for a signal event or trigger, whereas a False value will not wait to check the value of InputPort.

Note: A signal event or trigger must occur while the robot is executing the statement, otherwise the robot wil miss the event.

Process Statement Specific Properties

Append To List

Append To List statement joins content of source variable to end of the target variable.

Type constant: VC_STATEMENT_APPENDTOLIST

Name Type Access Description
AllowDuplicates Boolean RW

If already existing values should be added to the target variable.

SourceVariableName String RW

Name of the variable from which values are copied. Can be a list or a single variable.

TargetVariableName String RW

Name of the variable where values are appended. A new list variable is created if necessary.

Assign Variable

An Assign Variable statement sets the value of a variable in a routine. The statement and variable must belong to the same routine in a robot program.

Name Type Access Description
TargetProperty String RW Defines the name of variable to assign a value.
ValueExpression Expression RW

Defines an expression that when evaluated returns the value to assign TargetProperty. The value is casted automatically to the target property type.

See also Process Statement Expressions.

Attach

This statement attaches components of one or more child products to component of a parent product.

Type constant: VC_STATEMENT_ATTACHPRODUCT

Name Type Access Description
Child String RW Name of the variable that holds one or more references to the vcProduct that are to be attached to the Parent. Can be a list or a single variable.
Parent String RW Name of the variable that holds reference to a single vcProduct where to attach.

Break

A Break statement immediately ends the execution of a While statement. This statement has no other specific properties.

 

Buffer

Buffer statement creates a temporary storage for products in a grid pattern. Multiple products can be coming in and leaving the buffer in parallel. Transport of products is handled similarly to the Transport statements. The statement continues execution until the break condition is met and the buffer has emptied.

Type constant: VC_STATEMENT_BUFFERPRODUCTS

Name Type Access Description
AcceptAllProductTypes

Boolean

RW (Deprecated) Use vcProductFilter.IsEnabled property instead.

When True, any product is accepted, ignoring AcceptedFlowGroups and AcceptedProductTypes.
AcceptedFlowGroups

List of vcProcessFlowGroup

RW (Deprecated) Use vcProductFilter instead.

Allows only the selected flow groups.
AcceptedProductTypes

List of vcProductType

RW (Deprecated) Use vcProductFilter instead.

Allows only the selected product types.
BreakCondition

Expression (boolean)

RW

When this expression evaluates to True (at least once), the buffer stops accepting products. This allows the buffer to empty and then the statement execution to end.

Note: The expression is evaluated at the start of the statement execution and every time a product arrives to or leaves the buffer.

Note: Must be from the same component.

See also Process Statement Expressions.
BufferMode

Enumeration

RW

Defines the product access order of the buffer.

StatisticsFlowDirection

See BufferMode Constants for more information.

Destination

Enumeration

RW

Defines the destination to where products leave the buffer.

See TransportOutType Constants for more information.

DestinationContainer

vcContainer

RW Component container whose output connection is used to place the outgoing products. Only used when Destination is set to VC_TRANSPORTOUTTYPE_CONTAINER.
InputResourcePositionFrame

vcFrameFeature

RW Defines resource position offset from product position and XY plane on which resource position is projected to while emptying the buffer.

This allows the resource position to move along with the product position but still remain on a certain plane.

Note: Must be from the same component.

ParallelInputLimit

Integer

RW Defines how many products can be arriving to the buffer in parallel. Note: Must be greater than zero.
ParallelOutputLimit

Integer

RW Defines how many products can be leaving the buffer in parallel.
Note: Must be greater than zero.
PatternCount

vcVector

RW Number of buffer slots per X,Y,Z axis. The Real values of the vector are rounded to nearest Integer values. Each dimension should in inclusive range 0 to 1289.
PatternStep

vcVector

RW Step between products in pattern per X,Y,Z axis.
ProductPositionFrame

vcFrameFeature

RW

Frame defining the position and orientation of the product pattern in combination with the Offset property.

Note: Must be from the same component.

ReservedProductVariableName

String

RW

Name of variable containing products already reserved using Reserve Product statement. The buffer will be first filled using these products and then will continue to receive further products as defined by the Source property.

Note: The product filtering defined by properties AcceptAllProductTypes, AcceptedFlowGroups and AcceptedProductTypes is not applied to the pre-reserved products.

Source

Enumeration

RW

Defines how products get into the buffer.

See TransportInType Constants for more information.

Change Type

Change Type statement changes one or more product instances to be of another product type both logically and visually.

Type constant: VC_STATEMENT_CHANGEPRODUCTTYPE

Name Type Access Description
DeleteAttached Boolean RW When True, any components attached to the changed product’s component are deleted. When False, any attached components are reattached to new nodes in the rebuilt parent component based on the parent node names.
NewType vcProductType RW The product type to change the products to.
ProductVariableName String RW Name of variable containing the products (vcProduct) to change. Can be a list of products.
RetainVisitCount Expression RW Gets an expression property which defines if vcProduct's process visit counts for all visited processes should be reset back to zero, or preserved as they are when this statement is executed and product changes flow groups. The default is to reset them to zero.

Comment

A Comment statement is a non-executable statement in a robot program that is used to leave comments about the program.

Type constant: VC_STATEMENT_COMMENT

Name Type Access Description
Comment String RW Defines the text of the comment.

Continue

A Continue statement is used to loop back the execution of a While statement to its beginning. This, of course, would skip over all other remaining statements in the scope and reevaluate the condition of the loop. This statement has no other specific properties.

Type constant: VC_STATEMENT_CONTINUE

Create

Create statement waits for free capacity at the target Container and then creates a new product instance (vcProduct). The product is created at the position of the Container.

Type constant: VC_STATEMENT_CREATEPRODUCT

Name Type Access Description
Container vcContainer RW

Component container where to place the created product’s component.

If set to None, the associated transport node’s (vcTransportNode) container is used.

ProductType vcProductType RW The product type to instantiate.
ProductVariableName String RW Name of a variable where to store a reference to the created product instance. A runtime variable is created if one doesn’t exist. Can be a list of products.

Delay

Delay statement waits for a specified amount of simulation time.

Type constant: VC_STATEMENT_PROCESSDELAY

Name Type Access Description
Distribution String RW

Defines an expression to calculate a value for the amount of seconds to wait for. A sample is taken when the statement execution begins.

Available functions include:

normal( u, s )
Normal distribution for mean value u, and the standard deviation s.

lognormal( u, s )
Log normal distribution for mean u, and the standard deviation s.

uniform( a, b )
Uniform distribution in range a <= x < b.

exponential( lambda )
Exponential distribution where the mean is 1/lambda and the variance is 1/lambda^2.

gamma( k, theta )
Gamma distribution with shape k and scale theta.

triangular( min, mode, max )
Triangular distribution with the specified minimum, mode and maximum values.

weibull( k, lambda )
Weibull distribution with shape k and scale lambda.

Tip: Use RandomStream to have the distribution use a stream for seeding a value and generating the same set of random numbers during a simulation. That is, if you reset and run a simulation you should expect the same values given in the previous simulation.

Expression Expression (real) RW

Amount to wait for defined as an expression that must evaluate to a Real value at the start of the statement execution.

Unit is seconds of simulation time.

See also Process Statement Expressions.

TimeSource Enumeration RW

Defines whether to evaluate the Distribution or Expression property to get the amount of time to wait for.

See Time Source Constants for more information.

Detach

Detach statement detaches the component(s) (vcComponent) of one or more products (vcProduct) from the component of a common parent product (vcProduct). The products to detach can be filtered by type (vcProductType).

Type constant: VC_STATEMENT_DETACHPRODUCT

Name Type Access Description
AcceptAllProductTypes Boolean RW (Deprecated) Use vcProductFilter.IsEnabled property instead.

When True any product is accepted, ignoring AcceptedFlowGroups and AcceptedProductTypes
AcceptedFlowGroups List of vcProcessFlowGroup RW

(Deprecated) Use vcProductFilter instead.

Allows only the selected flow groups.

AcceptedProductTypes List of vcProductType RW

(Deprecated) Use vcProductFilter instead.

Allows only the selected product types.

DetachedVariableName String RW

Name of output variable where to store references to the detached products (vcProduct).

DetachMany Boolean RW

When True, detaches all products that match the filter, otherwise only the first one.

ProductVariableName String RW

Name of input variable from which to get the parent product instance (vcProduct).

Flow

Flow statement updates statistics behavior (vcStatistics) and it records one or more products’ (vcProduct) components (vcComponent) transferring in or out. If more than one product is given as input, they are all recorded at once.

Type constant: VC_STATEMENT_SETSTATISTICSFLOW

Name Type Access Description
FlowDirection Enumeration RW

Whether the product transferred into the process or left it.

See StatisticsFlowDirection Constants for more information.

ProductVariableName String RW

Name of input variable from which to get the product instances to record (vcProduct).

Note: Can be a list of products.

Statistics vcStatistics RW The statistics behavior to change the state of. Note: Must be from the same component.

Get Property

Get Property statement creates a runtime variable that acts as a proxy to a property (vcProperty). The proxy variable’s value and the targeted property’s value are tied together such that changing one means changing the other as well. The targeted property can be a static component’s (vcComponent) property or a static component’s behavior’s (vcBehaviour) property.

Note: The target property is specified using 3 properties (SelectedComponent, SelectedBehavior, SelectedProperty) for UI reasons. They have to be set in correct order.

Type constant: VC_STATEMENT_GETPROPERTY

Name Type Access Description
PropertyVariableName String RW Name of the proxy runtime variable to create.
SelectedComponent vcComponent RW

The static component that owns the target property. None value means parent component of the statement.

SelectedBehavior vcBehaviour RW

Behaviour that owns the target property.

Must be owned by the SelectedComponent.

None value means SelectedProperty is a component property of SelectedComponent.

Must be set after SelectedComponent has been set.

SelectedProperty vcProperty RW

The target property to get.

Note: Must be a property of either SelectedComponent or SelectedBehavior depending on the value of SelectedBehavior.

Note: Must be set after SelectedComponent and SelectedBehavior.

Note: Value type of the property must be Integer, Real, vcVector, vcMatrix or String.

Halt

A Halt statement can stop a simulation.

Name Type Access Description
HaltSimulation Boolean RW Defines if the statement stops a simulation.

A True value stops a simulation, whereas a False value has no effect on a simulation.

ResetSimulation Boolean RW Defines if the statement stops and then resets a simulation.

A True value resets a simulation, whereas a False value has no effect on a simulation.

If

If statement executes ThenScope when Condition evaluates to True or ElseScope when it evaluates to False. If Condition is invalid neither ThenScope nor ElseScope are executed.

Type constant: VC_STATEMENT_PROCESSIF

Name Type Access Description
Condition Expression (boolean) RW

Condition expression to evaluate when the statement is executed.

See also Process Statement Expressions.

ElseScope

vcScope R Scope to execute when Condition evaluates to False.
ThenScope vcScope R Scope to execute when Condition evaluates to True.

Move Joint

Move Joint statement uses a servo controller behavior (vcServoController) to move a joint to given value and waits until the motion completes.

Type constant: VC_STATEMENT_MOVEJOINT

Name Type Access Description
Controller vcServoController RW

The controller that owns the joint. This can be a servo controller or a derived controller, e.g. a vcRobotController.

Note: Must be from the same component.

Joint vcJoint RW

The joint to move.

Note: Must be set after Controller has been set.

MotionTime Expression (real) RW

An expression for motion time. This can be left empty to let the controller plan the motion. If not left empty, this expression must evaluate to a Real or Integer result.

See also Process Statement Expressions.
TargetValue Expression (real) RW

An expression for the target value.

Note: Must evaluate to a Real or Integer result.

See also Process Statement Expressions.

Print

A Print statement allows you to print feedback in the Output panel.

Type constant: VC_STATEMENT_PRINT

Name Type Access Description
Message Expression RW

Expression that is evaluated to create the message. The expression can evaluate to any value type, not just a String.

See also Process Statement Expressions.

PrependHeader Boolean RW

When True, the message is printed along with a prefix indicating its owner.

ComponentName::ProcessExecutorName::ProcessRoutineName: YourMessage

Otherwise prints only result of the Message expression.

Property Condition

Property Condition statement creates a process requirement based on a property value. The targeted property can be a static component’s property or a static component’s behavior’s (vcBehaviour) property.

This is a requirement statement and thus can be only added to the Requirements routine of a process routine (vcProcessRoutine).

Note: The target property is specified using 3 properties (SelectedComponent, SelectedBehavior, SelectedProperty) for UI reasons. They have to be set in correct order.

Type constant: VC_STATEMENT_PROPERTYCONDITION

Name Type Access Description
Condition Expression RW

The condition expression to evaluate against the SelectedProperty.

Note: The condition can reference process variables but the condition is re-evaluated only when the SelectedProperty changes value.

See also Process Statement Expressions.

SelectedComponent vcComponent RW The static component that owns the target property. None value means parent component of the statement.
SelectedBehavior vcBehaviour RW

Behavior that owns the target property.

Note: Must be owned by the SelectedComponent.

Note: None value means SelectedProperty is a component property of SelectedComponent.

Note: Must be set after SelectedComponent has been set.

SelectedProperty vcProperty RW

The target property to get.

Note: Must be a property of either SelectedComponent or SelectedBehavior depending on the value of SelectedBehavior.

Note: Must be set after SelectedComponent and SelectedBehavior.

Note: Value type of the property must be Integer, Real, vcVector, vcMatrix or String.

Release Product Reservation

Release Product Reservation statement releases reserved product instances which are reserved by ReserveProduct statement(s). Reservation cannot be released after a product’s transport has started.

Type constant: VC_STATEMENT_RELEASEPRODUCTRESERVATION

Name Type Access Description
ProductVariableName String RW Name of the variable that holds the reserved products (vcProduct).

Remove

Remove statement deletes one or more product instances and resets value of the variable.

Type constant: VC_STATEMENT_REMOVEPRODUCT

Name Type Access Description
ProductVariableName String RW Name of the variable that holds the products to delete (vcProduct).

Reserve Product

Run Robot Routine

Waits until the robot is idle, then evaluates the given RoutineName expression and tries to find the routine, then start the routine, and waits until the routine has been executed to completion.

Type constant: VC_STATEMENT_RUNROBOTROUTINE

Name Type Access Description
Component vcComponent RW

The component from which to search for a robot executor.

Note: If the component has multiple robot executors, the first one of the these will be selected.

Note: None can be used to select the component that owns the process executor that is running this statement.

RoutineName Expression RW

An expression that must evaluate to a string value.

During execution, the statement will attempt to find a routine from the selected robot executor with that name. This expression evaluation and routine search will be performed again each time the robot becomes idle.

See also Process Statement Expressions.

Select Products

Copies product instance (vcProduct) references from one list to another variable. Product type filtering can be applied to only copy some product references.

Type constant: VC_STATEMENT_SELECTPRODUCTS

Name Type Access Description
AcceptAllProductTypes Boolean RW (Deprecated) Use vcProductFilter.IsEnabled property instead.

When True any product is accepted, ignoring AcceptedFlowGroups and AcceptedProductTypes
AcceptedFlowGroups List of vcProcessFlowGroup RW (Deprecated) Use vcProductFilter instead.

Allows only the selected flow groups.
AcceptedProductTypes List of vcProductType RW (Deprecated) Use vcProductFilter instead.

Allows only the selected product types.
ProductVariableName String RW Name of the input list variable to copy product instance (vcProduct) references  from.
SplitVariableName String RW

Name of the variable where to copy the product instance (vcProduct) references to.

Note: The variable is created if it does not exist already. The variable is always made into a list of products regardless of if any products got copied from the input.

Send Signal

Send Signal statement sends a simulation signal, i.e. triggers a vcSignal behavior, with a given value.

Type constant: VC_STATEMENT_SENDSIGNAL

Name Type Access Description
Component vcComponent RW

The component that owns the signal.

Note: Must be a static component.

Note: None means the parent component of this statement.

Signal vcSignal RW

The signal behavior to trigger.

Note: Must be either Boolean, Integer, Real or String signal.

Note: Must be from the component assigned to the Component property.

Note: Must be set after the Component property has been set.

Value Expression RW

An expression to generate the value for the signal.

This can reference e.g. static properties or properties in dynamic products.

See also Process Statement Expressions.

Set Next Flow Step Statement

Type constant: VC_STATEMENT_SETNEXTFLOWSTEP

Name Type Access Description
FlowInfoVariableName String RW Name of the Process variable where to get the Product instances.
ProductVariableName String RW Defines the selection of process groups that will be affected by this statement.
ForceExactFlowStep Expression RW An editable list of explicitly accepted process groups. Used with SpecificProcesses mode.
ForceExactProcessGroup Expression RW An expression which defines the number to assign as process visit count.
RetainVisitCount Expression RW Defines how the result of VisitCount will be applied.

Set Node Material

Set Node Material statement changes the material of a node in one or more product instances’ components.

Type constant: VC_STATEMENT_SETNODEMATERIAL

Name Type Access Description
Force Boolean RW

When True, sets the vcNode.MaterialInheritance to VC_MATERIAL_FORCE_INHERIT_NODE.

When False, material inheritance setting in the target node is not changed.

Material vcMaterial RW The material to set to the node.
NodeName String RW

Name of the target node (vcNode).

Note: Empty string means the root node of the target product (vcProduct).

ProductVariableName String RW Name of the input variable where to get the Product instances.

Set Node Visibility

Changes the visibility of a node in one or more product instances’ components.

Type constant: VC_STATEMENT_SETNODEVISIBILITY

Name Type Access Description
NodeName String RW

Name of the target node (vcNode).

Empty string means the root node of the target product (vcProduct).

ProductVariableName String RW Name of the input variable where to get the Product instances.
Visibility Enumeration RW

Target visibility state to set.

See NodeVisibilityState Constants for more information.

Set Product Visit State Statement

A process statement that assigns (and resets) the state of how many times a product instance has visited some process.

Type constant: VC_STATEMENT_SETPRODUCTVISITSTATE

Name Type Access Description
ProductVariableName String RW Name of the Process variable where to get the Product instances.
TargetProcessMode Enumeration RW Defines the selection of process groups that will be affected by this statement.
Processes List of vcProcessGroup RW An editable list of explicitly accepted process groups. Used with SpecificProcesses mode.
VisitCount Expression RW An expression which defines the number to assign as process visit count.
VisitCountMode Enumeration RW Defines how the result of VisitCount will be applied.

Set State

Sets the current state of a statistics behavior (vcStatistics).

Type constant: VC_STATEMENT_SETSTATISTICSSTATE

Name Type Access Description
State String RW

Name of the state to set.

Note: Must be set after the Statistics property has been set.

Statistics vcStatistics RW

The statistics behavior to change the state of.

Note: Must be from the same component.

Start Transport In

Start Transport In statement transports product(s) into the process. More than one pre-reserved product can be transported in, otherwise transports only a single product.

The statement execution is asynchronous, meaning that next statements may execute before the transport is finished. Must be used in combination with the Wait Transport statement.

Type constant: VC_STATEMENT_STARTTRANSPORTIN

Name Type Access Description
AcceptAllProductTypes Boolean RW (Deprecated) Use vcProductFilter.IsEnabled property instead.

When True any product is accepted, ignoring AcceptedFlowGroups and AcceptedProductTypes
AcceptedFlowGroups List of vcProcessFlowGroup RW (Deprecated) Use vcProductFilter instead.

Allows only the selected flow groups.
AcceptedProductTypes List of vcProductType RW (Deprecated) Use vcProductFilter instead.

Allows only the selected product types.
ProductPositionFrame vcFrameFeature RW

Defines the position and orientation where the product instance should be placed.

Note: Must be from the same component.

ProductVariableName String RW Name of output variable where to store the transported product(s) (vcProduct).
ReservedProductVariableName String RW

Name of a variable containing products (vcProduct) already reserved using Reserve Product statement. If defined, the statement will transport in those specific products.

Note: The product filtering defined by properties AcceptAllProductTypes, AcceptedFlowGroups and AcceptedProductTypes is not applied to the pre-reserved products.

ResourcePositionFrame vcFrameFeature RW

Defines a position hint where a transport resource should be when placing the product.

Must be from the same component.

Start Transport Out

Transports one or more products (vcProduct) out from the process in parallel. The statement execution is asynchronous, meaning that next statements may execute before the transport is finished. Must be used in combination with the Wait Transport statement.

Type constant: VC_STATEMENT_STARTTRANSPORTOUT

Name Type Access Description
Container vcContainer RW

Defines a component container where to place the products (vcProduct).

Must be from the same component.

Only used when Destination is VC_TRANSPORTOUTTYPE_CONTAINER

Destination Enumeration RW

Defines where the products should go.

See TransportOutType Constants for more information.

DestinationNode vcTransportNode RW

Defines a transport node where to send the products using the transport system (vcProduct).

Note: Only used when Destination is VC_TRANSPORTOUTTYPE_TRANSPORTNODE

ProductVariableName String RW Name of input variable where to get the products (vcProduct).
ResourcePositionFrame vcFrameFeature RW

Defines a position hint where a transport resource should be when picking the products.

Note: Must be from the same component.

Switch Case

Switch Case statement executes the first vcCaseScope for which the value of its CaseCondition property matches that of statement’s Condition property.

Type constant: VC_STATEMENT_SWITCHCASE

Properties

Name Type Access Description
Condition Expression RW

Expression that defines the value against which the case conditions are evaluated.

See also Process Statement Expressions.
Cases List of vcCaseScope RO All case scopes in this statement. Each scope has an RW property CaseCondition of type String which will be evaluated against statement’s Condition.

Methods

Name Return value Parameters Description
addCase

vcCaseScope

or

vcCaseScope

or

None

None

or

Integer index

or

Integer index,

vcCaseScope scope

Creates a new case and appends it to the end.

or

Creates a new case and inserts it to the given index. If index is less than zero or greater than the current case count, the case will be appended to the end.

or

Inserts an existing case to the given index. If index is less than zero or greater than the current case count, the case will be appended to the end.

moveCase None

vcCaseScope scope,

Integer newIndex

Moves an existing case to the new position. If the given index is less than zero or greater than the current case count, the case will be moved to the end.
deleteCase None vcCaseScope scope

Removes an existing case and deletes it.

releaseCase None vcCaseScope scope Removes an existing case.
getCase vcCaseScope Integer index Gets an existing case.

Events

Name Parameters Description
OnCaseAdded

vcCaseScope scope,

Integer index

Event that occurs when a case has been added. Provides an index where case was inserted.
OnCaseMoved

vcCaseScope scope,

Integer oldIndex,

Integer newIndex

Event that occurs when a case has been moved to a new index. Provides both old and new indices.
OnCaseRemoved

vcCaseScope scope,

Integer index

Event that occurs when a case has been removed. Provides an index case was removed from.

 

Transport In

Transport In statement sequentially transports product(s) (vcProduct) into the process and waits until they have arrived. More than one pre-reserved product can be transported in, otherwise transports only a single product.

Type constant: VC_STATEMENT_TRANSPORTIN

Name Type Access Description
AcceptAllProductTypes Boolean RW (Deprecated) Use vcProductFilter.IsEnabled property instead.

When True any product is accepted, ignoring AcceptedFlowGroups and AcceptedProductTypes
AcceptedFlowGroups List of vcProcessFlowGroup RW (Deprecated) Use vcProductFilter instead.

Allows only the selected flow groups.
AcceptedProductTypes List of vcProductType RW (Deprecated) Use vcProductFilter instead.

Allows only the selected product types.
ProductPositionFrame vcFrameFeature RW

Defines the position and orientation where the product instance should be placed.

Note: Must be from the same component.

ProductVariableName String RW Name of output variable where to store the transported product(s) (vcProduct).
ReservedProductVariableName String RW

Name of a variable containing products (vcProduct) already reserved using Reserve Product statement. If defined, the statement will transport in those specific products.

Note: The product filtering defined by properties AcceptAllProductTypes, AcceptedFlowGroups and AcceptedProductTypes is not applied to the pre-reserved products.

ResourcePositionFrame vcFrameFeature RW

Defines a position hint where a transport resource should be when placing the product.

Must be from the same component.

Source Enumeration RW

Defines how to get the product (vcProduct).

See TransportInType Constants for more information.

Transport Out

Transport Out statement sequentially transports one or more products (vcProduct) out from the process and waits until the last one has left.

Type constant: VC_STATEMENT_TRANSPORTOUT

Name Type Access Description
Container vcContainer RW

Defines a component container where to place the products (vcProduct).

Note: Must be from the same component.

Only used when Destination is VC_TRANSPORTOUTTYPE_CONTAINER

Destination Enumeration RW

Defines where the products should go.

See TransportOutType Constants for more information.

DestinationNode vcTransportNode RW

Defines a transport node where to send the products using the transport system (vcProduct).

Only used when Destination is VC_TRANSPORTOUTTYPE_TRANSPORTNODE

ProductVariableName String RW Name of input variable where to get the products (vcProduct).
ResourcePositionFrame vcFrameFeature RW

Defines a position hint where a transport resource should be when picking the products.

Note: Must be from the same component.

Transport Pattern In

Sequentially transports products (vcProduct) into a regular grid pattern and waits until they have arrived.

Type constant: VC_STATEMENT_TRANSPORTPATTERNIN

Name Type Access Description
AcceptAllProductTypes Boolean RW (Deprecated) Use vcProductFilter.IsEnabled property instead.

When True any product is accepted, ignoring AcceptedFlowGroups and AcceptedProductTypes
AcceptedFlowGroups List of vcProcessFlowGroup RW (Deprecated) Use vcProductFilter instead.

Allows only the selected flow groups.
AcceptedProductTypes List of vcProductType RW (Deprecated) Use vcProductFilter instead.

Allows only the selected product types.
Offset vcMatrix RW Offset of the first product position from ProductPositionFrame.
PatternCount vcVector RW Number of pattern slots per X,Y,Z axis. The Real values of the vector are rounded to nearest Integer values. Each dimension should in inclusive range 0 to 1289.
PatternStep vcVector RW Step between products in pattern per X,Y,Z axis.
ProductPositionFrame vcFrameFeature RW

Frame defining the position and orientation of the product pattern in combination with the Offset property.

Must be from the same component.

ReservedProductVariableName String RW

Name of variable containing products (vcProduct) already reserved using Reserve Product statement. The pattern will be first filled using these products and then will continue to receive further products if needed.

Note: The product filtering defined by properties AcceptAllProductTypes, AcceptedFlowGroups and AcceptedProductTypes is not applied to the pre-reserved products.

ResourcePositionFrame vcFrameFeature RW

Defines a position hint where a transport resource should be when placing the products.

Note: Must be from the same component.

Wait Property Condition

Waits for a variable’s value to pass a specified condition. VariableName and Condition property values form a single expression that is evaluated every time the value of the variable defined by VariableName changes. Variable name property can refer to process variables or component properties of the owner component.

Type constant: VC_STATEMENT_WAITPROPERTYCONDITION

Name Type Access Description
Condition Expression (boolean) RW

Expression to evaluate the variable value. Needs to form a Boolean expression together with the variable value.

See also Process Statement Expressions.

VariableName String RW Name of the variable or component property to monitor.

Wait Signal

Wait Signal statement waits for signal to be triggered with a value that matches a given condition or until an optional timeout is reached.

Type constant: VC_STATEMENT_WAITSIGNAL

Name Type Access Description
Component vcComponent RW

Component that owns the signal.

None means the parent component of the statement.

Condition Expression RW

Condition expression that the signal's value has to pass.

Leave empty to accept any value.

See also Process Statement Expressions.

Signal vcSignal RW

Signal behavior to listen for.

Must be from the component specified by the Component property.

Must be set after the Component property has been set.

Timeout Real RW

Maximum amount of simulation time in seconds to wait for a value that matches the condition.

0 means no time limit.

TimedOutVariableName String RW

Name of a process variable where to store a Boolean value whether the timeout was reached or not.

Can be left empty.

ValueOutputVariableName String RW

Name of a process variable where to store the signal value that passed the condition.

Can be left empty.

WaitTrigger Boolean RW Whether to always wait for a new signal value. When False, also considers the current value of the signal when this statement's execution starts.

Wait Transport

Wait Transport statement waits for one or more transport operations started with StartTransportIn or StartTransportOut statements to complete.

Type constant: VC_STATEMENT_WAITTRANSPORT

Name Type Access Description
ProductVariableName String RW Name of the variable that identifies the transport operations to wait for.

While

While statement executes Scope in a loop as long as Condition evaluates to True.

Type constant: VC_STATEMENT_PROCESSWHILE

Name Type Access Description
Condition Expression (boolean) RW

Condition expression to evaluate on each loop iteration.

See also Process Statement Expressions.
Scope vcScope R Scope to keep executing while Condition evaluates to True.

Work

Sends a work request to a transport controller (vcPythonTransportController) and waits until the work is complete.

Type constant: VC_STATEMENT_WORK

Name Type Access Description
Controller vcPythonTransportController RW Defines the transport controller delegating the work to a resource.
ProcessTime Expression (real) RW

Defines an expression to calculate a value for the work duration in seconds. A sample is taken when the statement execution begins.

Available functions include:

normal( u, s )
Normal distribution for mean value u, and the standard deviation s.

lognormal( u, s )
Log normal distribution for mean u, and the standard deviation s.

uniform( a, b )
Uniform distribution in range a <= x < b.

exponential( lambda )
Exponential distribution where the mean is 1/lambda and the variance is 1/lambda^2.

gamma( k, theta )
Gamma distribution with shape k and scale theta.

triangular( min, mode, max )
Triangular distribution with the specified minimum, mode and maximum values.

weibull( k, lambda )
Weibull distribution with shape k and scale lambda.

Tip: Use RandomStream to have the distribution use a stream for seeding a value and generating the same set of random numbers during a simulation. That is, if you reset and run a simulation you should expect the same values given in the previous simulation.

ProcessTimeExpression Expression (real) RW

Work duration defined as an expression that must evaluate to a Real value at the start of the statement execution.

Unit is seconds of simulation time.

See also Process Statement Expressions.

ResourcePositionFrame vcFrameFeature RW

Defines a position hint where a resource should be when doing the work.

Note: Must be from the same component.

TimeSource Enumeration RW

Defines whether to evaluate the ProcessTime or ProcessTimeExpression property to get the work duration.

See Time Source Constants for more information.
WorkPositionFrame vcFrameFeature RW Defines a position hint where the actual work happens.

Layout Item Specific Properties

View

A View statement is used with vcViewAnimation to set the view of the 3D world. Generally, this statement is used for animating camera movements during a simulation.

Name Type Access Description
Delay RW RW Defines the amount of time in seconds it takes camera to move to view in 3D world.  
View String RW Defines the name of view to move camera to in 3D world.

If the view does not exist in layout, the statement will still execute its Delay.

Methods

Name Return Type Parameters Description
createProperty vcProperty Enumeration type, String name Creates a new property of a given type and name in the statement, and then returns the new property.

An optional constraints argument can be used to define constraints for new property, which must be defined at the time of creation.

See Property Constants for more information.

deleteProperty None vcProperty property Deletes a given property in the statement.
getProperty vcProperty String name Returns a property matching a given name in the statement; otherwise returns None.