ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 09-03-2008
Iulian Marin Ion Iulian Marin Ion is offline
Flexsim User
 
Join Date: Aug 2007
Posts: 14
Downloads: 53
Uploads: 0
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 155
Iulian Marin Ion is on a distinguished road
Default Kinematics

Can someone provide an advice regarding kinematcs. We are trying to make items rotating while traveling to the conveyor. Definitivelly that something is missing there.
Attached Files
File Type: zip test kinematics.zip (42.8 KB, 593 views)

Last edited by Iulian Marin Ion; 09-03-2008 at 09:24 PM. Reason: Changing the attachment with the correct one
  #2  
Old 09-04-2008
Alex Christensen Alex Christensen is offline
Flexsim Technical Support
 
Join Date: Nov 2007
Location: Provo, UT
Posts: 96
Downloads: 41
Uploads: 8
Thanks: 29
Thanked 141 Times in 56 Posts
Rep Power: 298
Alex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to behold
Default

You want an object to rotate around its Z axis while traveling down the conveyor? The conveyor manages the Z rotations of objects inside it. If you add a curved section, you'll notice the ZR value changes when it goes around a turn. The only way I can think of to make this happen is to put an object inside another object, then turn the object inside its container.
  #3  
Old 09-04-2008
Iulian Marin Ion Iulian Marin Ion is offline
Flexsim User
 
Join Date: Aug 2007
Posts: 14
Downloads: 53
Uploads: 0
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 155
Iulian Marin Ion is on a distinguished road
Default

Thanks for the reply. The curvature handling I understood. Simply kinematics applied to the item it should not be enough? I was also suspecting that not fuctioning it is due to the compiler that is not installed (currently I am trying to install the compiler as well and to make some few more tests).
  #4  
Old 09-04-2008
Iulian Marin Ion Iulian Marin Ion is offline
Flexsim User
 
Join Date: Aug 2007
Posts: 14
Downloads: 53
Uploads: 0
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 155
Iulian Marin Ion is on a distinguished road
Default

Quote:
Originally Posted by Alex Christensen View Post
You want an object to rotate around its Z axis while traveling down the conveyor? The conveyor manages the Z rotations of objects inside it. If you add a curved section, you'll notice the ZR value changes when it goes around a turn. The only way I can think of to make this happen is to put an object inside another object, then turn the object inside its container.
Hy Alex. I have installed and checked the compiler and nothing changes. I was looking to the forum and could not find this but if well remember I have once saw a model of Anthony and the items where rotating while traveling.
  #5  
Old 09-04-2008
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

I've adapted your model to change the rotation in the OnDraw of the conveyor instead of using a kinematic on the item. I use a label on the item called startx and inspect the conveyor kinematicX which reflects its position along the conveyor. There's probably a better way of doing this, but this was the first that sprang to mind. I added a conveyor on the front to show the orientation of the item before it enters the rotation phase.
Attached Files
File Type: zip test kinematics_jl.zip (46.7 KB, 462 views)
The Following 2 Users Say Thank You to Jason Lightfoot For This Useful Post:
Tom David (09-04-2008)
  #6  
Old 09-04-2008
Iulian Marin Ion Iulian Marin Ion is offline
Flexsim User
 
Join Date: Aug 2007
Posts: 14
Downloads: 53
Uploads: 0
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 155
Iulian Marin Ion is on a distinguished road
Default

Quote:
Originally Posted by Jason Lightfoot View Post
I've adapted your model to change the rotation in the OnDraw of the conveyor instead of using a kinematic on the item. I use a label on the item called startx and inspect the conveyor kinematicX which reflects its position along the conveyor. There's probably a better way of doing this, but this was the first that sprang to mind. I added a conveyor on the front to show the orientation of the item before it enters the rotation phase.
Thanks for the ideea. I wil investigate on this direction as well and let you know about the progress.
  #7  
Old 09-05-2008
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

Here's an updated model that allows a curved conveyor to be used by adding zrot(item) to minof(360,kinx);
Attached Files
File Type: zip test kinematics2_jl.zip (46.6 KB, 447 views)
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Cliff King (09-05-2008)
  #8  
Old 09-09-2008
Iulian Marin Ion Iulian Marin Ion is offline
Flexsim User
 
Join Date: Aug 2007
Posts: 14
Downloads: 53
Uploads: 0
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 155
Iulian Marin Ion is on a distinguished road
Default

Quote:
Originally Posted by Jason Lightfoot View Post
Here's an updated model that allows a curved conveyor to be used by adding zrot(item) to minof(360,kinx);
Jason,

Thank you very much for your recommendation. It was quite usefull for the model. Regards
  #9  
Old 09-09-2008
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

I was going to add a post here about how you should probably use the shape offsets instead of setting the rotation of the object, but I tried it and found that the shape offsets rotate the object around its x/y/z origin, instead of around its x/y/z center, which makes the object rotate weird. And it seems Jason already tried this in his code. Anyway, it looks like Jason's method is the best way to do it. Good job Jason.
  #10  
Old 03-16-2009
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default rotating item on conveyor

I was asked about this the other day, so I put together a model that includes both Jason's and Alex's solutions. The nested flowitem approach is more difficult, but offers the advantage of using kinematic commands that include acceleration and deceleration. Note that you could also translate the item normal to conveyor while traveling on it. If you don't need accel/decel motion, I would not recommend this approach.

