long we_InputValue( | |
long Handle, | //handle returned by we_OpenCard |
long Port | //identifies the port that the value will be read from |
long *Value | //receives the value which is read |
); |
The we_InputValue function is used to read from an input port on an I/O card.
Handle: |
|
Port: |
|
Value: |
|
If the value was successfully read, the function will return 0 to indicate success and the variable pointed to by Value will be loaded with the value that was read. If an error occurs, a negative error code will be returned. Errors that may be returned include:
Be sure that you configure the port that you want to use to be an input port before using this function. The ports can be configured by using the we_ConfigureCard function. If you fail to configure the port for input, an error will be returned.
If the function fails and returns an error code, the variable pointed to by Value will not have any meaningful data in it because the port was never successfully read. If this happens, the value of Value will be undefined.
we_OpenCard, we_ConfigureCard, we_OutputValue
Copyright 2004 Winford Engineering.