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 |
|
Downloads |
Q&A Using Flexsim and building models |
#1
|
||||
|
||||
How to send more than 3 parameters by senddelaymessage()
Is it possible to send more than 3 parameters by command senddelaymessage() or by other commands? How to do this?
Thank you very much for your help! |
#2
|
||||
|
||||
Hi,
build a table, fill it with parameters, send the reference of the table. tables can you build at many nodes. Try it with a label node. Jörg |
The Following 5 Users Say Thank You to Jörg Vogel For This Useful Post: | ||
Sebastian Hemmann (02-28-2011) |
#3
|
||||
|
||||
Hao,
You might run into a problem with Jorg's solution if you send the message again before the first message's delay time expires. This will be caused because the label values will be written over before the first message reads them. You can get around this by creating a node somewhere (probably in a label) to store the table that Jorg suggested. Then send the tonum() value of the node you creaded as one of the message parameters. When the message fires you will want to delete the node after you have read the values out of the table (also want to clear out any nodes on reset). This way you will have a unique table for each delayed message. Good Luck, Brandon
__________________
thats not normal. |
The Following 2 Users Say Thank You to Brandon Peterson For This Useful Post: | ||
Jörg Vogel (03-03-2011) |
#4
|
|||
|
|||
My suggestion:
Create a label on the sender object - say 'tempParams' For each call, place the parameters in a new row under tempParams (a cell in the row can also contain a table if needed) Make the row node (last(label(current,"tempParams"))) the sender in senddelayedmessage (if your not using delays, then consider a usercommand or nodefunction instead) When the message is received: Find the true sender using ownerobject(msgsendingobject) Refer to the parameters by get(rank(msgsendingobject,<n>)) for each parameter <n> Use destroyobject(msgsendingobject) when you're finished to clean up. This method will allow for state-saving the model. |
The Following 4 Users Say Thank You to Jason Lightfoot For This Useful Post: | ||
Steven Hamoen (03-02-2011) |
Thread | Thread Starter | Forum | Replies | Last Post |
runspeed with 2 parameters? | Steven Hamoen | Q&A | 3 | 10-01-2010 11:33 AM |
Passing parameters in executefsnode | Sung Kim | Q&A | 2 | 06-01-2010 09:37 AM |
Problem with Send to Output Port | Joe Allen | Q&A | 3 | 05-14-2009 02:38 PM |
Using Reevaluate Send To vs Pull | Brandon Peterson | Tips and Tricks | 4 | 11-19-2008 08:56 AM |
how to send msg to another which do not have connection with the sender object | KelvinHo | Q&A | 3 | 03-05-2008 04:28 AM |