tti_CPX400* tti_device=new tti_CPX400(port);
int enable(int channel);
//enables output <channel>
int disable(int channel);
//disables output <channel>
int setStatus(int channel, bool on_off);
//set output <channel> on/off where <on_off> has the following meaning: 0=OFF, 1=ON
int setVoltage(int channel,double Voltage);
//Set output <channel> to <Voltage> Volts
int setOverVoltageProtection(int channel, double voltage);
//Set output <channel> over voltage protection trip point to <voltage> Volts
int setCurrent(int channel,double current);
// Set output <channel> current limit to <current> Amps
int setOverCurrentProtection(int channel,double current);
//Set output <channel> over current protection trip point to <current> Amps
int setDeltaVoltage(int channel,double voltage);
//Set the output <channel> voltage step size to <voltage> Volts
- It has the following methods to get values:
double getVoltage(int Channel);
/*Returns the set voltage of output <Channel> The response is Voltages in volt as double /
double getActualVoltage(int channel);
/*Returns the output readback voltage for output <channel> The response is voltage in volt as double*/
double getCurrent(int channel);
/*Returns the set current limit of output <channel> The response is current in Ampere as double */
double getActualCurrent(int channel);
/
double getOverVoltageProtection(int channel);
/*Returns the voltage trip setting for output <channel> The response is Voltage in volt as double */
double getOverCurrentProtection(int channel);
/*Returns the current trip setting for output <channel> The response current in amps as double */
bool getStatus(int channel);
/*Returns output <channel> on/off status. The response is status as bool where 1 (true) = ON, and 0 (false) = OFF. */
string getID(void);
/*Returns the instrument identification. The exact response is determined by the instrument configuration and is of the form <NAME>,<model>,<Serial No.>, <version><rmt> where <NAME> is the manufacturer's name, <model> defines the type of instrument, Serial No. is the unique serial number and <version> is the revision level of the software installed. The format of <version> is X.xx – Y.yy where X.xx is the revision of the main instrument firmware and Y.yy is the revision of the Interface board firmware. The Interface firmware is field updateable by the user via the USB port.*/
int getSerialNumber(void);
// returns the serial number of the device
string getSerialNumber_str(void);
// returns the serial number of the device as string
string getAddress(void);
/*Returns the bus address of the instrument; This is the address used by GPIB, if fitted, or may be used as a general identifier over the other interfaces.*/
- It emits the following signals:"ActualVoltageCh1(double)"
"ActualVoltageCh2(double)"
"ActualCurrentCh1(double)"
"ActualCurrentCh2(double)"
int main(int argc, char *argv)
{
tti_CPX400
receiver_class s3(); // creates an receiving class
s2->startThread(); // starts a thread that will emit the actual voltage and actual current
s2->setVoltage(0,5); // sets the voltage of both channels to 5V
s2->connect(SActualVoltageCh1,"reciever_class",%s3,"testSignal1(int)");
// using enumerated Signals is only possible in compiled code
// in ROOT use
//"s2->connect("ActualVoltageCh1(double)","reciever_class",%s3,"testSignal1(int)");"
for (int i =1;i<20;++i)
{
Sleep(5000);
s2->samplingTime =100*i; // changes the sampling rate in which the //thread emits the voltage and current it cannot be smaller than 1000 ms. The //sampling time is in milliseconds.
}
return 0;
}
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
![]() |
SCom_V1p1_ROOT_5-28.dll | r1 | manage | 134.5 K | 2012-09-21 - 11:02 | RichardPeschke | Serial communication class |
![]() |
SCom_V1p1_ROOT_5-28.lib | r1 | manage | 33.8 K | 2012-09-21 - 11:02 | RichardPeschke | Serial communication class |
![]() |
SCom_V1p1_ROOT_5-30.dll | r1 | manage | 134.0 K | 2012-09-21 - 11:02 | RichardPeschke | Serial communication class |
![]() |
SCom_V1p1_ROOT_5-30.lib | r1 | manage | 33.8 K | 2012-09-21 - 11:02 | RichardPeschke | Serial communication class |
![]() |
SCom_V1p1_ROOT_5-32.dll | r1 | manage | 134.5 K | 2012-09-21 - 11:02 | RichardPeschke | Serial communication class |
![]() |
SCom_V1p1_ROOT_5-32.lib | r1 | manage | 33.8 K | 2012-09-21 - 11:02 | RichardPeschke | Serial communication class |
![]() |
SCom_V1p1_ROOT_5-34.dll | r1 | manage | 134.5 K | 2012-09-21 - 11:02 | RichardPeschke | Serial communication class |
![]() |
SCom_V1p1_ROOT_5-34.lib | r1 | manage | 33.8 K | 2012-09-21 - 11:02 | RichardPeschke | Serial communication class |
![]() |
SerialCom.cpp | r1 | manage | 14.0 K | 2012-09-21 - 11:04 | RichardPeschke | |
![]() |
SerialCom.h | r1 | manage | 2.6 K | 2012-09-21 - 11:03 | RichardPeschke | source files |
![]() |
chiller_new.cpp | r1 | manage | 4.8 K | 2012-09-21 - 11:03 | RichardPeschke | source files |
![]() |
chiller_new.h | r1 | manage | 1.4 K | 2012-09-21 - 11:04 | RichardPeschke | |
![]() |
tti_new.cpp | r1 | manage | 18.5 K | 2012-09-21 - 11:03 | RichardPeschke | source files |
![]() |
tti_new.h | r1 | manage | 6.8 K | 2012-09-21 - 11:03 | RichardPeschke | source files |