VXI user manual VM4016 Programming

Page 45

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 voltage-range.

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

Image 45
Contents VM4016 Page Table of Contents VXI Technology, Inc Limitation of Warranty WarrantyCertification Restricted Rights LegendEMC C L a R a T I O N O F C O N F O R M I T YTerms and Symbols General Safety InstructionsThis product. Product should be inspected or serviced Support Resources VXI Technology, Inc VM4016 Preface Introduction IntroductionFront Panel Layout DescriptionVM4016 Block Diagram IRQ Output VM4016 General SpecificationsInstallation Calculating System Power and Cooling RequirementsPreparation for USE Setting the Chassis Backplane Jumpers Setting the Logical AddressFront Panel Interface Wiring Analog Comparator PIN Outs Signal PIN Number1631 Programming Examples of Scpi Commands FETCHCONDITIONED?FETCHLATCHED? FETCHRAW? Inhousepseudo Inhouseregint InhouseregintInhouseregenable Inhouseclearlatch Examples InputdebounceINPMASK? InputmaskInputmaskinterrupt INPutMASKINTerrupt boolean Where boolean is 0 OFF 1 onINPOFFS? InputoffsetINPutPOLarity NORM,@35 InputpolarityInputrange Outputpolarityexternalinterrupt Outputpolarityexternallatched Example Application ExamplesSingle Channel Operation Commands DescriptionControl Page Sets the external interrupt output to be active high Bracketing a VoltageBracketing AN Input Voltage Page Register MAP Register Access ExamplesFor example Pseudo Register Access VXIPLUG&PLAY Driver Examples VM4016 Programming VXI Technology, Inc Alphabetical Command Listing Command DictionaryIeee 488.2 Common Commands Normal Instrument Specific Scpi CommandsScpi Required Commands Query Parameters Command DictionaryCLS Common Scpi CommandsResponse Description ESEESR? IDN? Query Parameters Query Response Description OPCRST SRE STB? TRG TST? OPC WAIFETChCONDitioned? Instrument Specific Scpi CommandsFETChLATChed? FETChRAW? Inhouseclearlatch Inhousepseudo Inhouseregint Inhouseregenable INPutDEBounce INPutMASK INPutMASKINTerrupt INPutOFFSet INPutPOLarity INPutRANGe OUTPutPOLarityEXTernalINTerrupt OUTPutPOLarityEXTernalLATChed STATusOPERationCONDition? Required Scpi CommandsSTATusOPERationENABle STATusOPERationEVENt? STATusPRESet STATusQUEStionableCONDition? STATusQUEStionableENABle STATusQUEStionableEVENt SYSTemERRor? SYSTemVERSion? Theory of Operation Input Range Control Relay Signal Comparison Interrupt Generation Interrupt Generation OUTPutPOLarityEXTernalLATChed Index