LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

broken array wire

I am using a queue and trying to connect to a sink of type 1-dArray of double...

I used the release queue and it says I have a 1-d (sub)array of cluster of 1 element.

 

I am new to programing and I do not know how to fix this or if I am doing something wrong.

 

Thanks for helping

0 Kudos
Message 1 of 21
(3,574 Views)
Can you provide your code or a screen shot (.png prefered, NOT .bmp). It will make determining what you are doing/try to do, much easier.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 21
(3,572 Views)

untitled.PNG

 

here it is. I want to be able to view a chart of the data but only when I click a button. And I do not want the chart to have just started I want the past 5 min to show up on the chart when I click the button. So I believe I am doint this right to put the array of data into the history. I recieve data at 10hz.

 

That help?

0 Kudos
Message 3 of 21
(3,564 Views)
The reason why it's happening is that the Release Queue returns an array of elements of the subtype of the queue. E.g., if you queue type was a DBL (each queue element is a DBL), the Release Queue would return and array of DBLs. Since your subtype is an array, LabVIEW has to wrap the subtype in a cluster. That said, I don't understand why you're using a queue there in the first place. It makes no sense, as it seems to serve no purpose. You can just connect the 1D array directly to the History property and you'd be done. Are you trying to use the data someplace else in your code? If so, you're closing the queue right away, so it won't be available.
0 Kudos
Message 4 of 21
(3,552 Views)

I think you need to post your actual VI so we can see all that you are trying to do.  It doesn't make sense to be placing an array into a queue, then proceeding to destroy the queue.  Why are you doing that?

 

The output of release queue is a 1-D array of cluster of a 1-D arrays.  So you need to iterate through your 1-D array, then use the unbundle function to get your array out of the cluster.

0 Kudos
Message 5 of 21
(3,550 Views)

Well yesterday I asked how I should make this array so that the elements would be replaced by new elements on this page...

http://forums.ni.com/ni/board/message?board.id=170&thread.id=505780

 

and they suggested I use a queue.

0 Kudos
Message 6 of 21
(3,544 Views)

Also the subarray going into the queue is just 1 element. I want to make an array of these elements. Does that make sence?

 

sorry for double post

Message Edited by Kevin's on 06-17-2010 09:56 AM
0 Kudos
Message 7 of 21
(3,540 Views)

Okay, a lossy queue makes sense for storing a finite history worth of queue elements.  But why are you releasing the queue right after adding an element to it?  That kills the history and the queue meaning you can't add anything to it again.

 

You should only kill the queue at the end.  To see the elements that are in the queue history, you want to use Get Queue Status.

0 Kudos
Message 8 of 21
(3,536 Views)
ooo ok well I dont mean to do that then I dont want to kill it I just needed an array of the elements in the queue and I thought that was how to get it out.
0 Kudos
Message 9 of 21
(3,532 Views)
Based on what you're describing, your queue subtype should be DBL, not a 1D array of DBLs. In other words, for the queue type wire a DBL constant. Then enqueue as many elements as you want.
0 Kudos
Message 10 of 21
(3,518 Views)