article

Paul Toone avatar image
0 Likes"
Paul Toone posted

BasicTE Page   

Note: For more information on offset travel, refer to the TaskExecuter's documentation on offset travel.

OnBeginOffset - This picklist is fired at the beginning of an offset travel operation. An x,y,z offset location is passed into this function. From this x,y,z offset location, the object should figure out how it will travel the specified offset, and then return the amount of time it will take to make the travel operation.

Access variables for the OnBeginOffset function are as follows:

current: the current object

x: the requested x offset. This is an offset distance from the x center of the object.

y: the requested y offset. This is an offset distance from the y center of the object.

z: the requested z offset. This is an offset distance from the z base of the object.

item: if the offset operation has an involved item, this is a reference to the item

endspeed: this is the requested end speed for the offset travel operation

maxspeed: this is the value of this object's maximum speed variable

acceleration: this is the value of this object's acceleration variable

deceleration: this is the value of this object's deceleration variable

lastupdatedspeed: this is the value of this object's lastupdatedspeed variable. It is the end speed of the object's last travel operation.

rotatewhiletraveling: this is the value of this object's rotatewhiletraveling variable. It is a 1 or 0, and specifies whether the user wants the object to rotate while traveling.

OnUpdateOffset - This picklist is fired before the view is refreshed. Here is where the object updates its location based on its current offset operation.

OnFinishOffset - This picklist is fired when the object has finished its offset operation. This should update the location of the object to its final offset location.

Access variables for the OnUpdateOffset function and the OnFinishOffset function are defined as follows:

current: the current object

offsettingnow: this is the value of this object offsettingnow variable. If the object is currently doing an offset operation, this will be 1, otherwise 0. The offsettingnow value is automatically set to 1 when OnBeginOffset is called, and then set back to 0 when OnFinishOffset is called.

offsettingtotaltime: this is the value of this object offsettotaltime variable. It tells the total time this object returned from its OnBeginOffset function.

maxspeed: this is the value of this object's maximum speed variable

acceleration: this is the value of this object's acceleration variable

deceleration: this is the value of this object's deceleration variable

lastupdatedspeed: this is the value of this object's lastupdatedspeed variable. It is the end speed of the object's last travel operation.

rotatewhiletraveling: this is the value of this object's rotatewhiletraveling variable. It is a 1 or 0, and specifies whether the user wants the object to rotate while traveling.

curloadunloadtime: if the offset operation is a load or unload operation, then this value is the load/unload time for the operation. Note that if there is a non-zero load/unload time, then this time will be executed before the OnFinishOffset trigger is fired. This means that in your update offset function, you may need to query whether you're in the offset part of the operation, or in the load/unload part of the operation. Usually this will not matter, though, because the travel operations will finish, and during the remaining load/unload time, the update function will automatically set the object's location to the final destination location. You will really only need to use this if you are going to do some animation/movement during the load/unload time, as the ASRSvehicle and Elevator objects do.

Pick Offset - Place Offset-

This picklist is fired at two different times. First is when another transport object is attempting to place, or unload, a flowitem into this object. This is called place offset. It should return an offset location for the transport to offset to before placing the item. The second time this is called is when a transport is about to pick, or load, an item from this object. This is called pick offset. It should again return an offset location for the transport to offset to before picking the product up. Note that this function does not fire when this object is attempting to load/unload to or from another object, but rather when another object is attempting to load/unload to or from this object.

Access variables for the pick offset - place offset function are as follows:

current: the current object

pickoperation: this variable is 1 or 0. 1 means it is a pick operation, 0 means it is a place operation.

item: this is a reference to the item that is being picked or placed

otherobject: this is a reference to the object that is picking or placing the item

xvalnode, yvalnode, zvalnode: these parameters are references to nodes whose values should be set in this function, and will represent the offset location returned by this function. For example, if I want the picking/placing object to offset 10 in the x direction, 0 in the y direction, and 5 in the z direction, I would set xvalnode to 10 using the setnodenum() command, yvalnode to 0, and zvalnode to 5.

