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
|
|||
|
|||
different labels have different delay time
I have a simple question about delay time, as described here: there are the same kind of itemtype but two different kind of labels .If I wanna have different delay time between two labels. how do I modify the code to meet my needs? If anyone can give me advice I thank you for your help in advance.
Last edited by Vic Li; 09-22-2008 at 03:15 AM. Reason: add a file |
#2
|
|||
|
|||
I dont know if i understand your question right, but lets try.
You have 2 items with 2 different labels and want to send a delayed message to an object with the value of one of the labels? You can try it in a way: Code:
double d_Delay = 0; if(objectexists(label(item,"Label1"))) { d_Delay = getlabelnum(item,"Label1"); } if(objectexists(label(item,"Label2"))) { d_Delay = getlabelnum(item,"Label2"); } senddelayedmessage(toobject,d_Delay,fromobject,msgparam1,msgparam2,msgparam3); Maybe this helps you a little bit.. Regards Tobias |
#3
|
|||
|
|||
attach file~
thx for tobias.biemueller ' s answer ~ I forgot to attach my files @@ I think you understand my question right! maybe you can try to see my model and give me some advice ~ thx a lot again!
|
#4
|
|||
|
|||
I looked into your model, i dont understand what you want to do with the different labels?
Would you like to have different loadtimes? i.e. G = 1 -> Loadtime = 10 sek G = 2 -> Loadtime = 3 sek or what do you want with this solution? |
#5
|
|||
|
|||
YES ~ that's what I want!! when there is a pallet into combiner , then according to the "1" and "2" of label "G" , it will have different delay time~ just like your instance. in my model now, the delay time is 13 sec no matter what kind of label@@
|
#6
|
|||
|
|||
Then why you dont use the LoadTime Trigger to refer to the label..
i.e.: return getlabelnum(item,"G"); a other solution, is your way but additional one of the msgparam from the message used with the value of the G-Label (or the delaytime) and in the MessageTrigger the msgparam value. If you have different times for loading, according to the value of G (1 = 12 sec, 2 = 30 sec): add 2 labels to the robot with the timevalues for loading.. First label for the first Loadtime Second label for the second Loadtime then refer to the labels i.e.: // if G == 1 then the first label will returned, else the second return getlabelnum(current, getlabelnum(item,"G")); hope this is what you want to do.. regards Tobias |
The Following User Says Thank You to tobias.biemueller For This Useful Post: | ||
Brandon Peterson (09-22-2008) |
Thread | Thread Starter | Forum | Replies | Last Post |
Task Sequence Delay for Multiple Capacity | Sung Kim | Q&A | 6 | 06-16-2008 03:11 PM |
Updating Labels | Alexandre Ouellet | Q&A | 2 | 04-02-2008 06:55 AM |
Updating Labels | Naresh Yamani | Q&A | 7 | 03-28-2008 11:28 PM |
can I use an edit box entry to update multiple labels? | KelvinHo | Q&A | 10 | 03-28-2008 07:17 AM |
Display Labels with the Recorder | tsconcept | Q&A | 9 | 09-26-2007 08:16 AM |