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
|
||||
|
||||
Display Labels with the Recorder
Hi there,
I tried to display a user defined label with the recorder. (see attached modell) Well, this did work in Flexsim 3.5 now it doesn´t.
__________________
regards Nico. |
#2
|
||||
|
||||
If you use numbers to reference your label by it's rank everywhere but the recorder, instead of the name of the label, it will work. Sorry for the inconvenience.
Brenton Flexsim Support |
#3
|
||||
|
||||
Hi Brenton,
I didn´t get you, sorry. So I use the standard GUI on the recorder. If you click 'help' in the 'Select nodes to capture' window, it is said that you can use the name of a label on the Object. So how can I reference the label by it´s rank in this window? Can you please give an example. Thanks.
__________________
regards Nico. |
#4
|
||||
|
||||
No, in the recorder GUI you should leave it how it was with the name of the label. Where you should call the label by rank is in the triggers of your other objects where you are setting the label and resetting the label. The only place in your model where you should use the name of that label is in the recorder.
Brenton |
#5
|
||||
|
||||
Please look at the attached modell of the first message. (did you?)
The Label on the processor is working and shows the value of the throughput. The Labelname is used on the recorder and the labelvalue should be displayed. So why is the recorder not working?? You can try the same thing in Flexsim 3.5 and it works. Sorry but I guess it´s a little bug you have to fix in the next release. How come you think the labels have to be referenced by their rank? The referencing by their names is also working, except from the recorder.
__________________
regards Nico. Last edited by tsconcept; 09-25-2007 at 05:27 AM. |
#6
|
||||
|
||||
I "think" you have to do that because there is a bug in the recorder in this version. It has something to do with the conversion to Flexscript. Have you tried it? I know that using the name should work and I am sorry it doesn't. If you insist, I can make a demo model for you but if you are looking for a temporary fix to your problem you need to trust me and enter the rank of the label in your code everywhere but in the recorder options where you will still use the name. I hope as well that this will be fixed in the next release. The only place you will run into issues with using the name of the label in your code is when you decide to use the recorder. If you are not planning on using the recorder to track a label then use the label names all you want.
Brenton |
#8
|
||||
|
||||
The underlying reason for misdirected node referencing by the Recorder object.
Brenton, you didn't really expect the general population to understand this strange and mystical problem did you?
Before anyone should think we have some grimlins performing black magic inside Flexsim, let me try to explain the underlying problem behind this problem in hopes that it calms anyones suspicions. If anyone has spent much time looking at the tree view in Flexsim, you've probably noticed that nodes that have been toggled as flexscript nodes (the light brown square nodes with an "S" inside of them) usually have a plus sign next to them. If you click on the plus sign you will expand the flexscript code tree that is created during the flexscript build event which parses your flexscript code and creates the code tree for quick interpretation during run time. Ok, keep this in mind for a minute. Now let's look at the Recorder's functionality. When Nico specified on the Recorder what data he wanted to capture, he did so by specifying the name of an object in the model and the name of a node on that object. The object's name was "Processor", and the node's name on that object was "Total". Well when the model is reset, the Recorder starts at the top of the object data tree of the Processor object and searches for the FIRST occurance of a node named "Total" and stores a reference to the node thinking it is the node it needs to record during the simulation. Well, because the OnReset variable node contains the code setlabelnum(current, "Total"); is ranked higher in the tree than the label node, and because the parsed flexscript subtree of the OnReset node contains a node named "Total (interestingly enough, "Total and Total appear as the same name to the engine), the Recorder thinks that it is the node it needs to record rather than the label node named Total that is further down in the tree. Do you see the problem? Now do you see why the problem was fixed by not using the name of the Total label in your code, but instead using the index 1? It's simply because in so doing you removed the parsed flexscript subtree node named Total, and therefore the first occurance of a node named Total was found to be the label node which is the one you intended to record. Incidentally, this is not a v4 problem, this problem existed in v3 as well. It's just that in v3 you didn't typically use flexscript, but instead you used compiled C++ code. Therefore you didn't run into this problem of searching for nodes by name in the tree, and stumbling upon an unsuspecting node by the same name inside of a parsed flexscript subtree. I hope this all makes sense somehow in spite of having done a horrible job of explaining it, because I sincerely hope to not have to try and explain my explanation... You just need to hope we find a solution around all of this in a future release! I'm confident we will, but in the mean time, be careful of situations where you are referencing nodes by name and expect Flexsim to know what node you're refering to by reading your mind. Last edited by Cliff King; 09-25-2007 at 09:57 PM. |
#9
|
||||
|
||||
Cliff,
Thanks for your explanation. Now the whole thread makes sense to me. Before your post I had no clue what they are talking about. In my eyes your explanation is very valuable ( I learned a lot) and I would give you a lot of reputation points for it, but your reputation is already beyond repute .
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions." |
#10
|
||||
|
||||
Hi there,
ok now I understand a little more about how the recorder is working. Thanks for your patience. So maybe you could just add a option on the recorder to browse for a node you want to record...
__________________
regards Nico. |