question

Suraj J avatar image
1 Like"
Suraj J asked Suraj J commented

Assign Expression field data from a list to puller token as label

Is it possible to assign a the expression field data from list to the puller or pulled token? For example I want to know the unload station in the attached model where a TS is pushed to a list. The unloadStation is an expression field. listexpressionstotokenlabels.fsm

FlexSim 18.2.0
process flowliststoken labelsexpression field
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

Raja Sekaran avatar image
0 Likes"
Raja Sekaran answered Suraj J commented

@Suraj J

Try this,

Use the below code to access the unload station of the pulled token.

int unloadTask = findmatch(getnroftasks(token.pulled.value), 
	gettasktype(token.pulled.value, count) == TASKTYPE_UNLOAD || gettasktype(token.pulled.value, count) == TASKTYPE_FRUNLOAD);

return unloadTask > 0 ? gettaskinvolved(token.pulled.value, unloadTask, 2) : NULL;

Also attached the model for the reference.

I have taken this code from the code editor window of the expression field.

support-listexpression-3.fsm

Hope this works.

Thanks


· 1
5 |100000

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

Suraj J avatar image Suraj J commented ·

This is what I had in mind. I was wondering if there was something simpler that I am not aware of. Thanks.

0 Likes 0 ·