LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Queue inside Packed Project Library

Solved!
Go to solution

Hello Everyone,

 

I m facing an issue when I m using PPL in my TestStand Custom Step Type.

 

The issue is , I have two vis (Server and Client) inside same ppl, I want pass a queue reference from Server.vi to Client.vi using global variable. But when I m executing , getting error 1 - which is invalid queue ref. Can anyone tell me what would the reason for this and how to solve this issue.

 

 

I sincerely appreciate your time.

 

-Vipinraj KK

0 Kudos
Message 1 of 10
(2,531 Views)

This usually points to a race condition where the client reads the global before the server can set it.


GCentral
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 2 of 10
(2,496 Views)
Solution
Accepted by Vipin@AMP

Name the queue! Then delete the global.  All better now.


"Should be" isn't "Is" -Jay
Message 3 of 10
(2,488 Views)

If you're relying on a global to distribute your references, you have to set it explicitly first, or it will just have the reference number of whatever it was when the global was created, which is, in all likelihood, not the same.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 4 of 10
(2,478 Views)

I m doing same thing, 

 

I have 3 vis , 

 

1. Start Server.vi -- where I m creating and opening the queue ref

2. Write value.vi -- pass the value to the Tx queue

3. Read Value.vi -- get the value from Rx Queue

 

I m ensuring Start server.vi is executing first and also added a 2000ms delay.

 

Also I tried creating the queue with same name inside all three vis, but that also not working.

 

Note: These vis are inside same packed project library  .its called inside TestStand custom step.

 

 

0 Kudos
Message 5 of 10
(2,455 Views)

So..... What is keeping the vis that obtain a reference to the named queue from going idle?  You just may need to post some code.


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 10
(2,440 Views)

Does the library work outside of TestStand?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 7 of 10
(2,427 Views)
Solution
Accepted by Vipin@AMP

 

Its working now.

 

Please check the attached code and sequence.

0 Kudos
Message 8 of 10
(2,412 Views)

It would be good to include a description of the fix.  Since people come here for help, you could be helping someone fix their problem as well.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 10
(2,404 Views)

Reference issues between TestStand steps are usually one of 2 things in my experience - garbage collection or different application instances.

 

Future people stumbling here should try:

  1. Make sure a VI is always running while holding a reference open (run async with an async VI step or in an async subsequence). LabVIEW may garbage collect a reference if there are no VIs running with the reference open.
  2. Make sure both steps are calling the VIs in the same project (or no project). References from one project are not valid in another.

 

Message 10 of 10
(2,384 Views)