LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

resources bug/error, how to fix?

resources error.png

 

hi, I've been searching, but couldnt find anything similar with my error. After executing my VI few times, somehow the resource device becomes duplicated. I cant use this duplicated resources to start my VI.

 

I had this issue with LV 2010, and I have just installed LV 2013 (evaluation) to check if this problem still exists. For both versions, the problem is there.

 

regards,

Yan.

0 Kudos
Message 1 of 6
(2,344 Views)

It is not clear from the picture but it seems you are opening the ressource at each iteration of the while loop. You should open it once before the while loop and close it only after the while loop is stopped. Your ressource should also be configured only once before the while loop.

 

Ben64

0 Kudos
Message 2 of 6
(2,341 Views)

Hi ben,

 

I'm using while loop because I need to put event stucture. And I always have the task closed when my event stucture done. So, I dont really think thats the issue?

 

For example if I'm trying to generate signal based on event, I need to put them inside while loop, isnt it?

 

timing card.png

 

the local variable (which represented as reference) is actually that clock indicator (inside event structure).

0 Kudos
Message 3 of 6
(2,322 Views)

You should setup once before the while loop and close once after the while loop.  This makes sure you have the resource during the extent of your application.


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
0 Kudos
Message 4 of 6
(2,318 Views)

hi all, thanks for responses.

 

So, how should I change my event? I should take out my init&close session out of the event? or how should I do it properly?  Maybe I'm just not trying hard enough to find examples to work with multi pxie devices with events. An example of how to do it would be very appreciated.

 

regards from Berlin,

Yan.

0 Kudos
Message 5 of 6
(2,291 Views)

I just did some trial and I think I found the bottleneck.

 

When running a VI, if I click Abort Execution (Red button on top) would mean my VI is not properly executed until the end. This would create the duplicates. Is it normal? I mean, not everyone are pro LV programmer who can ensure their code should execute nicely from the start to the end. Sometimes we need to click the abort button.

 

regards,

Yan. 

0 Kudos
Message 6 of 6
(2,287 Views)