Note on the pick/place offset return value: If you are implementing your own pick/place logic here, and do not want the default logic to be executed, you must return 1 from this function. If the object gets a return value of 0 from this function, it will assume that nothing was done, and will execute its own default logic.

Stop Object - Resume Object -

This picklist is fired at two different times. First is when the stopobject() command is called for this object. Second is when the resumeobject command is called for this object. This field should define a strategy for how the object will "stop", and how it will "resume". This field should also manage data for remembering how many stop requests have been made, what the state of the object was before it was stopped, etc.

Access variables for the stop object - resume object function are as follows:

current: the current object

stopoperation: this value is either a 1 or 0. 1 means the stopobject() command is being called on this object. 0 means the resumeobject() command is being called on this object.

stopstate: this value is only applicable for a stop operation. It specifies the requested state passed into the stopobject() command.

nrofstopsnode: this is a reference to this object's nrofstops variable. If this is a stop operation, the value of this node should be incremented by 1 within this function. If it is a resume operation, the value of this node should be decremented by 1 within this function. Also, you will get the value of this node to know how many stopobject() commands have been called on this object. When the object is stopped for the first time (the value of the node goes from 0 to 1), you should execute logic specifying how to stop this object. When the object is resumed for the final time (the value of the node goes from 1 to 0), you should execute logic specifying how to resume this object.

timeoflaststopnode: this is a reference to this object's timeoflaststop variable. When this object is stopped for the first time, this node should be set to the current time, so you can know the amount of time the object was stopped when it is finally resumed.

statebeforestopnode: this is a reference to this object's statebeforestopped variable. When this object is stopped for the first time, this node should be set to the object's current state, so that you can know which state to go back to when the object is resumed.

Note on the stop/resume object return value: If you are implementing your own stop/resume logic here, and do not want the default logic to be executed, you must return 1 from this function. If the object gets a return value of 0 from this function, it will assume that nothing was done, and will execute its own default logic.

Advanced Functions - This picklist is fired for several different notifications or functions that are called on the object. For the most part, you will not need to implement any logic for these notifications, but they are nonetheless made accessible to you. The return value of this function should either be a 1 or a 0. If 0, the object will execute the default functionality associated with the given notification. If 1, the object not do any default functionality, but assumes that the function has overridden the default.

The type of notification called for the advanced function is passed in as parval(1), or msgtype. This parameter can be one of several values. These values are listed as follows:

ADV_FUNC_CLASSTYPE: This is a request to get the type of class of the object. The classtype should be returned as an integer with certain bits set high. You can construct this value using the bitwise OR operator | and several classtype macros. For example, a FixedResource's classtype is: CLASSTYPE_FLEXSIMOBJECT > CLASSTYPE_FIXEDRESOURCE.

ADV_FUNC_DRAGCONNECTION: This function is called when a keyboard key is held down, and the user clicks and drags from this object to another object. In this case, the object to which the mouse was dragged is passed in as parnode(2), the ascii value of the key that was clicked is passed in as parval(3), and the classtype value of the object is passed in as parval(4).

ADV_FUNC_CLICK: This function is called when the object is clicked on. Here a reference to the view in which it was clicked is passed in as parnode(2), and the click code is passed in as parval(3). Possible click codes are: DOUBLE_CLICK, LEFT_PRESS, LEFT_RELEASE, RIGHT_PRESS, RIGHT_RELEASE.

ADV_FUNC_KEYEDCLICK: This function is called when a key on the keyboard is held down and the object is clicked on. Here the view is passing as parnode(2), the click code is passed in as parval(3), and the ascii value of the pressed key is passed in as parval(4). Possible click codes are: DOUBLE_CLICK, LEFT_PRESS, LEFT_RELEASE, RIGHT_PRESS, RIGHT_RELEASE.

This Page is Used By

basicte



flexsim users manual
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Article

Contributors

paul.t contributed to this article

Navigation

FlexSim 2016.1