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 04-03-2012
kjkartik kjkartik is offline
Flexsim User
 
Join Date: Mar 2012
Posts: 5
Downloads: 8
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
kjkartik is on a distinguished road
Default Content variable not giving the number of items

Hi,

I am using content(current) in a queue to retrieve the number of flowitems in a queue in On Message trigger, but for some reason, it always returns 0. So, I tried using a label variable to increment and decrement as the flowitems enters and exits to get the current content of the queue, but it still returns 0 on On Message trigger. However it returns the right value if I use it in any other trigger like entry/exit. I do have finite number of messages sent to the queue

Am i missing something here? Please help

cheers
kartik
  #2  
Old 04-03-2012
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

It would be easier to explain what is wrong if you would attach the model.
  #3  
Old 04-03-2012
kjkartik kjkartik is offline
Flexsim User
 
Join Date: Mar 2012
Posts: 5
Downloads: 8
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
kjkartik is on a distinguished road
Default

Hi Bobo,

Here is the attached model. If you look at On-Message trigger of Queue10 or Queue 1(in this case), it has a print statement for current(content). Hopefully this will elaborate my question better.

Thanks in advance!
Attached Files
File Type: fsm multiple-conveyors-flexsim.fsm (41.4 KB, 92 views)
  #4  
Old 04-03-2012
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

Your timing is such that things are getting through the Scanner before the Queues have content. The queue says its content is 0 because its content is 0. Your timing is messed up.
The Following User Says Thank You to Phil BoBo For This Useful Post:
kjkartik (04-03-2012)
  #5  
Old 04-03-2012
kjkartik kjkartik is offline
Flexsim User
 
Join Date: Mar 2012
Posts: 5
Downloads: 8
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
kjkartik is on a distinguished road
Default

Thanks Phil, it works now if I make the scan slower.

Tags
label, queue


Thread Thread Starter Forum Replies Last Post
MAX content is over passed! shafizad Q&A 3 12-13-2010 06:44 AM
Global variable as experiment variable Matthias Hofmann Q&A 3 09-08-2009 09:42 AM
Using a Variable number of Operators for Processing Brandon Peterson Tips and Tricks 4 07-16-2008 09:16 AM
Batch/Max Content Gavin Douglas Q&A 4 07-09-2008 12:28 AM
Operator not unloading items before picking up priority items Howe Chiat Cheng Q&A 2 05-28-2008 02:05 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.