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

  #21  
Old 12-15-2010
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

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
  #22  
Old 12-16-2010
Sebastian Hemmann's Avatar
Sebastian Hemmann Sebastian Hemmann is offline
Flexsim User
 
Join Date: Sep 2009
Location: Braunschweig (Germany)
Posts: 439
Downloads: 52
Uploads: 0
Thanks: 472
Thanked 217 Times in 154 Posts
Rep Power: 319
Sebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to beholdSebastian Hemmann is a splendid one to behold
Default

Thanks Phil,

this was what I´ve ment but probably didn´t explained this clear.
__________________
Hemmi
  #23  
Old 12-16-2010
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

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  
Old 12-20-2010
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

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);
First problem is that I have to insert a loop, that after 10 bars, a new "line" inside of the queue will be started.

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  
Old 12-20-2010
Esther Bennett Esther Bennett is offline
Flexsim User
 
Join Date: Mar 2008
Posts: 115
Downloads: 27
Uploads: 0
Thanks: 103
Thanked 116 Times in 50 Posts
Rep Power: 271
Esther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to all
Default

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  
Old 12-20-2010
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

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);
    }
I will try to find another solution following your way.

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  
Old 12-21-2010
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

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);
With the 's'-variable I can define how many bars should be put in one row until the next one starts.
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.
Attached Files
File Type: zip stapeln_vert.zip (37.9 KB, 150 views)

Last edited by Jens Mühlheimer; 12-21-2010 at 04:01 AM.
  #28  
Old 12-21-2010
Esther Bennett Esther Bennett is offline
Flexsim User
 
Join Date: Mar 2008
Posts: 115
Downloads: 27
Uploads: 0
Thanks: 103
Thanked 116 Times in 50 Posts
Rep Power: 271
Esther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to allEsther Bennett is a name known to all
Default

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  
Old 12-21-2010
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

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));
    }
This code basically works. My only problem is, when the bars are put inside of the queue, the coordinates are relative to the queue. But when I set the coordinates in the labels with the OnInput trigger, the absolute world coordinates are used. This results in a big offset when the bars are put back in the queue again.

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  
Old 12-21-2010
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

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  
Old 12-21-2010
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Wink

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  
Old 12-22-2010
Jens Mühlheimer Jens Mühlheimer is offline
Flexsim User
 
Join Date: Jul 2008
Location: Stuttgart, Germany
Posts: 140
Downloads: 8
Uploads: 0
Thanks: 40
Thanked 35 Times in 27 Posts
Rep Power: 174
Jens Mühlheimer will become famous soon enoughJens Mühlheimer will become famous soon enough
Default

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.



Quote:
Originally Posted by Jason Lightfoot View Post
Actually, this is what I had in mind rather than using a fixed resource as a flowitem.
  #33  
Old 12-22-2010
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

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


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.