In the flowitem bin I copied a pallet inside of another pallet, then checked the hide 3D shape check box on the parrent pallet. I also modified the OnReceive eventfunction to move objects into its child (the visible pallet) allowing this nested item to work correctly with a standard combiner. I modified a processor to act like a separator for this special flowitem, because the standard separator would not handle it correctly.
Attached Files
File Type: zip Rotating item on Conveyor 2.zip (50.2 KB, 443 views)

Last edited by Kris Geisberger; 03-19-2009 at 09:16 PM. Reason: minor edits for clarity
  #11  
Old 08-01-2009
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

hi, where is code ?"flowitem bin I copied a pallet inside of another pallet....." ican not find it,thank you

Last edited by Tom David; 08-06-2009 at 01:40 AM. Reason: Useless Quote
  #12  
Old 08-03-2009
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

It's tricky because the shape you see in the flowitem bin is the visible child of the invisible flowitem SpinnerFlowItem object. Although it's possible to get to it from the flowitem bin, you might learn a little more if you approach from the model tree. Regardless you need to be in tree view to find the OnReceive event function of the SpinnerFlowItem (you can't get at it with the evaluation version). I'll show both.

Getting to the SpinnerFlowItem from flowitem bin:
1. Open flowitem bin
2. Go to last flowitem called "SpinnerFlowItem"
3. Right-click on the item object in the 3d view and select "Explore Tree" from the pop-up menu
4. Now you are looking at the tree view of the 'visible pallet' as I called it. Since this is the child of the SpinnerFlowItem (the one with the code) we need to go up in the tree. Right-click in the tree edit window and choose View -> Up from the pop-up menu.
5. See Getting to OnReceive node below

Getting to the SpinnerFlowItem from model tree:
1. Open model tree
2. Click on the + sign of the Tools folder immediately under model
3. Click on the + sign of the FlowItemBin object
4. Click on the + sign of the SpinnerFlowItem folder
5. Click on the + sign of the SpinnerFlowItem object (optional - just to see the nested 'visible pallet' object)
6. See Getting to OnReceive node below


Getting to OnReceive node:
1. In tree view click on the SpinnerFlowItem object icon, then click on the > to dive into the object's data
2. Click on the + sign of the "behaviour" node
3. Click on the + sign of the "eventfunctions" node
4. Click on the "OnReceive" node (not the + sign) to view the code

See the attached screenshot.

Note, if you modify the code you will need to Build FlexScript under the Build menu.
Attached Thumbnails
Click image for larger version
Name:	OnReceive eventfunction.jpg
Views:	245
Size:	17.9 KB
ID:	711  

Last edited by Kris Geisberger; 08-04-2009 at 09:07 PM.
  #13  
Old 08-03-2009
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

thanks Kris Geisberger
this,"nodefunction(node("/project/exec/globals/nodefunctions/palletentry"),c,i);" or
"Flexscript byte code
instr 1: nodefunction(instr 4,instr 3,instr 2 ) nr instr's: 5
instr 2: i() nr instr's: 1
instr 3: c() nr instr's: 1
instr 4: node(instr 5 ) nr instr's: 2
instr 5: STRING_LITERAL: "/project/exec/globals/nodefunctions/palletentry"???
and i want to know what situation will use this operation??

Last edited by Kris Geisberger; 08-04-2009 at 07:55 PM. Reason: no need to quote entire post, just reply
  #14  
Old 08-04-2009
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

LINWEIXU,

I'm not really sure what you are asking. What are you trying to do?

Don't concern yourself with the byte code.

The OnReceive eventfunction is executed when an item is moved into the SpinnerFlowItem, like in a Combiner pack. The default code of a standard pallet flowitem is:
nodefunction(node("/project/exec/globals/nodefunctions/palletentry"),c,i);
which calls a function that is responsible for trying to position items as best possible 'on top' of the pallet.

In the SpinnerFlowItem I replaced the default code with:
moveobject(i,first(c),0);
which tells Flexsim to move the item into the visible pallet... thus executing the OnReceive of the visible pallet where I kept the call to the palletentry function.
  #15  
Old 08-04-2009
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

thanks Kris Geisberger ,but i do not see anything code about "then checked the hide 3D shape check box on the parrent pallet".i want to know why you use "In the flowitem bin I copied a pallet inside of another pallet, then checked the hide 3D shape check box on the parrent pallet."?

Last edited by Tom David; 08-06-2009 at 01:36 AM. Reason: Useless Quote
  #16  
Old 08-04-2009
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

I attached a better screenshot to post #12.
Again, you need tree view to find the OnReceive eventfunction.

Quote:
Originally Posted by LINWEIXU View Post
i want to know why you use "In the flowitem bin I copied a pallet inside of another pallet, then checked the hide 3D shape check box on the parent pallet."?
I placed one pallet inside another pallet to be able to rotate/translate a pallet flowitem while it is moving along a conveyor using kinematic acceleration/deceleration. A Conveyor won't allow you do to this to the flowitem it is handling, but we can do anything we want to the contents of the flowitem. So I let the conveyor handle the SpinnerFlowItem, which in the model it is invisible, and in the model we see the visible pallet (nested pallet) that the kinematics rotate.



All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.