Table of Contents

Table of Contents

FlexScript Class - FlowMixer

FlowMixer

Inherits from FlowObject

Description

A class for FloWorks Mixer objects.

Properties

autoRepeat Gets or sets whether the mixer automatically repeats the recipe when it has finished.
content Gets the current content.
isEmpty Returns a value indicating whether the object is empty.
isFull Returns a value indicating whether the object is full.
maxContent Gets or sets the maximum content.
stats Allows access to a FloWorks object's statistics.
step Gets the current mixer step.

Methods

loadRecipe Loads a product recipe into the mixer.
startRecipe Start collecting products for the current recipe.

Details

Do no remove, this fixes the anchor on doc.flexsim.com

FlowMixer.autoRepeat

int autoRepeat

Description

Gets or sets whether the mixer automatically repeats the recipe when it has finished.

This property will return 0 if the mixer automatically stops (yellow box) after each recipe. You should call startrecipe() on the mixer to start the recipe manually. If a non-zero value is returned, the mixer automatically continues with the next recipe as soon as it has emptied. You can also set this property to one of these values to change the behaviour of the mixer (starting from the next On Empty event).

Do no remove, this fixes the anchor on doc.flexsim.com

FlowMixer.content

double content

Description

Gets the current content.

This property will return the current content of the object. You cannot set the current content of a mixer.

Do no remove, this fixes the anchor on doc.flexsim.com

FlowMixer.isEmpty

readonly int isEmpty

Description

Returns a value indicating whether the object is empty.

This property returns 0 if the object has any content, and non-zero if it is empty.


if(mixer.isEmpty) { 
  // ... 
} else { 
  // ...
}
	  
Do no remove, this fixes the anchor on doc.flexsim.com

FlowMixer.isFull

readonly int isFull

Description

Returns a value indicating whether the object is full.

This property returns 0 if the content of the object is below the maximum content, and non-zero if it is empty.


if(mixer.isFull) { 
  // ... 
} else { 
  // ...
}
	  
Do no remove, this fixes the anchor on doc.flexsim.com

FlowMixer.maxContent

double maxContent

Description

Gets or sets the maximum content.

This property will return or change the maximum content of the object.

An error will occur if you try to set the maximum content lower than 0 or below the current actual content.

Do no remove, this fixes the anchor on doc.flexsim.com

FlowMixer.stats

readonly stats

Description

Allows access to a FloWorks object's statistics.

This property provides the following properties and methods:

input - returns the current cumulative inflow of the object.

output - returns the current cumulative outflow of the object.

content (for content-holding objects only) - returns the current content of this object.

state(Variant& profile = nullvar) - returns a state tracked variable. If no profile argument is given, or if it is 1, then the default FloWorks state profile is returned. If the profile argument is equal to 0, the default FlexSim state profile is returned (note that most FloWorks objects do not use this). Other state profiles can be returned by providing the profile number or name.


// Get the state of a pump
FlowObject obj = model().find("FlowPump1");
int curState = obj.stats.state().value;	
		
Do no remove, this fixes the anchor on doc.flexsim.com

FlowMixer.step

int step

Description

Gets the current mixer step.

This property will return the current step that the mixer is executing..

Do no remove, this fixes the anchor on doc.flexsim.com

FlowMixer.loadRecipe()

int loadRecipe( Variant product )

Parameters

product The product to load.

Description

Loads a product recipe into the mixer.

If the flow mixer is in manual mode or is between recipes, you may change the current recipe by loading a recipe for a product from the FloWorks product table. The product may be specified by numeric index or by name. Note the recipe is not automatically started: if the mixer is in manual mode you should call startrecipe on it.

Returns true (1) if the mixer has successfully loaded the recipe. If it cannot load the recipe, for example because the FloWorks product table does not have a recipe for this product, false (0) is returned.

Do no remove, this fixes the anchor on doc.flexsim.com

FlowMixer.startRecipe()

int startRecipe( )

Description

Start collecting products for the current recipe.

If the mixer is not in autorepeat mode, it will automatically stop after each recipe has been completed and delivered (On Empty event of the mixer).

You can manually start collecting products for a new batch by calling this method. The mixer should be in non-auto-repeat mode and should be idle (yellow box).

Returns true (1) if the mixer has successfully started. If it cannot start, for example because autorepeat is off or the mixer is not idle, false (0) is returned.