Stopbg.vi – Measurement Computing UL for NI LabVIEW User Manual
Page 106
Universal Library Virtual Instruments (VIs)
Miscellaneous VIs
StopBg.VI
Changed R5.4 ID
Stops any background operation that is in progress for the specified board. This VI can be used to stop any VI
that is running in the background. It should always be called after any background operation, even when the
operation terminates normally.
Rev. 5.4: Added
Function
Type
input.
Summary:
Input:
Context
[cluster] - Input data structure from a background operation.
Function
Type
[I32] - Specifies the type of background operation to stop.
Output:
Data
[U16] - Output array extracted from
Context.
ErrorCode
[I32] - Error code. See ErrMsg.VI.
Arguments:
Context
Data structure describing a background operation. It is generated by scan VIs such
as AInScFg.VI or AInScBg.VI, and has to be wired to the corresponding
GetStatus.VI's input, which in turn passes it to StopBg.VI.
Follow the steps below when wiring this VI:
1.
Start a background operation.
2.
GetStatus.VI checks for completion (boolean output called "Running").
3.
StopBg.VI terminates the operation, if not already done, and frees memory aliases.
4.
Data output from the background operation is passed to GetStatus.VI and StopBg.VI
via Context, and can be wired from one or both of them for intermediate or final
actions, respectively.
The demo VIs illustrate this process effectively.
Function
Type
Specifies the background operation to stop.. The following are valid Function
Types:
AI FUNCTION: Stop background operation that started with AInScBg.VI or
APretrBg.VI.
AO FUNCTION: Stop background operation that started with AOutScBg.VI.
DI FUNCTION: Stop background operation that started with DInScBg.VI .
DO FUNCTION: Stop background operation that started with DOutScBg.VI
CTR FUNCTION: Stop background operation that started with CStore.VI
Data
Data structure containing information from a background operation. Some of the
information included is the board number, the data array, the array size, and the
initial status of the background operation.
ErrCode
Error code returned from the Universal Library. Zero if no error occurred. Use the
ErrMsg VI to convert
ErrCod
e into a readable string.
106