we_InputValue

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
     );

Summary

The we_InputValue function is used to read from an input port on an I/O card.

Parameters

Handle:   
    Identifies the card to be read from.
Port:
    Identifies the port on the card that should read.
Value:
    Points to a variable which will receive the value read from the port.

Return Values

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:

More Information

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.

Related

we_OpenCard, we_ConfigureCard, we_OutputValue


Copyright 2004 Winford Engineering.