Function ziAPIGetDIOSample#

ZIResult_enum ziAPIGetDIOSample(ZIConnection conn, const char *path, ZIDIOSample *value)#

Gets the Digital I/O sample of the specified node.

This function retrieves the newest available DIO sample from the specified node. The value first found is returned if more than one value is available (a wildcard is used in the path). This function is only applicable to nodes ending in “/DIOS/[0-9]+/INPUT”.

  • conn[in] Pointer to the ZIConnection with which the value should be retrieved

  • path[in] Path to the node holding the value

  • value[out] Pointer to a ZIDIOSample struct in which the value should be written


  • ZI_INFO_SUCCESS on success

  • ZI_ERROR_CONNECTION when the connection is invalid (not connected) or when a communication error occurred

  • ZI_ERROR_LENGTH if the Path’s Length exceeds MAX_PATH_LEN or the length of the char-buffer for the nodes given by MaxLen is too small for all elements

  • ZI_ERROR_COMMAND on an incorrect answer of the server

  • ZI_ERROR_SERVER_INTERNAL if an internal error occurred in the Data Server

  • ZI_WARNING_NOTFOUND if the given path could not be resolved or no value is attached to the node

  • ZI_ERROR_TIMEOUT when communication timed out

  • Other return codes may also be returned, for a detailed error message use ziAPIGetLastError.