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 03-24-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default question about item position of BasicConveyor kinematics

if you use code like these "bcsetitemconveystate(current, item, position, 0,0,0);
treenode kinematics = bcgetitemkinematics(current, item, 1);
initkinematics(kinematics, 0,0,0, 0,0,0, 0,0);
double endtime = addkinematic(kinematics, 1, 0, 0, 1, 1,1, 0,0, time(), KINEMATIC_TRAVEL);" the position (bcgetitemposition)of item do not change in this kinematic,if i want to the position (bcgetitemposition)of item base on this kinematic,how to do this ?
  #2  
Old 03-24-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default Support_BasicConveyorJumpingItems_TD

Linwei,

I am not sure if I really understand the kinematics concept in every detail but I will try to help you.

I do not understand, what you are trying to do in your little code example.

Anyway, I built a small Basic Conveyor model which shows how to add kinematic on a Basic Conveyor.
I guess you do not need the initkinematic() in your code, but again I am not sure, what you are trying to do.

Anyway, have a look into my little model and hopefully it will answer your questions. If not, please try to explain in detail, what you are trying to do. What is the task you try to solve?
Attached Files
File Type: zip Support_BasicConveyorJumpingItems_TD.zip (46.3 KB, 232 views)
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
  #3  
Old 03-25-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

see attcch model,the above every time the item pass the DecisionPoint, the DecisionPoint fire
but if yourself kinematic,the item pass the DecisionPoint, the DecisionPoint does not fire
i know if use your kinematic,because the position does not change ,the DecisionPoint does not fire
i want to traverse the item ,and the DecisionPoint fire,and the item rotate,the bcsetitemconveystate can not rotate item,
so you must use yourself kinematic,but the position(bcgetitemposition) does not change,so i want to use myself kinematic,and chang the position(bcgetitemposition).
and i know if you change the direction ,the value of position(bcgetitemposition) also change,so i think use yourself kinematic and changing value of position(bcgetitemposition) is possible. perhaps if there is command like bcsetitemposition,the basicconconveyor is more flexible,but that maybe cause some problem.
Attached Files
File Type: zip shiyan.zip (37.5 KB, 180 views)

Last edited by LINWEIXU; 03-25-2010 at 07:49 AM.
  #4  
Old 03-25-2010
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

The issue you have, if you do not use the Basic Conveyor kinematic there will be no event created to fire the decision point. Have a look into the event list if you run your model and see the created events.
There is a command createevent(), but I am not sure how to create the needed event.
Maybe someone of the developers can help us here.

I had a deeper look into your first Conveyor and in my eyes the code in Decision Point 2
bcsetitemconveystate(current, item, position, 0, 1,1);
should be changed to
bcsetitemconveystate(current, item, position - xsize(item), 0, 1,1);
because otherwise your item jumps in x direction on your conveyor.
The same is with DecisionPoint1, where I add an if-statement to find out the convey direction.
I changed this in my attached model.

I also added a third conveyor who also does rotation to the item.
treenode kinematics = bcgetitemkinematics(current, item, 1);
double dEndtimeRotate = addkinematic(kinematics, 0, 0, 360, 120, 0, 0, 0, 0, time(), KINEMATIC_ROTATE);

I also put comments into the third conveyor, to make it easier to understand what is done in the code. I would help if you would do the same in your objects in sample models.

I am not sure if my attached models does exactly what you are looking for, but I understood, that you want to change the convey direction, fire the decision point and rotate the item. This is what my conveyor does.

I am not sure if a command bcsetitemposition is needed, because I guess this can be done with bcsetitemconveystate(), right?
Attached Files
File Type: zip shiyan_TD.zip (42.5 KB, 196 views)
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."

Tags
basic conveyor, kinematics


Thread Thread Starter Forum Replies Last Post
some thing wrong with kinematics LINWEIXU Q&A 7 11-28-2009 05:34 AM
Question about item (truck) size/spacing? Jamie Santa Ana Container Terminal (CT) Library 2 09-25-2009 10:25 AM
Kinematics Iulian Marin Ion Q&A 15 08-04-2009 09:42 PM
Training Material for Kinematics David Chan Gripes and Goodies 5 03-31-2009 06:55 AM
Set reset position Martijn van Oostenbrugge Q&A 1 02-25-2008 11:48 AM


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.