question

kimsh avatar image
0 Likes"
kimsh asked Jason Lightfoot commented

1. each label count / 2. color change by condition

changing the color using custom code in the Station Percent function succeeded.
However, there are two things left.
1. I want to change the color by linking other models so that the station percentage can be checked with the eyes. As shown in the picture below, when the item changes to red at the station, I want to change the rock model next to it to red. (The rock model is an example, and if there is anything that is easy to change color, please recommend it.)1701087471894.png

2. Along with the station color change code, the number was selected for the item type.
ex) item.Type = 1;
I want to count by item type on the dashboard. (I can't find the function)
(Furthermore, it would be nice if there was (1) a way to count directly from the station (2) after passing through a certain point (sync, etc.))


3line conveyor.fsm

FlexSim 23.2.2
chage color and count
1701087471894.png (634.3 KiB)
3line-conveyor.fsm (52.1 KiB)
5 |100000

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

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

Just add to the station a pointer label to the rock and then add this line early in the processing time:

current.rock.color=Color.gray;

and then when you change the item to red, add:

current.rock.color=Color.red;

You can select the output by type directly from the station statistics (as in attached model).

3line-conveyor_Color_jl.fsm


Also - I'd like to point out that this works with your other post where the station needed to reference the 3 decision points that feed it from the conveyors (for resequencing). Had we used centerports for the feedDPs and the rock we'd have four connections and have to assume the numbering is preserved with any model changes. Also that makes it harder to read the expressions when they just have centerport references. With well named labels you can tell the intent of expressions and also quickly verify the pointer values without cross referencing each other.


· 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.

kimsh avatar image kimsh commented ·

So nice!!!!!! good great!! I solved!

but, I have a question. I added the label of the station(station - labels - add pointer label).

Did you use same function? (add pointer label) or add number label etc?

And, what is the mean of this function? (how can act system?)

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ kimsh commented ·
I added the pointer label in the way you described (and as I mentioned in your other post).


I don't understand "What is the mean of this function?". Label pointers provide a self-documenting reference to other objects in the model which you can use in FlexScript expressions.

0 Likes 0 ·