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
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 09-21-2007
tsconcept's Avatar
tsconcept tsconcept is offline
Flexsim User
 
Join Date: Aug 2007
Posts: 8
Downloads: 4
Uploads: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
tsconcept is on a distinguished road
Default 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.
Attached Files
File Type: zip Display_Label.zip (40.2 KB, 319 views)
__________________
regards Nico.
Reply With Quote
  #2  
Old 09-21-2007
Brenton King's Avatar
Brenton King Brenton King is offline
Flexsim Technical Support
 
Join Date: Jul 2007
Posts: 44
Downloads: 60
Uploads: 5
Thanks: 10
Thanked 41 Times in 15 Posts
Rep Power: 268
Brenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to all
Default

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
Reply With Quote
  #3  
Old 09-24-2007
tsconcept's Avatar
tsconcept tsconcept is offline
Flexsim User
 
Join Date: Aug 2007
Posts: 8
Downloads: 4
Uploads: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
tsconcept is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 09-24-2007
Brenton King's Avatar
Brenton King Brenton King is offline
Flexsim Technical Support
 
Join Date: Jul 2007
Posts: 44
Downloads: 60
Uploads: 5
Thanks: 10
Thanked 41 Times in 15 Posts
Rep Power: 268
Brenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to all
Default

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
Reply With Quote
  #5  
Old 09-25-2007
tsconcept's Avatar
tsconcept tsconcept is offline
Flexsim User
 
Join Date: Aug 2007
Posts: 8
Downloads: 4
Uploads: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
tsconcept is on a distinguished road
Default

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.
Reply With Quote
  #6  
Old 09-25-2007
Brenton King's Avatar
Brenton King Brenton King is offline
Flexsim Technical Support
 
Join Date: Jul 2007
Posts: 44
Downloads: 60
Uploads: 5
Thanks: 10
Thanked 41 Times in 15 Posts
Rep Power: 268
Brenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to all
Default

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
Reply With Quote
  #7  
Old 09-25-2007
Brenton King's Avatar
Brenton King Brenton King is offline
Flexsim Technical Support
 
Join Date: Jul 2007
Posts: 44
Downloads: 60
Uploads: 5
Thanks: 10
Thanked 41 Times in 15 Posts
Rep Power: 268
Brenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to allBrenton King is a name known to all
Default Sample model

With two quick changes to the processors triggers I have the recorder working in this model. No other code was changed.
Attached Files
File Type: zip Display_Label.zip (42.5 KB, 314 views)
Reply With Quote
  #8  
Old 09-25-2007
Cliff King's Avatar
Cliff King Cliff King is offline
Vice President Technical Services
 
Join Date: Jul 2007
Location: Utah
Posts: 272
Downloads: 158
Uploads: 14
Thanks: 102
Thanked 304 Times in 110 Posts
Rep Power: 409
Cliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud of
Default 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.
Reply With Quote
  #9  
Old 09-25-2007
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 518
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

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."
Reply With Quote
  #10  
Old 09-26-2007
tsconcept's Avatar
tsconcept tsconcept is offline
Flexsim User
 
Join Date: Aug 2007
Posts: 8
Downloads: 4
Uploads: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
tsconcept is on a distinguished road
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 08:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.