Overview:
This VI exemplifies how to check which user is accessing a shared resource.
Description:
There are three actions: Release Access, Get Access, Get Status.
-Get Access: Checks to see if the resource is in use; if not, it passes the requesting user's flags. If the resource is in use, it passes the existing flags to notify which user is accessing the resource and updates the "Resource is in use" output to true.
-Release Access: Checks to see if the user requesting to release access is the last one to set the flags - if so, then an array of zeros is set; if not, then it passes the existing flags to notify which user was last granted access.
-Get Status: Passes out current flags and current in use status.
This VI could be useful for setting security access for a shared resource like a specific VI, hardware, database or library.
Requirements:
LabVIEW Base Development System.
Steps to Implement or Execute Code:
1. Open the attached VI "Functional Global Flags to Protect Shared Resource LV 2012 - NI Verified.vi".
2. Run the VI as a FGV.
Additional Information or References:
**This document has been updated to meet the current required format for the NI Code Exchange.**
--Michelle
National Instruments