Appendix B - Emant300 Class Reference

Similar documents
Interfacing Analog to Digital Data Converters

DAC Digital To Analog Converter

I2C PRESSURE MONITORING THROUGH USB PROTOCOL.

Chapter 6: From Digital-to-Analog and Back Again

Building a Simulink model for real-time analysis V Copyright g.tec medical engineering GmbH

AVR127: Understanding ADC Parameters. Introduction. Features. Atmel 8-bit and 32-bit Microcontrollers APPLICATION NOTE

Timer A (0 and 1) and PWM EE3376

PCM Encoding and Decoding:

Measuring Temperature withthermistors a Tutorial David Potter


PowerBox PBX 180. Installation and Users Guide

How To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player

Transmitter Interface Program

LC 2 MOS Signal Conditioning ADC with RTD Excitation Currents AD7711

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

DMX-K-DRV. Integrated Step Motor Driver + (Basic Controller) Manual

ECONseries Low Cost USB DAQ

AN4646 Application note

DS1621 Digital Thermometer and Thermostat

Digital to Analog and Analog to Digital Conversion

Carlo Canziani Business Development EMEA Agilent Technologies

The Autolab control command is located in the Measurement General group of commands.

WEA-Base. User manual for load cell transmitters. UK WEA-Base User manual for load cell transmitters Version 3.2 UK

CPU ARM926EJ-S, 200MHz. Fast Ethernet 10/100 Mbps port. 6 digital input 2 digital open-drain alarm output

Application Report. 1 Introduction. 2 Resolution of an A-D Converter. 2.1 Signal-to-Noise Ratio (SNR) Harman Grewal... ABSTRACT

MANUAL FOR RX700 LR and NR

Work with Arduino Hardware

DS1621 Digital Thermometer and Thermostat

Diode Applications. As we have already seen the diode can act as a switch Forward biased or reverse biased - On or Off.

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version ( )

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT BIT DIFFERENTIAL ADC WITH I2C LTC2485 DESCRIPTION

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

AVR Timer/Counter. Prof Prabhat Ranjan DA-IICT, Gandhinagar

24-Bit Analog-to-Digital Converter (ADC) for Weigh Scales FEATURES S8550 VFB. Analog Supply Regulator. Input MUX. 24-bit Σ ADC. PGA Gain = 32, 64, 128

Part 1. MAX BIT DAC with an Arduino Board. MIDI to Voltage Converter Part1

Conversion Between Analog and Digital Signals

Tire pressure monitoring

CS bit ADC with Ultra-low-noise Amplifier

PDA Software Manual For the Windows CE and Mobile Operating Systems

ADS9850 Signal Generator Module

Analog Signal Conditioning

24-Bit ANALOG-TO-DIGITAL CONVERTER

Pressure Transducer to ADC Application

OPENUPS. 6-30V Intelligent Uninterruptible Power Supply. Installation Guide. Version 1.0f P/N OPENUPS-06

PROGRAMMABLE ANALOG INTEGRATED CIRCUIT FOR USE IN REMOTELY OPERATED LABORATORIES

FREQUENCY RESPONSE ANALYZERS

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

MH - Gesellschaft für Hardware/Software mbh

INSTRUMENTATION AND CONTROL TUTORIAL 3 SIGNAL PROCESSORS AND RECEIVERS

AND9035/D. BELASIGNA 250 and 300 for Low-Bandwidth Applications APPLICATION NOTE

Designing the Solution for Electrochemistry Potentiostat/Galvanostat І Battery Cycler І Fuel Cell Test Station І

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

DS1104 R&D Controller Board

Flexible Counter Series in DIN size 24 x 48 mm

PLAS: Analog memory ASIC Conceptual design & development status

Buffer Op Amp to ADC Circuit Collection

AlazarTech SDK Programmer s Guide. Version May 28, 2010

Software User Guide UG-461

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of

Atmel MSL3040/41/50/60/80/86/87/88 Programmers Guide

Lab Experiment 1: The LPC 2148 Education Board

Microcontroller to Sensor Interfacing Techniques

