question

Ashmita G avatar image
0 Likes"
Ashmita G asked Ben Wilson commented

Create pallet using Flexscript

Hi, in this model I am trying to create Pallets and boxes using flexscript but I am not able to get the syntax right.

In the model I have two agvs, meant to deliver specific parts to specific queues as per the global table. My intention is to segregate the tokens (produced in the list "items"), using the agvno assigned to each, place them in pallets and transfer them via the assigned agv.

Can you please provide me with the syntax to create pallets and boxes for the above problem using flexscript.

Also if you can provide a sample model for the above problem statement, it will be highly appreciated. Thank you.

Doubt_PalletCreation.fsm

FlexSim 20.1.1
flexscriptflexsim 20.1.1customcodeobject creation
· 5
5 |100000

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

1 Answer

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered

Ok, you create a pallet in the space of model. The coordinates are 0,0,0 for the location.

By command “moveobject” you initiate the entry of the pallet as an item into the queue. There are two other methods possible:

  1. you transport the pallet by a tasksequence through an operator into the queue.
  2. you put the node of the pallet as a subnode into the tree of the queue by the command “transfernodeobj” or dot syntax property ”up”. Then FlexSim won‘t notify the entry of the pallet.
Once an object is in a container like the model or an object like a queue it is in the scope of this object and its coordinates. You change a position by changing property settings of location. Spatial attributes of objects are properties of the flexscript class Vec3.

Sometimes you have to cast a reference into a different class. You do this with ”as”. There is small degree of difference when a method is done to an object or treenode. And sometimes an object must be introduced to a module by creating a reference in this class. Examples are the classes Storage for Warehousing, AGV or Conveyor.

5 |100000

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