VXI Technology, Inc.
42
VM1548C Programming
ViBoolean
polarity
- This parameter is used to set the polarity of
the clock circuit associated with the specified port.
This parameter is considered only if the specified clock
source is either
vtvm1548_CLK_SOURCE_TTLT or
vtvm1548_CLK_SOURCE_GLOB.
Valid
Values:
Interpretation:
------------ --------------
vtvm1548_POL_NORM
Normal
Polarity
(0)
vtvm1548_POL_INVERT
Inverted
Polarity
(1)
ViPInt16
data
- This parameter returns the 8 bit data value that has been
read from the specified input port.
Return Values:
Returns VI_SUCCESS if successful.
Else
returns
error
value.
Description This function is an application function that shows how the user
can use core functions to set up the specified port as input. It triggers the
port to input the data and reads the same.
/********************************************************************/
ViStatus _VI_FUNC vtvm1548_setupAndReadData (ViSession instrHndl,
ViInt16
portNumber,
ViInt16
clkSource,
ViBoolean
polarity,
ViPInt16
data)
{
/*
* Variable used to store return status of the function.
*/
ViStatus status
= VI_NULL;
/*
* Setup the specified port as input and configure the clock
* associated with it.
*/
status = vtvm1548_configPort (instrHndl,portNumber,
vtvm1548_MODE_INPUT,
vtvm1548_CLK_MODE_IN,
clkSource,
polarity);