EVAL-UFDC-1/UFDC-1M-16

EcgSoft. Software Developer s Guide to RestEcg. Innovative ECG Software info@ecg-soft.com

Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs

Op Amp Circuit Collection

Digital and Analog I/O

AN3998 Application note

HDMM01 V1.0. Dual-axis Magnetic Sensor Module With I 2 C Interface FEATURES. Signal Path X

User and installation manual

THERMAL ANEMOMETRY ELECTRONICS, SOFTWARE AND ACCESSORIES

Atmel Norway XMEGA Introduction

Product Information S N O. Portable VIP protection CCTV & Alarm System 2

Pulse Width Modulation

The goal is to program the PLC and HMI to count with the following behaviors:

Radio sensor powered by a mini solar cell the EnOcean STM 110 now functions with even less light

DAQlink III System 24 bit Acquisition System

EMC6D103S. Fan Control Device with High Frequency PWM Support and Hardware Monitoring Features PRODUCT FEATURES ORDER NUMBERS: Data Brief

isppac-powr1220at8 I 2 C Hardware Verification Utility User s Guide

10-Bit Digital Temperature Sensor (AD7416) and Four/Single-Channel ADC (AD7417/AD7418) AD7416/AD7417/AD7418

DATENBLATT USB-DIO32HS USB-DIO32HS-OEM. HABEN SIE FRAGEN ODER WÜNSCHEN SIE EIN INDIVIDUELLES ANGEBOT? Unser Team berät Sie gerne persönlich.

Event counters in NOVA

A 0.18µm CMOS Low-Power Charge-Integration DPS for X-Ray Imaging

Febex Data Acquisition System

Content Map For Career & Technology

Instruction book IQAN-MDM menu system

Preliminary Datasheet

CEBO Programming Reference

PCAN-MicroMod Evaluation Test and Development Environment for the PCAN-MicroMod. User Manual. Document version ( )

Allen-Bradley/Rockwell

FUNCTIONAL BLOCK DIAGRAM AV DD DV DD DGND REFIN1(+) REFIN1( ) AD7190 Σ- ADC PGA TEMP SENSOR CLOCK CIRCUITRY MCLK1 MCLK2 P0/REFIN2( ) P1/REFIN2(+)

Talon and Talon SR User Manual

MOTION COORDINATOR MC206X Quick Connection Guide

DS2187 Receive Line Interface

PicoScope 5000 Series (A API)

RFSPACE CLOUD-IQ #CONNECTED SOFTWARE DEFINED RADIO

Product Name LED Panel light Product Models

AVR131: Using the AVR s High-speed PWM. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

"($!$* =3 5.# 19 = 77##.# A "#$%!&#$'$()(!* "!$& %$!$*%!&& +", !"#$$"!"" %&!'""$&(&! )*""! %$"'""+,($" -. *""!

Transcription:

Appendix B - Emant300 Class Reference Represents the EMANT300, a low cost USB data acquisition module from EMANT PTE LTD. The USB DAQ Module measures analog input voltages, output analog current and perform digital input and outputs, PWM or Counter functions. The following example reads in the analog voltage connected to Analog Input 0 and the Common Analog Input. Imports Emant Module Module1 Sub Main() Dim volt As Double Dim DAQ As Emant300 = New Emant300 DAQ.Open() volt = DAQ.ReadAnalog(Emant300.AIN.AIN0, Emant300.AIN.COM) Console.WriteLine(volt) DAQ.Close() End Sub Requirements Namespace: Emant Assembly: Emant300.dll, CommBase.dll, Sim300.dll, EmantUtil.dll 1 2005, 2006 Emant Pte Ltd www.emant.com

