LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Specifying an index for inserting elements in an existing queue

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

0 Kudos
Message 21 of 34
(1,505 Views)

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.

0 Kudos
Message 22 of 34
(1,501 Views)

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.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 23 of 34
(1,484 Views)

I am sorry, but can you elaborate on what do you mean by separate queues ?

 I mean spearate queues for what ?

0 Kudos
Message 24 of 34
(1,475 Views)
Sounds like the Actor Framework's basic description to me. Or I missed something important.

"Should be" isn't "Is" -Jay
0 Kudos
Message 25 of 34
(1,472 Views)

Runjhun,

 

i think you should learn about named queues.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 26 of 34
(1,466 Views)

By reading the previous posts, what do you think I am using if not named queues.

0 Kudos
Message 27 of 34
(1,443 Views)

@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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 28 of 34
(1,436 Views)

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.

0 Kudos
Message 29 of 34
(1,311 Views)

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

0 Kudos
Message 30 of 34
(1,300 Views)