www.vxitech.com
ViPInt16 first_latched_reg
-This parameter returns the first input channel which crosses the programmed threshold voltage.
ViPInt16 raw_data
-This returns the 16 bit value that represents the current unconditioned [raw] state of the inputs.
ViPInt16 conditioned_data
-This returns the 16 bit value that represents the current conditioned state of the inputs.
Return Values: | Returns VI_SUCCESS if successful, else returns error | |
| value. |
|
Description | This is an application function that shows how | the |
| user can use core functions to enable/disable the | |
| specified channels for interrupt generation and | |
| configure the specified channels’ various parameters | |
| such as offset, polarity and | It |
| returns the value of the First Latched register which | |
| records the first input channel to cross its threshold | |
| and queries the current state of the inputs. | Note |
that this function resets the module to its default state.
***************************************************************************/
ViStatus_VI_FUNC vtvm4016_setup_and_read_data(ViSession instr_hndl,
ViInt16 channel_list[],ViInt16 num_of_channels,ViReal32 offset[],ViInt16 polarity[],ViInt16 voltage_range[], ViPInt16 first_latched_reg,ViPInt16 raw_data,
ViPInt16 conditioned_data)
{
/* Variable used to store return status of the function */ ViStatus status = VI_NULL;
/* Reset to the default state */
status = vtvm4016_reset(instr_hndl);
if (status < VI_SUCCESS) return status;
/* Function to enable the selected channels to cause interrupt */ status = vtvm4016_enable_disable_channels (instr_hndl,
vtvm4016_ENABLE_CHANNEL, channel_list, num_of_channels); if (status < VI_SUCCESS)
return vtvm4016_ERROR_MASK_OR_UNMASK_CHANNELS;
VM4016 Programming | 45 |