List of Emant300 Constructor Initializes a new instance of the Emant300 class. public Emant300(); Creates an instance called DAQ Dim DAQ As Emant300 = New Emant300 Emant300.Simulation Property Gets or sets the boolean to determine to use the hardware or simulator. Must set Simulation before calling Open method. public boolean Simulation {get; set;} Property Value true to connect to simulator, false to connect to hardware. Default is false. Use simulator Dim DAQ As Emant300 = New Emant300 DAQ.Simulation = True DAQ.Open() Emant300.HwId Property Gets the Hardware Identity of the Emant300 DAQ module connected. The string gives the model and firmware version public string HwId {get;} Property Value If the following string is returned, Emant300 000001, it indicates that the firmware version is 000001. Emant300.CommPort Property Gets the virtual Comm Port, the Emant300 DAQ module is connected to. public string CommPort {get;} Property Value If the module is connected to the virtual serial comm port 2, then COM2 is returned. This information is useful when you need to connect several Emant300 to the same computer. 2 2005, 2006 Emant Pte Ltd www.emant.com

Emant300.Open Method Opens the connection to the Emant300. public boolean Open(); Returns true if DAQ module is found. Finds and opens the connection to the DAQ module. DAQ.Open() Emant300.Open Method (bool, string) Opens the connection to the Emant300. public boolean Open( bool find, string port); Port The virtual serial comm. Port the Emant300 is connected to. Returns true if DAQ module is found. Do not find but open the DAQ module that is connected to COM2. Use this to connect to several Emant300 to the same computer. DAQ.Open(false, COM2 ) If find is true, it will find the Emant300 connected with the lowest Virtual Comm Port Number. Emant300.Close Method Close the Emant300 connection. IMPORTANT - the Close method must be called before the program exits if Open was successful. public void Close(); DAQ.Close() Emant300.Reset Method Reset the Emant300. public void Reset(); 3 2005, 2006 Emant Pte Ltd www.emant.com

Emant300.ConfigDIO Method (Int32) Sets the 8 bits of the DIO indicating the bit should be configured as input or output. Must set configuration before calling Open method public Boolean ConfigDIO(Int32 Value) Value 0 to set bit as output and 1 to set bit as input. True if configuration is successful otherwise false. The light application adaptor has bit 0-2 as outputs and bit 3 as input. Emant3001.ConfigDIO(&H08) Emant300.ConfigPWMCounter Method (Emant300.PWMORCNT, Emant300.EVENTORTIMED, Int32, Int32) Configures the PWM or Counter public Boolean ConfigPWMCounter (Emant300.PWMORCNT PWMOrCnt, Emant300.EVENTORTIMED EventOrTimed, Int32 MSInt, Int32 SetCount) PWMOrCnt Specify if PWM or Counter in operation. EventOrTimed Specify if Counter is Timed or Event Counting. MSInt For Timed Counting, specifies the period in msec to count pulses. SetCount For Event Counting, used to clear or set count to specific start value. True if configuration is successful otherwise false. Strain gauges connected in the bridge configuration have very low output voltage. The following line configures the analog input range to -0.01 to 0.01 and sampling rate to 10Hz Emant3001.ConfigAnalog(0.01,Emant.Emant300.POLARITY.Bipolar, 10) Emant300.ConfigAnalog Method (Double, Emant300.POLARITY,Int32) Configures the Analog Input for Input Range, Polarity and Sampling Rate public Boolean ConfigAnalog(Double InputLimit, Emant300.POLARITY Polarity, Int32 SampleFreq ) InputLimit The input range of the input signal. Polarity Specify if input signal is unipolar or bipolar. SampleFreq Sampling frequency. The default is 100 samples/sec. True if configuration is successful otherwise false. For Strain gauges, set analog input range to -0.01 to 0.01 and sampling rate to 10Hz Emant3001.ConfigAnalog(0.01,Emant.Emant300.POLARITY.Bipolar, 10) 4 2005, 2006 Emant Pte Ltd www.emant.com

