long we_ReadBack( | |
long Handle, | //handle returned by we_OpenCard |
long Port, | //identifies the port from which the value will be read back |
long *Value | //receives the value which is read back from the port |
); |
The we_ReadBack function may be used with the output ports on an I/O card. The function reads back the last value that was written to an output port.
Handle: |
|
Port: |
|
Value: |
|
If the value was successfully read back, the function will return 0 to indicate success and the variable pointed to by Value will be loaded with the value that was read back. If an error occurs, a negative error code will be returned. Errors that may be returned include:
This function actually reads the current state of an output port from the I/O card itself. By using this function, you can essentially recall the last value that was written to a particular port.
This function must be used with a port that is configured for output. If you fail to configure the port for output, 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 back. If this happens, the value of Value will be undefined.
we_OpenCard, we_ConfigureCard, we_OutputValue
Copyright 2004 Winford Engineering.