Skip to content
Snippets Groups Projects
KeithleySCPIProtocol.cpp 34.8 KiB
Newer Older
LE's avatar
LE committed

	_communication_link->write(cmd_to_send);

}

// ============================================================================
// KeithleySCPIProtocol::disable_SRQBufferFull()
// ============================================================================
void KeithleySCPIProtocol::disable_SRQBufferFull (void) 
{
std::string cmd_to_send("STAT:MEAS?");

	//- send command : disable buffer full event
	_communication_link->write_read(cmd_to_send);

  //- Disable the service request enable register
  cmd_to_send = "*SRE 0";
	_communication_link->write(cmd_to_send);

}

// ============================================================================
ELATTAOUI's avatar
ELATTAOUI committed
// KeithleySCPIProtocol::SRQLineState()
LE's avatar
LE committed
// ============================================================================
ELATTAOUI's avatar
ELATTAOUI committed
bool KeithleySCPIProtocol::SRQLineState (void) 
LE's avatar
LE committed
{
ELATTAOUI's avatar
ELATTAOUI committed
	//- if asserted -> the programmed event occurs : the device can be asked !
ELATTAOUI's avatar
ELATTAOUI committed
	return _communication_link->SRQLineState();

  //- Cf Keithley doc to know how the to get the wanted event 
  //-   Chapter : Status Structure
}

// ============================================================================
// KeithleySCPIProtocol::readStatusByteRegister()
// ============================================================================
short KeithleySCPIProtocol::readStatusByteRegister (void) 
{
	//- if SRQ line UP -> the programmed event(s) occurs : the value is available !
	return _communication_link->readStatusByteRegister();
LE's avatar
LE committed

  //- Cf Keithley doc to know how the to get the wanted event 
  //-   Chapter : Status Structure
}

ELATTAOUI's avatar
ELATTAOUI committed
// ============================================================================
// KeithleySCPIProtocol::read_data_with_no_timestamp
// ============================================================================
void KeithleySCPIProtocol::read_data_with_no_timestamp (void) 
{
std::stringstream cmd_to_send;

		cmd_to_send << "FORM:ELEM READ" << std::endl;
		_communication_link->write(cmd_to_send.str());
}


LE's avatar
LE committed



// Following functions are part of commands supported via the SCPI protocol. 
// We may have to implement them after first tests on beamlines

/*
// ============================================================================
// KeithleySCPIProtocol::setExternalFeedbackMeterMode
// ============================================================================
void KeithleySCPIProtocol::setExternalFeedbackMeterMode (void) 
{
std::stringstream cmd_to_send;

		cmd_to_send << "F4X" << std::endl;
		_communication_link->write(cmd_to_send());

}

// ============================================================================
// KeithleySCPIProtocol::setVonIMeterMode
// ============================================================================
void KeithleySCPIProtocol::setVonIMeterMode (void) 
{
std::stringstream cmd_to_send;

	//- send command
	try
	{
		cmd_to_send << "F5X" << std::endl;
		_communication_link->write(cmd_to_send.str());
	}
	catch(Tango::DevFailed& df)
	{
		Tango::Except::re_throw_exception (df,
										(const char*)"COMMUNICATION_ERROR",
										(const char*)"Unable to perform a write operation",
										(const char*)"KeithleySCPIProtocol::setVonIMeterMode");
	}
	catch(...)
	{
		throw ;
	}

}
*/

/* TO BE IMPLEMENTED !!!!! 

// ============================================================================
// KeithleySCPIProtocol::reading_source
// ============================================================================
void KeithleySCPIProtocol::reading_source (void) 
{

}

// ============================================================================
// KeithleySCPIProtocol::reading_source
// ============================================================================
void KeithleySCPIProtocol::data_store (void) 
{

}

// ============================================================================
// KeithleySCPIProtocol::reading_source
// ============================================================================
void KeithleySCPIProtocol::data_format (void) 
{

}

// ============================================================================
// KeithleySCPIProtocol::reading_source
// ============================================================================
void KeithleySCPIProtocol::baseline_suppression_ON (void) 
{

}

// ============================================================================
// KeithleySCPIProtocol::reading_source
// ============================================================================
void KeithleySCPIProtocol::baseline_suppression_OFF (void) 
{

}
// ============================================================================
// KeithleySCPIProtocol::reading_source
// ============================================================================
void KeithleySCPIProtocol::keithley_status (void) 
{

}
*/