LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

semaphore error

Hi,

When I use semaphores, I obtain the following message error I attach here. It seems like I don't acquire that semaphore before I destroy it but I'm sure I acquire that semaphore before.. what's wrong?

Thanks to eveybody,

ToNi.
0 Kudos
Message 1 of 9
(3,851 Views)
can you encapsulate the portion of code generating the error?  It would be most helpful for us.

Paul
0 Kudos
Message 2 of 9
(3,844 Views)
Hi,

Now I'm working to try localize the portion of code where the error is generated. I haven't localized it yet. I run my program and then I create one sempahore and when I finalize my program I destroy it and then I close my program (vi) but before close I obtain it. And also , sometimes not always I obtain this another error when I run my program, also I attach you here.

When I localize when the error is generate I post my portion of code here, sorry, but since then, do you have some idea why it happens? I'm a bit confusing about it.

Thanks for helping me,

ToNi.
0 Kudos
Message 3 of 9
(3,838 Views)
I forget one question, in LV is there any way to write a message to the console like in Java (System.out.println("...")) ? It would be very helpful to localize where the error is generated because so I would know LV has executed until there.

Thanks again,

ToNi.
0 Kudos
Message 4 of 9
(3,837 Views)
Sorry I forgot to post the error.
0 Kudos
Message 5 of 9
(3,833 Views)

The error seems to be coming from the fact that the ref num is being closed somewhere and then you are trying to utilized a refnum that is already closed.

Best I can do with the info that I have at the Moment.


Paul
0 Kudos
Message 6 of 9
(3,826 Views)
Hi,

I have solve one problem but the another one no. Now I get this error message and I already have localized where this error is generated. The error is generated when I call the block DB Tools Create Table.vi. I attach you my code and the message error. What's wrong? What I don't understand if that I have another process that do the same as it, and that works fine and doesn't generate this error and I also do the same there. why does this process generate this error and the another one no (they are the same and do the same)?

Thanks,

ToNi.
0 Kudos
Message 7 of 9
(3,811 Views)

Hmmm, you seem to love global variables. 😉 Can you include the global?

How are these VIs called? How are the globals first written? Can you also attach the other VI that works?

Is DB Tools Create Table.vi from a toolkit?

0 Kudos
Message 8 of 9
(3,803 Views)
Hi,

I already have solved the problem. The another vi read the global variable when I had assigned no value to it yet. 🙂

This is the problem of using global variables....you must be careful to control them well 😉 but sometimes they are useful because you can read it more faster than obtain the reference of that object each time in a loop and the cpu usage increase a little more if you obtain the reference each time than if you only read the global variable.

Thanks,

ToNi
0 Kudos
Message 9 of 9
(3,765 Views)