Chapter 4
Programming
NI PXIe-5450 User Manual
4-22
ni.com
LabVIEW Example
LabVIEW users can read the error description by creating an error indicator
from one of the NI-FGEN VIs as shown in the following figure.
C Example
void ErrorBox() {
ViUInt32 errMsgSize;
ViChar* errMsg;
if(error <0) {
errMsgSize = niFgen_GetError(vi, VI_NULL, 0, VI_NULL);
errMsg = (ViChar *) malloc(sizeof(ViChar) * errMsgSize);
niFgen_GetError(vi, &error, errMsgSize, errMsg);
ResetTextBox(fgenPanel, FGEN_PANEL_ERROR_MESSAGE,
errMsg);
free(errMsg);
}