LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Queues

I'm trying to use Queue functions in LV Embedded 8.5.  I can initialize(obtain Queue) without problems but if I try to preview or dequeue an element I get a "data misaligned" error and the program halts.   Aren't Queues supported?  A RT FIFO won't work for me in this application as I want to be able to enqueue from either end of the buffer. I could roll my own but it would be handy to use the built in functions if possible.  The Queue is actually empty when trying to preview so it should timeout.

Thanks
0 Kudos
Message 1 of 5
(7,372 Views)
Hi,

What target are you using? There is a LabVIEW C Generator argument 'TargetAlignment' which must be set to the right value for LabVIEW data structures to be properly aligned. If this is a custom target, verify that this argument is set to the correct value in your CGen VI.
--
Michael P
National Instruments
0 Kudos
Message 2 of 5
(7,366 Views)
Thanks for reply Michael. My target is the 537 Blackfin. I must confess I don't know where to set this  'TargetAlignment' argument. I don't see any mention of it in the properties dialog nor do I know what the "CGen VI" is. My project has been coming along smoothly so far so I presume my Target settings are OK. Can I bother you to be a bit more specific?



Message Edited by Tariah on 01-31-2008 10:33 PM
0 Kudos
Message 3 of 5
(7,351 Views)
Hi,

I didn't realize you are using the Blackfin target; I thought you might be using the LabVIEW Microprocessor SDK. Ignore my last response. What data type are you using in the queue? Can you attach a VI that demonstrates the issue?
--
Michael P
National Instruments
0 Kudos
Message 4 of 5
(7,333 Views)
Found the issue, Michael...thanks.
I was using a single VI to contain all of my possible  Queue functionality...an action engine if you will.
I had  an enumerated "method" to obtain,preview, enqueue, dequeue, get status, close,etc.
When I first obtained the Queue, I fed the reference to the queue into a shift register in the VI to be maintained between calls to the action engine.
Upon the advice of someone  I work with, I got rid of the shift registers and used globals for the references and this seems to work. Maybe the shift register's memory is different in some way???
Thanks


Message Edited by Macbeth on 02-04-2008 03:11 PM
0 Kudos
Message 5 of 5
(7,310 Views)