question

Derek Flannery avatar image
0 Likes"
Derek Flannery asked Sam Stubbs commented

How to output the value of a label when it changes?

I am working on a model where I want to, either through a dashboard or output to a note pad file, the values of a label every time I change it.

There may be an easy way to use code to output (because I use a message to a source to change the label value). I have the value it changes to stored in a local variable in the message trigger, but to actually record that value without going through a messy global table setup is not ideal.

Thanks for the help.

FlexSim 16.2.1
labelsoutput
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered Sam Stubbs commented

It sounds like what you want is a tracked variable. You can use a tracked variable to get the changes to a value/variable. In your logic, wherever you change the label, save it's value to the tracked variable. And then you can add that tracked variable to a dashboard widget and it can show you the previous values or average value etc of the tracked variable. Is this along the lines of what you were looking for?

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Derek Flannery avatar image Derek Flannery commented ·

I was trying to follow done that path, but I was having troubles changing how it operated, because it only focused on the current value, not anything else. But I am very ignorant of the program, so I proabaly missed something.

0 Likes 0 ·
Sam Stubbs avatar image Sam Stubbs ♦ Derek Flannery commented ·

A tracked variable keeps a record of it's past values. To view them, So if you assign a tracked variable to say a box-plot graph, then you'll see the values displayed. Or you can get an average etc.

The link Kari provided explains in further detail. https://answers.flexsim.com/questions/27025/is-there-a-way-to-display-the-average-value-of-a-l.html

Or you can look into the Manual to see the documentation for using Tracked Variables.

0 Likes 0 ·
Kari Payton avatar image
0 Likes"
Kari Payton answered Ben Wilson edited

@Derek Flannery I had a question before that may be similar to what you are trying to do. Check this post:

https://answers.flexsim.com/questions/27025/is-there-a-way-to-display-the-average-value-of-a-l.html

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.