LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

semaphore release error

I am making my first attempt at using semaphores,and am getting error 1111 when I go to release the semaphore.  I have read several posts on this error, but saw none that seem to offer a solution.  As you can see, I created a semaphore with a size of 1, and I have wired in a -1 to the timeout of the acquire semaphore.  How did the release get executed without the semaphore being acquired?

Jim

LV 2020
Download All
0 Kudos
Message 1 of 3
(1,123 Views)

You aren't showing us all of your code.  In your create image, the semaphore reference wire is being branched to somewhere else.  Where and what is going on there?

 

If you happened to release a semaphore that has already been released somewhere else, you'll get this error message.

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

Hi Ravens Fan,

 

My code is a bit too large to upload.  I have 2 parallel loops.  The top loop (next to the obtain semaphore reference) is my event structure.  The timeout event checks the status of my hardware (temperature, pressure etc.) to protect the system when idling.  The lower "main loop" is where all of the production sequence is.  As both loops need to talk to the same modules, I added the semaphore.  I thought that with a semaphore of size 1 I could avoid this problem.

Jim

LV 2020
0 Kudos
Message 3 of 3
(1,107 Views)