ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

取消
显示结果 
搜索替代 
您的意思是: 

Queue inside Packed Project Library

已解决!
转到解答

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 项奖励
1 条消息(共 10 条)
2,561 次查看

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
2 条消息(共 10 条)
2,526 次查看
解答
已被主题作者 Vipin@AMP 接受

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


"Should be" isn't "Is" -Jay
3 条消息(共 10 条)
2,518 次查看

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.
4 条消息(共 10 条)
2,508 次查看

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 项奖励
5 条消息(共 10 条)
2,485 次查看

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 项奖励
6 条消息(共 10 条)
2,470 次查看

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.
7 条消息(共 10 条)
2,457 次查看
解答
已被主题作者 Vipin@AMP 接受

 

Its working now.

 

Please check the attached code and sequence.

0 项奖励
8 条消息(共 10 条)
2,442 次查看

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 项奖励
9 条消息(共 10 条)
2,434 次查看

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.

 

10 条消息(共 10 条)
2,414 次查看