FP_Read

FieldPoint LabWindows/CVI Interface

FP_Read

IAStatus FP_Read (IAHandle serverHandle, IAHandle IOPointHandle,IAByte buffer[], unsigned long bufferSize, SYSTEMTIME *timestamp);

Purpose

This function reads the value of the I/O point specified by the I/O point handle. This is a synchronous read.

Note  The recommended method of monitoring an I/O point is to schedule an advise on an I/O point, pass NULL for the function pointer, and use a timer on the UIR to periodically read the cache on the I/O point. When you use NULL for the callbackFunction pointer, your program ignores callbackMethod.

Parameter List

Name Type Description
serverHandle IAHandle Handle to a specific server session. Create the handle with FP_Open.
IOPointHandle IAHandle Used to refer to an I/O point. You can create the handle with FP_CreateTagIOPoint.
buffer IAByte[ ] Memory that you allocate. The server copies data into this buffer.
bufferSize unsigned long Size of the buffer that you created for the read operation. The buffer size should indicate the length (in bytes) of allocated memory pointed to by the buffer pointer.
timestamp SYSTEMTIME (passed by reference) Time when the FieldPoint server read the value. The timestamp is returned in the Windows SYSTEMTIME format.

Return Value

The LabWindows/CVI manager or the server can return the following status codes. FP_ErrorMsg converts the status codes into descriptive strings.

LabWindows/CVI Manager-Level Error Codes 0x8480 IA_MGR_ERROR
0x8484 IA_MGR_SERVER_NOT_LOADED
0x8487 IA_MGR_INVALID_SERVER_HND
FieldPoint Server-Level Standard Error Codes 0x8000 to 0x83FF

Refer to the error section in your server help file for more information.