Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Keithley_6514.cpp 14.67 KiB
// ============================================================================
//
// = CONTEXT
//    TANGO Project - SCPI KeithleyElectrometer Support Library
//
// = FILENAME
//    Keithley_6514.cpp
//
// = AUTHOR
//    X. Elattaoui
//
// ============================================================================

// ============================================================================
// DEPENDENCIES
// ============================================================================
#include <iostream>
#include <sstream>
#include <string>
#include <math.h>   //- for ceil
#include <Xstring.h>
#include <tango.h>  //- Tango exceptions
#include "Keithley_6514.h"
#include "KeithleySCPIProtocol.h"
/*
* Valid Range values for a K_6514
*/
static const std::string K6514_AMP_rangeStr[] = {"2E-11","2E-10","2E-9","2E-8","2E-7","2E-6","2E-5","2E-4","2E-3","2E-2"};
static const std::string K6514_VOLT_rangeStr[]= {"2","20","200"};
static const std::string K6514_OHM_rangeStr[] = {"2E3","2E4","2E5","2E6","2E7","2E8","2E9","2E10","2E11"};
static const std::string K6514_COU_rangeStr[] = {"2E-8","2E-7","2E-6","2E-5"};
/*
* Max Index Range value for a K_6514
*/
static const short K6514_AMP_rangeLimit = 9;
static const short K6514_VOLT_rangeLimit= 2;
static const short K6514_OHM_rangeLimit = 8;
static const short K6514_COU_rangeLimit = 3;

/*
* Trigger Mode limit (millisec)
*/
static const int K6514_conversionRate = 175;

// ============================================================================
// Keithley_6514::Keithley_6514
// ============================================================================
Keithley_6514::Keithley_6514 (std::string& comLink_device_name)
:    AbstractElectrometerClass(comLink_device_name),
    _kmode("")
{
	std::cout << "Keithley_6514::Keithley_6514 <-" << std::endl;

  _numPLC     = 0;
  _trigCounts = 0;
  _size       = 0;

	std::cout << "Keithley_6514::Keithley_6514 ->" << std::endl;
}

// ============================================================================
// Keithley_6514::~Keithley_6514
// ============================================================================
Keithley_6514::~Keithley_6514 (void)
{
	std::cout << "Keithley_6514::~Keithley_6514 <-" << std::endl;

	std::cout << "Keithley_6514::~Keithley_6514 ->" << std::endl;
}