Emant300.ConfigAnalogAdvance Method (Emant300.POLARITY, Emant300.FILTER, Emant300.CALIBRATION, Boolean, Emant300.REF, Emant300.VREF, Boolean, Emant300.PGA, Int32, Int32, Int32) Configures the Analog Input - for advanced users public Boolean ConfigAnalogAdvance (Emant300.POLARITY Polarity, Emant300.FILTER Filter, Emant300.CALIBRATION Calibration, Boolean BOD,Emant300.REF Reference, Emant300.VREF VRef, Boolean Buffer, Emant300.PGA Gain, Int32 ACLK, Int32 Decimation, Int32 ODAC) Polarity Specify if input signal is unipolar or bipolar. Filter Set ADC Filter. Calibration Set ADC Calibration. BOD When the Burnout Detect is set, two current sources are enabled. The current source on the positive input channel sources approximately 2µA of current. The current source on the negative input channel sinks approximately 2µA. This allows for the detection of an open circuit (full-scale reading) or short circuit (small differential reading) on the selected input differential pair. Enabling the buffer is recommended when BOD is enabled. Set true to enable and false to disable Reference Specify internal or external reference. VRef Set the internal reference to either 1.25V or 2.5V Buffer Set true to enable input Buffer Amplifer, false to disable buffer. Gain Set PGA gain. ACLK Analog clock frequency Decimation Decimation Ratio ODAC The analog output from the PGA can be offset by up to half the full-scale input range of the PGA by using the ODAC register. The ODAC (Offset DAC) register is an 8-bit value; the MSB is the sign and the seven LSBs provide the magnitude of the offset. The data rate for the ADC is determined by ACLK and Decimation Ratio. First, the ACLK register divides the system clock; that value is then divided by 64 to give us the modulation clock. The data output rate is determined by the Decimation Ratio. The eleven bits in the decimation ratio divide the modulation clock to calculate the data output rate. 22118400 Data Rate= ACLK 1 64 Decimation True if configuration is successful otherwise false. 5 2005, 2006 Emant Pte Ltd www.emant.com

Emant300.ReadAnalog Method (Emant300.AIN, Emant300.AIN) Measures the analog voltage of any two of the six plus one common analog inputs of the DAQ module. Measures the internal temperature sensing diode voltage if both inputs set to DIODE. public double ReadAnalog( Emant300.AIN PositiveInput, Emant300.AIN NegativeInput); PositiveInput The positive analog input channel. NegativeInput The negative analog input channel. The value of the voltage read. Measure voltage difference between analog input channel 0 and analog input common. Dim volt As Double volt = DAQ.ReadAnalog(Emant300.AIN.AIN0,Emant300.AIN.COM) Emant300.ReadAnalogWaveform Method (Emant300.AIN, Emant300.AIN, Int32) Measures the waveform of any two of the six plus one common analog inputs of the DAQ module. Measures the internal temperature sensing diode voltage if both inputs set to DIODE. public double[] ReadAnalogWaveform ( Emant300.AIN PositiveInput, Emant300.AIN NegativeInput, Int32 NumberOfSamples ) PositiveInput The positive analog input channel. NegativeInput The negative analog input channel. NumberOfSamples Specify the number of samples The waveform read. Measure a 300 point waveform of the voltage difference between analog input channel 0 and analog input common. Dim mywave(300) As Double mywave = emant3001.readanalogwaveform(emant300.ain.ain3,emant300.ain.com,300) Emant300.WriteAnalog Method (double) Set the analog output current of the DAQ module. public void WriteAnalog(double ma) ma The analog current value to be output (0 to 1mA). Set Analog Output Current to 0.1 ma DAQ.WriteAnalog(0.1) 6 2005, 2006 Emant Pte Ltd www.emant.com

Emant300.ReadDigitalBit (Int) Reads in the state of the Digital Input of the DAQ module. public boolean ReadDigital(int32 channel) channel The digital channel to read. The return bool represents the state of the digital input. Read the state of the digital bit 4. Dim swstate as Boolean swstate = DAQ.ReadDigitalBit(4) Emant300.ReadDigitalPort Reads in the state of the Digital Input of the DAQ module. public int32 ReadDigital() The return int32 represents the 8 bits of the digital port. Emant300.WriteDigitalBit Method (int, bool) Set state of the Digital Ouput of the DAQ module. Does not affect bits configured as Digital Inputs. public boolean WriteDigital(int32 channel, boolean DAQDO) channel The digital channel to set. DAQDO The state to be set. Set the output of bit 0 of the DIO to high. DAQ.WriteDigitalBit(0, True) Emant300.WriteDigitalPort Method (int) Set state of the Digital Ouput of the DAQ module. Does not affect bits configured as Digital Inputs. public boolean WriteDigitalPort(int32 value) value 8 bit value of the output. 7 2005, 2006 Emant Pte Ltd www.emant.com

