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-11-2008
Joe Allen Joe Allen is offline
Flexsim User
 
Join Date: Jul 2008
Posts: 80
Downloads: 2
Uploads: 0
Thanks: 34
Thanked 5 Times in 3 Posts
Rep Power: 151
Joe Allen is on a distinguished road
Default Close A Specific Port

Is there any way to close or open a specific ports in Flexsim rather than all input or all output ports? Here's the problem: I have a model with 3 conveyors. Conveyor A feeds conveyor B in normal operating circumstances (through port 1). Conveyor B detects when it is backed up and changes the value of a global variable from 1 to 2. Conveyor A checks the value of the global variable in order to determine which port it will send flow items to (this is handled by a simple code in the Flow tab of conveyor A). When conveyor B backs up conveyor A sends the flow items to conveyor C (through port 2). Conveyor C acts as accumulation between A and B. When conveyor B is no longer backed up, the flow items will go from conveyor C to conveyor B. All flow items coming from conveyor A are stopped from going to conveyor B until conveyor C is cleared. This works fine for a small amount of items but the problem with this is it creates a lot of overhead for the model since every time a flow item reaches the output ports of conveyor A, the code for checking the global variable gets executed. As the model has grown this logic is starting to negatively impact its performance. I would like to be able to close and open individual output ports on conveyor A so that code only gets executed when conveyor B backs up or gets unbacked-up. Any alternative suggestions for handling this situation would be greatly appreciated.
  #2  
Old 09-11-2008
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

You don't need to open and close specific ports. In your Send To Port, you just need to return the port which leads to Conveyor B explicitly if B and C are blocked, and ConveyorB's input ports should be Conveyor C before Conveyor A.

The attached model is similar to what you are saying, doesn't use any open and closing of any ports, and doesn't use any global variables. All it uses is the send to port. (And there is a downstream conveyor with a message loop that closes and opens itself to show blocked and unblocked system states.)

The catch with this sample model is that Conveyor A needs to be slightly slower than Conveyor B so that when it is running regularly, it doesn't accidentally send one to Conveyor C because of the slight timing of when Conveyor B becomes ready to receive the next item.

But if you follow my original instructions with whatever you are doing to solve the problem, this little catch shouldn't be an issue.

Hopefully this helps somehow.
Attached Files
File Type: zip conveyors.zip (45.5 KB, 353 views)
  #3  
Old 09-11-2008
Joe Allen Joe Allen is offline
Flexsim User
 
Join Date: Jul 2008
Posts: 80
Downloads: 2
Uploads: 0
Thanks: 34
Thanked 5 Times in 3 Posts
Rep Power: 151
Joe Allen is on a distinguished road
Default Thank you

Thanks a lot for your example Phil. I think it's going to work for my application.

-Joe


Thread Thread Starter Forum Replies Last Post
is there a command which will return the port no. of a connected object? KelvinHo Q&A 6 04-22-2010 02:13 AM
set the location of flowitem from 2nd input port in a combiner KelvinHo Q&A 4 04-11-2008 11:34 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.