Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Acquire Semaphore VI

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: Semaphore VIs

Requires: Base Development System

Acquires access to a semaphore.

Use this VI in conjunction with the other Semaphore VIs to implement a semaphore in LabVIEW.

Details  Example

semaphore is a reference to a semaphore.
ms timeout specifies how many milliseconds the function should wait for the semaphore to become available. The default is -1, indicating never to time out.
error in describes error conditions that occur before this node runs. With the following exception, this input provides standard error in functionality.

This node runs normally even if an error occurred before this node runs.
semaphore out has the same value as semaphore.
timed out is TRUE if the semaphore did not become available before the function timed out or if an error occurred.
error out contains error information. This output provides standard error out functionality.

Acquire Semaphore Details

If the semaphore is already acquired by the maximum number of tasks, the VI waits ms timeout milliseconds before timing out. If the semaphore becomes available during the wait, timed out is FALSE. If the semaphore does not become available or semaphore is not valid, timed out is TRUE. The count on a semaphore is incremented each time Acquire Semaphore executes, even if the task acquiring the semaphore has already acquired it once.

Example

Refer to the Simple Semaphore VI in the labview\examples\Synchronization\Semaphore directory for an example of using the Acquire Semaphore VI.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit