question

Carlos S3 avatar image
0 Likes"
Carlos S3 asked Jeff Nordgren answered

itemtype of a processor

Hi

Recently, I asked how to get the itemtype from a queue. This time, I'd like to know if I can do the same from a processor. In this case, I'm trying to determine the itemtype being worked by a processor by first labeling the item and then using this command:

getlabelnum(node("Cybex 2", model()),"usertype") != 1)

However, I'm not getting the expected result and I'm not sure if my requirement is possible to achieve (in regard to processors).

Thanks to @Jörg Vogel for the last tips.

My Flexsim version is 7.3.6

Other (please specify)
Other
processorlabelitemtype
· 5
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 ·

In which function do you test this statement to get an item into the processor?

0 Likes 0 ·
Carlos S3 avatar image Carlos S3 Joerg Vogel commented ·

I used the if condition

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Carlos S3 commented ·

I mean which function or trigger: Send to Port, Pull Strategy, Pull Requirement? A logical comparison is only useful in the Pull Requirement to test if the evaluated item matches the requirement. All other functions expect a port as the return value, where the item is pulled from or sent to.

0 Likes 0 ·
Show more comments
Jeff Nordgren avatar image Jeff Nordgren commented ·

@Carlos S3,

Did you get this question resolved to your satisfaction?

Thanks.

0 Likes 0 ·

1 Answer

Jeff Nordgren avatar image
0 Likes"
Jeff Nordgren answered
@Carlos S3

Your model file or a small sample model of the problem would be helpful. In what object are you using the comparison? For example, if you were using it in a Queue just before the Processor (Cybex 2 is Processor?), I would use something like this:

if(getlabelnum(first(node("Cybex 2", model())),"usertype") != 1)

You have to use the "first" command because you want to reference the first flowitem in the Processor and not the Processor itself. Does this make sense?

Thanks.

5 |100000

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