question

Farah A avatar image
0 Likes"
Farah A asked Farah A commented

Problem with Move object

Hello,

I'm trying to move an object from the conveyor to a queue by using the feature move object,

it works when i put in Object : token.item however when i'm using lists and i want to move the object having a label (number of the pallet) i just pulled from the list i have this error :

FlexScript exception: Invalid down cast. Object is not an instance of the target type. at MODEL:/Queue1>variables/sendtoport

here's a simplified version of my model attached TEST_1.fsm

Can you please help me ?

FlexSim 21.2.1
move objecttoken.pulled
test-1.fsm (49.5 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

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Farah A commented

The "Push Value" (the thing that gets put onto the list) is currently set to "token" in the in the Push to List activity. As such, the label "pulled", is a reference to the token, not the item.

Either change the "Push Value" to token.item, meaning the item itself gets pushed to the list. (And adjust the pull query, because the "NumPal" label is written with capital letters on the item)

Or reference the item in the Move activity through the pulled token (token.pulled.item). In this case, take care that you don't delete the pulled token before all actions referencing it have finished. (Not a problem in the test file, but happened to me before)

test-1_fm.fsm


test-1-fm.fsm (48.7 KiB)
· 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.

Farah A avatar image Farah A commented ·
This resolves my problem, thank you so much !!
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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