Go to Post Downsides: it's highly toxic and recognized as a carcinogen in CA. Upsides: Basically everything else - lethc [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 10-06-2010, 18:11
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Multiple Dequeue Element VIs in loop

Sorry for misinterpreting your question. Hopefully third time's the charm.

I changed my example to have a two loops instead of three like you're saying. In the "state machine" loop, I put two dequeue statements in parallel that update their corresponding outputs.

What I found was that when the iteration of the loop starts, both dequeue blocks are sitting waiting for data. When one queue gets its data, the second queue is still blocking. Unless that second queue data gets data, the first queue will never be dequeued again. This is because the loop iteration can't complete since everything inside the loop hasn't completed.

I was able to get this to work by doing the following
- On the timeout terminal of the dequeue block, add a constant of 1 (dequeue tries to get data for 1ms then gives up)
- Send the timed out terminal into a case structure. In the false case, put your processing of the data from the queue

What this will do is give each queue a chance (1ms) to process each loop of the iteration. If there is data waiting for it, it will be processed. If not, it wastes the amount of ms in the timeout. Chances are with the way Labview works, they will all happen in parallel since they're not dependent on each other, which means you shouldn't be wasting too much time in the timeout cases.

I can post a picture if you need me to.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
game element blackiceskier General Forum 11 23-10-2009 13:15
[FTC]: Multiple Programs or One Program with Multiple Auto Modes kevin51292 FIRST Tech Challenge 4 02-01-2009 20:37
07 Game element? bear24rw Rumor Mill 15 05-01-2007 18:38
pic: Division By Chicken Element Tim Delles Robot Showcase 2 12-04-2006 21:26


All times are GMT -5. The time now is 22:04.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi