LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Queue Reference on a DVR?

Solved!
Go to solution

Hi All,

 

I am trying to track down a bug in my code to no avail (so far). I wanted to check if my problem is caused by a 'feature' in LabVIEW while I continue to tear (whats left of) my hair out.....

 

Here is what I'm doing:

  • I create my 'communication queues' in my toplevel vi. These are unnamed. My toplevel vi is a queue-based state machine. I'm using OO by reference. Therefore the place where I've stored my reference is Object>DVR>Cluster>queue reference.
  • Using the toplevel.vi I kick off a user interface. I do this by using Static VI reference>SetVal to pass the object/DVR value to the UI and then >Run (wait til done false) to start the UI.
  • And here's the problem: when put an element on the toplevel state-machine queue using the UI its not received by the toplevel state machine. 
  • Here's what I've looked at to try and find out what the problem is
    • The element is placed in the queue with no errors
    • The references are valid
    • One this I did notice is that when I probed the reference hex numbers they are different - my understanding was creating a new queue reference by name would give two different references to the same queue in memory (and so they have to be closed). But in my case I only create one reference to the queue, put it in my DVR and remove it as needed.......so what are the values different?
    • I've used this same architecture already in this project but in this case I didn't put the queue references on the DVR - instead I opened new references by name whenever I communicated between modules. This worked fine......but I'd prefer not to restrucutre my code if I can avoid it!

 

If anyone can offer suggestions that I can check or indeed if this is a 'feature' which has come up before I'd appreciate any comments,

 

Thanks,

Dave

 

0 Kudos
Message 1 of 3
(2,275 Views)

Hi All,

 

Please disregard the comments about the reference hex numbers being different - I built a very simple test program to make sure performance was correct and found that it was. In my test code both reference numbers are identical as should be expected! Its a common/garden bug causing my problem not a LabVIEW 'feature'......just gotta find the bugspray now!

 

Dave

 

 

 

0 Kudos
Message 2 of 3
(2,273 Views)
Solution
Accepted by topic author DeltaJ

Got it....I generated a second queue reference and over-wrote the original - this updated the DVR but not the state-machine queue. Rookie mistake - doh!

0 Kudos
Message 3 of 3
(2,269 Views)