• Document: ni.com Preparing for the CLAD Exam
  • Size: 3.02 MB
  • Uploaded: 2018-12-08 17:58:52
  • Status: Successfully converted


Some snippets from your converted document:

Preparing for the CLAD Exam ni.com Breaking Data Flow Situation: Run 2 Loops simultaneously with 1 Stop Button Wiring the Stop Button from one Loop to the other will NOT work. Solution: Use a Local Variable Drawbacks: Introduces a Possible Race Condition Local Variable referencing the Stop Button ni.com 2 Data Flow Name Appearance Function Drawbacks Wire Connects data at Must follow Data different terminals Flow Local Variable Allows a value to be Introduces the accessed anywhere possibility of a race in a single VI condition Global Variable Allows a value to be Introduces the accessed in any VI possibility of a race condition Functional Global •Non-reentrant VI Variable •Allows a value to be accessed in any VI •Removes possibility of a race condition •Allows actions to be performed on data ni.com 3 Breaking Data Flow – Functional Global Variable This Functional Global Variable allows you to get the elapsed time since the last time you called the subVI. ni.com 4 Breaking Data Flow - Queues Queues ensure no data is lost when it is transferred between loops running at different rates. ni.com 5 Breaking Data Flow Which of the following does not conform to the Dataflow programming paradigm? a. Shift Registers b. Tunnels c. SubVIs d. Local variables ni.com 6 Breaking Data Flow Which of the following does not conform to the Dataflow programming paradigm? Justification: Local variables do not conform to the Dataflow paradigm because they communicate by a. Shift Registers reference, not by value. The basic premise of local variables is to allow transfer of data where it is impossib b. Tunnels to use wires. This circumvents the Dataflow paradigm. c. SubVIs d. Local variables ni.com 7 Breaking Data Flow Which variable is commonly used to eliminate race conditions by preventing simultaneous access to code or data? a. Functional global variable b. Local variable c. Global variable d. Shared variable ni.com 8 Breaking Data Flow Which variable is commonly used to eliminate race conditions by preventing simultaneous access to code or data? a. Functional global variable Justification: You can place critical data or section b. Local variable of code in functional global variables. Since functional global variables are non-reentrant VIs, the possibility of race conditions is eliminated. c. Global variable d. Shared variable ni.com 9 Breaking Data Flow Which data synchronization mechanism ensures that no data is lost when an application temporarily provides data faster than it is able to process it? a. Notifier b. Queue c. Semaphore d. Local Variable ni.com 10 Breaking Data Flow Which data synchronization mechanism ensures that no data is lost when an application temporarily provides data faster than it is able to process it? a. Notifier Justification: Answer C is incorrect because semaphores cannot pass data. Answer A is incorrect because notifiers pass data, but they can only pass one element at a time. Data is overwritten and lost if the program writes to the b. Queue notifier twice before data is read. Answer D is incorrect because local variables have no mechanism for determining when data is updated, so the

Recently converted files (publicly available):