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 |
#81
|
||||
|
||||
Simon,
Would a processor be good for your purpose? Simply put a processor between two conveyors and connect them. Assign the proper processing time. It will simulate the delay of the transfer.
__________________
Best, Alan |
The Following User Says Thank You to AlanZhang For This Useful Post: | ||
Simon Riopel (10-02-2008) |
#82
|
||||
|
||||
Quote:
Description: For developer use. Delay events of object. The timed events of object are incremented by value, and the eventlist re-sorted. Value may be positive or negative.
__________________
Jeff Flexsim Support |
The Following User Says Thank You to Jeff Nordgren For This Useful Post: | ||
Simon Riopel (10-02-2008) |
#83
|
||||
|
||||
Quote:
In this case you could close the output of your conveyor on the OnConveyorEnd trigger and send a delayed message to itself and on the OnMessage trigger just open the output again. Or use Alan's idea of the processor in between. Steven |
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
Simon Riopel (10-02-2008) |
#84
|
||||
|
||||
Is there any command available to end the warm-up period under a certain condition, like the command endreplication()?
__________________
Best, Alan |
#86
|
||||
|
||||
Joe,
do you mean the processing time of the processor, or the cycle time including the time spent for waiting for operators, etc.? I am not aware of such a flexscript command to retrieve the cycle time but you can set time labels on the item, in OnEntry and OnProcessFinish triggers of the processor. From there, you can calculate the cycle time. That's what I've done in my model. Hope this helps. |
#88
|
||||
|
||||
Joe,
as far as I know there is not a flexscript command to retrieve the processing time directly. But you can try to retrieve it, for example, by using getnodenum() command. I haven't tried it myself, but I think it could work. You can find the explanation of the command in the commands documentation. |
#89
|
||||
|
||||
Place a Visual Tool in your model and make a centerport connection to the Processor. Choose as Visual Display “Text”, select Display Object Statistics, make a double click on “content” and select “Currrent Process Time”. In the code you can also examine how it is done. This is not a variable on the Processor but on the item, because there can be more than one item in a Processor.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions." |
The Following 2 Users Say Thank You to Tom David For This Useful Post: | ||
Phil BoBo (10-13-2008) |
#90
|
|||
|
|||
Model Time Question
Is there a way to force model time to continue within a block of code?
The following bit of code will get stuck in an endless loop since it appears that model time doesn't progress during execution of a block of code: double dTime = time(); pf(dTime);pr(); while(time()<dTime+10) { //Wait } pf(dTime);pr(); Essentially I want to be able to delay the execution of code from one line to the next for a preset amount of model time. Can this kind of thing be done without using senddelayedmessage()? I have noticed that the model continues to run (although without updates to video) between when a msg() command gets executed and when the user clicks OK or Cancel. This leads me to believe that it isn't impossible for model time to progress even when a code block has not yet finished. |
#91
|
||||
|
||||
Joe,
No, it is not possible. What you are asking to do is to sleep or pause block of code inside of an event. If you do that then the next event can not be processed because it is waiting for the prior event to finish first. What you are seeing with the message that you described in your post is not what you thought it was. The events do not continue to process but wait until after you respond to the message. To test this you could set a model to run for a time period that would take more than 1 minute at full speed with no graphics on. Cause an event at the start of the model to use the msg command and wait a minute to respond. When you respond to the message the model will still have to run. Why? Because what is happening is that Flexsim keeps track of the computer time and the sim time and trys to match those two up according to the run speed of the model. When the model pauses during the msg command Flexsim will try and execute as many events as is possible to try and catch up to where it should be if it had not had to pause during the message. This makes it look like it continued to process events but infact the exact opposite is true. Hope this helps, Brandon
__________________
thats not normal. |
#92
|
|||
|
|||
One way traffic...
Is there any way to send a continuous message from an operator to a number of nodes keeping them closed until the operator has completed a specified route?
I require one-way and one-operator traffic through a specific route in my model and have done so using the OnEntry, OnContinue and OnMessage trriggers at the nodes in the route. It also has to allow for an operator (or a number of operators) to follow a leading operator at a specified distance if it/they arrives before the operator waiting to move in the opposite direction. The problem I am having is that once any operator leaves the route it opens all of the node edges that are blocking movement on to the route allowing any operators waiting at the nodes onto the route, eventhough there may still be a operators on the route (which were a followers). I hope this is clear. |
#93
|
||||
|
||||
Duncan,
Have you checked out the TrafficControl? From a distance it looks that the untimed traffic modes might be something you could use. But to be honest I have a hard time understanding exactly how it works myself so I am not sure!. to come back to your real question, I'm not sure I completely understand but can you put a label on the last operator and only close all nodes if this last one has passed? Or can you use a sendmessage task in your tasksequence and send that message to a controller object (any object where you have written some code on) and then in that code check if there are still operators on that route. So everytime an operators leaves that route it checks if that operators is the last. Steven |
#94
|
|||
|
|||
Hide the forks on a transporter
Hi,
Is there any way to turn off / hide the forks that are shown on the front of the transporter? I have changed the transporter for my own graphic and now the forks are not needed, Thanks, Mark Gormley |
#95
|
||||
|
||||
Mark,
2 ways come to mind: 1 on the ondraw trigger (at the visual page of the properties) add the statement: "return 1;" With that statement you overwrite the ondraw of the object with your own ondraw trigger. (which in your case means draw nothing) 2 take an operator instead of a transporter. They are the same objects except for the forks and the up movement. Steven |
The Following 2 Users Say Thank You to Steven Hamoen For This Useful Post: | ||
Michael Hartlieb (12-13-2008) |
#97
|
|||
|
|||
Hi Steven,
Thanks for that! In my experience traffic controllers do exactly the oposite of what you want them to so they have not been very helpful! With regards to your suggestion how would I set the controller object to check if there are still operators on the route? My apologies if my requests are a little simplistic but as I'm sure you can tell I am fairly new to all of this! Regards, Duncan |
#98
|
||||
|
||||
Hi Duncan,
you could use a global table or a global variable and increase the value in there every time an operator enters a route that you want to control (on the trigger of a node) and then decrease that number when an operator leaves. Now you only have to check if the number is 0 then you can close all nodes. Steven |
#99
|
|||
|
|||
Hi Steven,
Thanks the global table will provide the perfect solution. The problem I seem to be having now is that the if statement that I am using (to open the entry node once the route is empty) always returns the true condition, even if it is not. Here is the piece of code: if(gettablenum("GlobalTable1",1,1) == 0); { opennodeedge(thenode,theedgenumber); } It will open the node even when the value in the global table is not 0. I feel like I am missing something fairly obvious?? Thanks again. Duncan |
Thread | Thread Starter | Forum | Replies | Last Post |
Can coordinated task sequence and "break to requirement" be used together? | qin tian | Q&A | 1 | 05-26-2008 10:44 AM |
error message "Clock overflow, running stopped" | Martin Kooijman | Q&A | 11 | 04-17-2008 10:29 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 |