question

Xu Chunqi avatar image
0 Likes"
Xu Chunqi asked Xu Chunqi commented

Add slot label manually

Hi,

I want to add slot label to one rack manually. What I did is adding the "slotLabels" and "resetLabels" into the tree of rack2. Then I test if it works by using the "Matching Labels" strategy. But it didnot work.

Here is the test model, in the model I use the "slot label painter" to add slot label to rack1 which worked well, I added slot label manually as mentioned which worked badly.

I wonder if I missed any steps? Looking forward to your answer.

testV20.1.fsm

FlexSim 20.1.1
flexsim 20.1.1slot label
testv201.fsm (39.7 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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Xu Chunqi commented

The attached file sets some slotlabels in levels of 2nd rack to value 2 by source code in On Message trigger of the BasicFR Object. The activation source code is in a script window.

Model.find("BasicFR1").as(Object).message(0,NULL,1);

The source code function is

function_s(slots[indexSlot], "paintLabel", "myLabel", labelValue, 1);

The parsed Parameters are in following order:

  • slot
  • "paintLabel" the called function
  • "labelName" as a string
  • labelValue as the value of the label you want set
  • "1" I don't know but is maybe a default value.

set_slotLabel.fsm


set-slotlabel.fsm (41.7 KiB)
· 4
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

Comment to add Slot Labels by Tool Paint Slot Labels with an own Color Palette in Toolbox.

0 Likes 0 ·
Xu Chunqi avatar image Xu Chunqi commented ·

Thank you very much.

When I reset the model, the label will disappear. Can this be solved?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Xu Chunqi commented ·

I have updated my answer and attached a changed model. But I still don't know how to erase slot labels now!

0 Likes 0 ·
Xu Chunqi avatar image Xu Chunqi Joerg Vogel commented ·

Thank you a lot, it works well.

0 Likes 0 ·