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 |
#1
|
|||
|
|||
Stop and Resume Object?
When an Operator leaves a network node, say NN1, I want a crane to stop working. So I have this:
OnContinue>> stopobject(centerobject(current, 1), STATE_DOWN); When the operator returns to NN1 I would like the crane to start again so I have this: OnArrival>> resumeobject(centerobject(current, 1)); The crane does stop when the operator walks away, however, it does not resume when the operator returns. Any Help??
__________________
"A bird is an instrument working according to mathematical law, which is within the capacity of man to reproduce." -Leonardo da Vinci, 1502 |
#2
|
|||
|
|||
Stop/resume crane when the operator leaves/comes back
Hi Gavin,
I tried to create a sample model similar to your approach. An operator is on a network node NN1, when he leaves this network node the crane stops and when he comes back the crane resumes. "Leave" and "Come back" can be defined more precisely with if statements as below. NN1 - OnArrival trigger: Code:
//if the operator comes from another node and will stay at this node if(fromedge != 0 && toedge == 0) { resumeobject(centerobject(current, 1)); } Code:
//if the operator was staying at this node and will leave to another node if(fromedge == 0 && toedge != 0) { stopobject(centerobject(current, 1), STATE_DOWN); } Last edited by Clair A; 11-12-2014 at 10:28 AM. Reason: re-uploaded attachment |
The Following 3 Users Say Thank You to Clair A For This Useful Post: | ||
Tom David (01-16-2014) |
#3
|
||||
|
||||
The onarrival and the oncontinue both go off when an operator goes through a node. So in your situation, first time it arrives:
OnArrival : resumeobject (has no effect because crane is not stopped) OnContinue: stopobject (so crane stops) The second time it arrives at the node: OnArrival : resumeobject (crane is resumed) OnContinue: stopobject (so crane stops immediately again after it was resumed) So take a look at Clair's solution to specfiy better on the node what action you need. |
The Following 2 Users Say Thank You to Steven Hamoen For This Useful Post: | ||
Jörg Vogel (01-15-2014) |
Thread | Thread Starter | Forum | Replies | Last Post |
Resume Task sequence after being preempted | mearjun | Flexsim Student Forum | 9 | 05-08-2013 01:24 AM |
Stop a Transporter | Nischith Kashyap | Q&A | 1 | 02-24-2011 03:05 AM |
Stop and resume objects at specified time | john mic | Q&A | 6 | 11-02-2010 01:48 AM |
Make sure you stop model with the stop button before collecting state based statistics | Paul Dowling | Tips and Tricks | 2 | 06-10-2008 08:10 AM |
How to run tasks after stop time? | Fadhlullah Bin Rahmat | Q&A | 1 | 02-26-2008 04:44 PM |