question

Mustafa L avatar image
1 Like"
Mustafa L asked Mustafa L commented

Connecting conveyor connections in flexscript

I am trying to connect processors to the my conveyors using flexscript. However, I cannot set the location of the connection correctly.

I use the function

contextdragconnection(processor1, conveyor, "A"); which creates an entry transfer object on the conveyor

Then I use

contextdragconnection(conveyor, processor1, "A"); which creates an exit transfer object.

However these entry transfer and exit transfer objects are not placed correctly on the conveyor. I see that there is a property of the entry transfer object that allows me to set the position of the object wrt the conveyor, but I can't set it using code.

thanks

FlexSim 18.1.2
conveyorflexscripttransfer
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

·
José Antonio MD avatar image
3 Likes"
José Antonio MD answered Mustafa L commented

Hello @Mustafa L,

The problem is that the default connection of the conveyor works strangely. The input / output connection is made with the nearest port, even if it is the output port.

The "trick" I have used is to move the processor first and then make the connections. Then I put the processor back in its position.

I attached a model with the solution as an example (it works as a loop: source> conveyor> processor).

I have created a function called "function" that performs that union.

I hope I've been helpful.

conveyor-processor-a.fsm


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

Mustafa L avatar image Mustafa L commented ·

Thanks,

I have been using the same trick for now. In my earlier model I only needed to connect the processors to the conveyor at the input and output (a lot more easy to predict the connection. However, I needed a little more precision which is why I wanted to know the exact way to move the exit transfer and the entry transfer.

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.