ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 06-26-2014
Carolina Piccoli Carolina Piccoli is offline
Flexsim User
 
Join Date: Apr 2014
Posts: 10
Downloads: 0
Uploads: 0
Thanks: 7
Thanked 0 Times in 0 Posts
Rep Power: 74
Carolina Piccoli is on a distinguished road
Default how tp get the number of the input port of the incoming item

Is there a function to get the number of the port through which the flowitem has entered an object?

I have 42 input ports connected to an object and I am modifying the tasksequence of the Task Executer as Flowitem which depends on the port the flowitem has come from.

It can be either in a label or only a function to be inserted in the tasksequence code.

Actually what I really need is to get the networknode to which the upstream object (which has just passed the flowitem) is connected to.

So I was thinking of using

getnetnode(inobject(current, * port* ),1);

but then I don't know how it works when I have 42 ports and it has to be the port through which the object has just entered the model.

Any ideas?
  #2  
Old 06-26-2014
RalfGruber's Avatar
RalfGruber RalfGruber is offline
FlexSim Software Products
 
Join Date: Jul 2007
Location: Orem, UT, USA
Posts: 195
Downloads: 37
Uploads: 0
Thanks: 518
Thanked 294 Times in 124 Posts
Rep Power: 345
RalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to behold
Default

Carolina,

in an OnEntry trigger you have access to the port number a flowitem has entered an object through simply using the variable "port".
The command getnetnode() does refer to the blue connection line, not the inport number. Look that up in the command help please. To make that work in your case, you would need to have 42 network nodes connected to your object corresponding to the 42 inport connections.

If you only need a reference to the network node an item came through, just add a label to the item and on all network nodes' OnContinue triggers set the reference to the network node as a value in that label.

Maybe you want to post your model to see exactly, what you are trying to do? That would reduce the effort over here to help you a lot.

Best wishes
Ralf
FlexSim
The Following 4 Users Say Thank You to RalfGruber For This Useful Post:
Tom David (06-27-2014)
  #3  
Old 06-26-2014
Carolina Piccoli Carolina Piccoli is offline
Flexsim User
 
Join Date: Apr 2014
Posts: 10
Downloads: 0
Uploads: 0
Thanks: 7
Thanked 0 Times in 0 Posts
Rep Power: 74
Carolina Piccoli is on a distinguished road
Default

Thank you Ralf!

What you said will work for me. I have 42 networknodes.

What I just tried is to set label using at the on exit trigger of my "upstream" object opipno(current,1) and use that number to get the networknode which is connected to both upstream and downstream object.

Maybe it is simpler in the way you mentioned: using the networknode as a value in a label. I will try this way and see what suits me best!

Thank you very much! I am a very beginner and I am having difficulties in finding what I actually need on the command reference.

Tags
inobject, input port


Thread Thread Starter Forum Replies Last Post
Sequence Number on Flow Item FlorianK Q&A 1 04-11-2013 03:49 AM
Number of central port FlorianK Q&A 2 05-26-2011 05:44 AM
each item has it's given location,and item's code correspond to storage location Robert Liu Q&A 3 03-28-2011 08:46 PM
Transporter (Input port not shown in Properties/General/Ports) shafizad Q&A 2 07-09-2010 06:27 AM
set the location of flowitem from 2nd input port in a combiner KelvinHo Q&A 4 04-11-2008 11:34 AM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.