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 04-01-2008
Alexandre Ouellet Alexandre Ouellet is offline
Flexsim User
 
Join Date: Mar 2008
Posts: 9
Downloads: 1
Uploads: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 0
Alexandre Ouellet is on a distinguished road
Default Updating Labels

Hello,

I am a new user of Flexsim and I am still trying to learn all the Flexsim concepts. Here is a question that will probably be easy to answer:

Logic: Source =>Dispatcher=>Task Executer
In the Request transport pick list into the flow tab into the source object, I have my own task sequence. On those points, everything is working well.

However, within my task sequence, I want to update some labels from my Task Executer. So here is my question: How can I know which Task Executer is doing the task sequence to use the following command?
setlabelnum(?,"mylabel")
  #2  
Old 04-01-2008
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

Alexandre,

It is important to know that the code that defines your task sequence is fired when the task sequence is created. So, if you were to set a label using the setlabel command at one point in the task sequence and then set it to something else later in the task sequence they would both happen when the task sequence was created and not at that point in the execution of the task sequence. Also, if you are dispatching your task sequence to a dispatcher to be passed along to one of many task executers then there is no way of knowing what task executer will get the task sequence.

If you are trying to set a label at a specific time during a task sequence then the way I do that is to insert a send message task and then set the label in the message trigger. If you send the message to the source from the task executer then the message trigger will have a reference to the task executer that got the task sequence through the "msgsendingobject" pointer that is predefined. You can then use the message parameters to define what to do with a switch statement and what to set the label to.

Hopefully this will answer your question if it doesn't let us know and well answer the question a little more specifically for you.

Good Luck,
Brandon
__________________
thats not normal.
  #3  
Old 04-02-2008
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

Alexandre,

There is another possibility. If you have a sendmessage tasktype and you don't specify the first parameter, the message is send to the taskexecuter that is executing this task. This means that on the onmessage of that taskexecuter you can simply say: setlabelnum(current, "MyLabel", x);

Regards,

Steven
The Following 2 Users Say Thank You to Steven Hamoen For This Useful Post:
Jörg Vogel (11-08-2010)


Thread Thread Starter Forum Replies Last Post
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


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.