LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

release semaphore with error

I use the example Windows system semaphorehttp://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=BE31D08CF3AF182EE034080020E74861&p_...

I connect errorOut control to the release semaphore, after acquire the semaphore , I release the semaphore an error occurs. How do I fix the issue?
0 Kudos
Message 1 of 2
(2,606 Views)
System Semaphore Release uses Call Library Function Node to call ReleaseSemaphore in the Windows kernel. The documentation for this API indicates that a return value of 0 indicates an error and a return value of non-zero indicates no error. The System Semaphore Release checks for a zero return value and generates the error if it is found. This is backward. Also, I would find an error value of 1 more friendly than an error value of 0. At least this won't send you on wild goose chases.
0 Kudos
Message 2 of 2
(2,606 Views)