03-05-2013 09:53 PM
Runjhun,
I see a problem for which I cannot see a possible solution.
If I understand you correctly, sub data sets must be processed sequentially. Yet you have no way of identifying the sub data sets or which device is processing some of them.
As Jeff said, a queue is not the appropriate way to pass this data. Possibly a separate queue for each device might work. That still does not address the sub data set issue.
Again, echoing Jeff, think about what you need to do with the data rather than thinking about how to do it. There likely is a better way.
Lynn
03-05-2013 10:30 PM
Lynn,
Thats what the problem is. The sub-data sets ARE being processed sequentially.
I don't have any requirement that they must be processed sequentially, But as they are being inserted in the same queue, eventually they will be processed in a sequential order which I don't want.
Jeff,
the data set also carry the information that the particular dataset should be processed by which device.
So every device wil deque the data. It'll verify a particulat token, whether the data belongs to it or not.
If the data belongs to it, it'll process the data and after finshing again deqeuing will happen.
But if data doesn't belong to it, it'll again enqueue the data.
03-06-2013 06:00 AM
RJ_15 wrote:Jeff,
the data set also carry the information that the particular dataset should be processed by which device.
So every device wil deque the data. It'll verify a particulat token, whether the data belongs to it or not.
If the data belongs to it, it'll process the data and after finshing again deqeuing will happen.
But if data doesn't belong to it, it'll again enqueue the data.
Then what you really want is separate queues.
03-06-2013 06:54 AM
I am sorry, but can you elaborate on what do you mean by separate queues ?
I mean spearate queues for what ?
03-06-2013 06:57 AM
03-06-2013 07:00 AM
Runjhun,
i think you should learn about named queues.
Norbert
03-08-2013 05:22 AM
By reading the previous posts, what do you think I am using if not named queues.
03-08-2013 06:37 AM
@RJ_15 wrote:
[...]I don't have any requirement that they must be processed sequentially, But as they are being inserted in the same queue, eventually they will be processed in a sequential order which I don't want.[...]
You are really confusing me.... First you write the quoted which indicates you are using only one queue, then you tell me that you are using (multiple) named queues........ this somehow does not match each other.
So question:
Does using multiple named queues do (functionally) what you want to have?
If not, why not? (Including example in LV explaining WHY)
Why do you insist to use only a single queue if you already wrote that the single queue cannot perform what you are looking for???
just my 2 cents,
Norbert
12-10-2019 12:12 AM
yes, it is possible.
since you are mentioning index I assume you are using an array to implement the queue. If so then all you got to do is insert your data at the index you want to and shift the remaining data to the left by one position. then increment the value of rear by one.
12-10-2019 02:15 AM
@ayudhn wrote:
yes, it is possible.
since you are mentioning index I assume you are using an array to implement the queue.
Please don't respond to ancient posts making unfounded assumptions from single buzzwords. The question was about queues, not arrays.
LabVIEW of course is a full featured programming language, so any desired functionality can be implemented by skillful coding.