Emant300.ReadCounter (out Double) Reads the counter value. public Int32 ReadCounter(out Double Period) The return int32 represents the count. Period returns the period if counter is configured for Timed Counting Read the count and period of the input digital waveform. Dim Period, temp As Double temp = Emant3001.ReadCounter(out Period); Emant300.WritePWM (Double, Double) Reads the counter value. public Boolean WritePWM (Double Period, Double DutyCycle ) Period Period of the PWM in us (100 to 35000). DutyCycle The duty cycle (0 to 100%). Set up a 10ms period (100 Hz), 40% duty cycle PWM. Emant3001.WritePWM(10000, 40); 8 2005, 2006 Emant Pte Ltd www.emant.com

Emant300.AIN Enumeration Specifies the inputs of the ReadAnalog method. AIN0 AIN0 Analog Input 0 AIN1 AIN1 Analog Input 1 AIN2 AIN2 Analog Input 2 AIN3 AIN3 Analog Input 3 AIN4 AIN4 Analog Input 4 AIN5 AIN5 Analog Input 5 COM DIODE AINCOM Common Analog Input DIODE Temperature Sensing Diode Emant300.VREF Enumeration Specifies the internal reference voltage. V2_5 Sets internal reference voltage to 2.5V V1_5 Sets internal reference voltage to 1.5V Emant300.POLARITY Enumeration Specifies the polarity of the input voltage. Unipolar Bipolar The input voltage range is unipolar (example 0 to 2.5V) The input voltage range is bipolar (example -2.5V to 2.5V) 9 2005, 2006 Emant Pte Ltd www.emant.com

Emant300.FILTER Enumeration At the ouput of the ADC is a Digital Filter. The Digital Filter can use either the Fast Settling, Sinc2, or Sinc3 filter. In addition, the Auto mode changes the Sinc filter after the input channel or PGA changed. When switching to a new channel, it will use the Fast Settling filter. It will then use the Sinc2 followed by the Sinc3 filter to improve noise performance. Auto Fast_Settling Sinc_2 Sinc_3 Auto mode Fast Settling Sinc2 Sinc3 Emant300.CALIBRATION Enumeration The offset and gain errors in Emant300, or the complete system, can be reduced with calibration. Each calibration process takes seven acquisition clock cycles to complete. Therefore, it takes 14 clock cycles to complete both an offset and gain calibration.. No_Cal Self_Cal_Offset_Gain Self_Cal_Offset Self_Cal_Gain Sys_Cal_Offset Sys_Cal_Gain No Calibration Self Calibrate Offset and Gain Self Calibrate Offset Only Self Calibrate Gain Only System Calibrate Offset Only System Calibrate Gain Only Emant300.REF Enumeration The Emant300 can use either an internal or external voltage reference. Internal External Internal voltage reference External voltage reference 10 2005, 2006 Emant Pte Ltd www.emant.com

Emant300.PGA Enumeration Specifies the gain of the Programmable Gain Amplifier. G1 Sets Gain to 1 G2 Sets Gain to 2 G4 Sets Gain to 4 G8 Sets Gain to 8 G16 Sets Gain to 16 G32 Sets Gain to 32 G64 Sets Gain to 64 G128 Sets Gain to 128 Emant300.PWMORCNT Enumeration Use the Counter or the PWM. Count PWM Use Counter Use PWM Emant300.EVENTORTIMED Enumeration The Counter can be configured to either measure frequency/period of a digital waveform or count events. Timed Event Measure Frequency / Period Count Events 11 2005, 2006 Emant Pte Ltd www.emant.com