ATTENTIONThis 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 |
#21
|
|||
|
|||
Thanks Phil. I thought the point here was about having the bars as flowitems so that you can gather meaningful bar statistics on the stillages. I've just tried adding the stats node to the containers, and that looks okay, so if you're happy to have a combiner in the process flow (the Flexsim default method of modelling this), you could just have a pallet/ container with bars added to it and read the statistics off the container. The problem with that is you can't point a recorder at the container as flowitems are destroyed by default at reset and the recorder's pointer to the data node will become invalid. Also by default, the stillages will move to the combiner which, if they don't get moved twice at the filling location in reality, would need extra effort to have them stay in situ.
Generally I'm still not comfortable with the idea of having a fixed resource as a flowitem as seems may have been adopted here. Anyone know of any hard evidence to discourage it? Last edited by Jason Lightfoot; 12-15-2010 at 04:16 PM. Reason: Added info on container stats |
#23
|
|||
|
|||
Good morning everybody,
this is the way how I realized it. Thanks to all of you for the great help. It took seperators and combiners and changed their z-size to 0. I used two standard colours for the incoming and outgoing material flow of every handling area in front of all the processes. This is a nice side-feature, because I wanted to visualize the areas used for material handling and value adding processes. As flowitems I use simple strethed cubes as metal bars and Esther's "rack solution". Thank you very much! |
#24
|
|||
|
|||
Hello everybody, it's me again.
Now I have problems with an alternative material handling method. The idea is to handle the metal bars vertically and not in a horizontal position. This could be realized with an inlay that has predefined holes for the metal bars. In the model I have used a queue (that has the 3D shape of the rack which is used in the company). I didn't show the inlay, this is too complicated at the moment. To sort the flowitems I use this code (thanks to this thread) Code:
setrot(item,0,90,90); setloc(item,-0.4+ysize(item)*1.5*content(current),-0.54,0.62); The idea behind the model is that I have a rack, full of metal bars. Put it in front of a process. The operator gets one bar, put's in in the processor, after the process the operator put's it back in the same space in the queue and proceeds with the next part. At the moment I have no real idea how to manage to do this without a lot of scripting, which is my weakness ... |
#25
|
|||
|
|||
Hello Jens,
You can define an integer Layer depends on the number of items in your queue. Depending on how you define your Layer, for the first 10 objects this could either be a 1 or a 0. Let's say that the result is Layer (x <=10 ) = 1. Then you define the xlocation of your bar (now -0.54) as -0.54 + (Layer - 1) * xsize( item ). Esther |
#26
|
|||
|
|||
Hi Esther,
first of all. Thanks for you reply. So far, I managed the filling of the queue. It's a bit different to your solution and probably not the best way to do (I think your code is much easier): Code:
if (content(current) > 10) { setloc(item,-0.4+ysize(item)*1.5*(content(current)-10),-0.44,0.62); } else { setloc(item,-0.4+ysize(item)*1.5*content(current),-0.54,0.62); } The real big problem is how to realize this pickup and replacement operation by the machine operator (or a robot). Do you have any ideas about this? Thanks and Greetings from cold Germany! Jens |
#27
|
|||
|
|||
I "optimized" my code:
Code:
setrot(item,0,90,90); int s = 14; int rindex = 1+(content(current)/s); setloc(item,-0.33+1.5*ysize(item)*(rindex),0.02*1.5*(content(current)-s*rindex),0.67); Doesn't work 100% perfectly, because the first bar won't be placed in the first, but in the second slot. (I know why, but can't think of a better solution for this). So now I could fill my queue and put it in front of a processor. How can I realize that an operator or a robot will pick up a bar, process it and put it back in the same place? Thank you already. I attached my model in hope to make it easier to understand! Jens // Update: I have an idea, but not sure if it works, because I don't know how to work with labels. But would it be possible to return the xyz coordinates and orientation of the current flowitem which is taken by the transporter with the OnExit trigger and save it to a label. Then add an if clause to the OnInput Trigger of the Queue, that when a flowitem has a label the saved coordinates should be used to place it in the queue? If not, then the code I already pasted should be used. Last edited by Jens Mühlheimer; 12-21-2010 at 04:01 AM. |
#28
|
|||
|
|||
Hello Jens,
One way you can solve this is to give each bar a 'position nr' (label) and determine the parameters in your setloc function based on this position nr. in stead of the content of your queue. Esther |
#29
|
|||
|
|||
I didn't really understand you unfortunately.
But probably we're speaking about the same things. I added 7 labels to my flowitem (the metal bars) xyz location, xyz rotation and a indicator label if the bar is in the queue for the first or the second time: OnInput Trigger: Code:
if (getlabelnum(item,"return") == 1) { setloc(item,getlabelnum(item,"xloc"),getlabelnum(item,"yloc"),getlabelnum(item,"zloc")); setrot(item,getlabelnum(item,"xrot"),getlabelnum(item,"yrot"),getlabelnum(item,"zrot")); } else { setrot(item,0,90,90); int s = 14; int rindex = 1+(content(current)/s); setloc(item,-0.33+1.5*ysize(item)*(rindex),0.02*1.5*(content(current)-s*rindex),0.67); setlabelnum(item,"return",1); setlabelnum(item,"xloc",xloc(item)); setlabelnum(item,"yloc",yloc(item)); setlabelnum(item,"zloc",zloc(item)); setlabelnum(item,"xrot",xrot(item)); setlabelnum(item,"yrot",yrot(item)); setlabelnum(item,"zrot",zrot(item)); } Also there is another flaw. Because the bars are now placed in a different pattern and not how they have been in the queue ... Any ideas? |
#30
|
|||
|
|||
Geee .. need a break.
Forgot to delete the OnExit Trigger ... so the labels got overwritten all the time. Works perfectly fine now with the code above. |
#31
|
||||
|
||||
Hi,
the modulus operator is in combination with a integer division a nice method for placing at different levels or inlays and positions. Give it a try! The modulus operator is in flexsim fmod(a,b). Jörg |
#32
|
|||
|
|||
Hello Jason,
I think the stillage... functions are not supported by Flexsim v4.32 - I'm still getting in contact with my supervisor so we can get the v5 update. Could somebody confirm this? Because I would like to test out your idea as well. |
#33
|
|||
|
|||
Hi Jens, ...that could be true as that model I posted was probably created in 4.52. It may not have registered with me at the time that you had an even earlier version 4! From memory I'd guess that tasks of type NODEFUNCTION might not be supported which means they'd probably need to be replaced with TASKTYPE_SENDMESSAGE and then some message logic on an object - which is not quite as clear to read or understand. If I get a chance over the holidays I'll try and verify this.
Again, I can thoroughly recommend version5 for many reasons, but in particular the debugger will help you to understand and check any code that you write, and so will build your confidence and allow you to do so much more. I hope you are successful! |
Tags |
stack flowitems rack |
Thread | Thread Starter | Forum | Replies | Last Post |
Is it possible one object comprised of the function of "combiner" and "separetor"? | Vic Li | Q&A | 1 | 08-19-2008 04:41 AM |
about "no select" and "show parameter window from side bar" | qin tian | Gripes and Goodies | 3 | 03-21-2008 08:10 AM |
Which variable stores "Properties -> General ->Flags -> Protected" information? | KelvinHo | Q&A | 1 | 03-06-2008 06:18 AM |
"Getting Started" and "Tutorial" models for v4.01 | Cliff King | Product Announcements | 0 | 12-10-2007 07:34 PM |
Fluid "Pallet" Flowitems | Maurits Brandt | Q&A | 4 | 11-12-2007 12:37 PM |