1
package com.sun.electric.tool.simulation.test;
4
* Created by IntelliJ IDEA.
8
* To change this template use File | Settings | File Templates.
10
public class T2500 extends Equipment {
12
/** Creates a new instance of T2500 */
13
public T2500 (String name) {
15
logInit("Initialized T2500 Temperature Forcer named " + name);
19
* Queries the T2500 device to obtain the air flow temperature.
20
* @return Returns the current temperature of the air inside the thermal mixture, in Degrees Celsius
22
public float getAirTemp() {
24
String [] s = read(40).split(" ");
25
return Float.parseFloat(s[0]);
29
* Queries the T2500 device to obtain the device under test temperature.
30
* @return Returns the current temperatur of the device under test, in Degrees Celsius
32
public float getDeviceTemp() {
34
String [] s = read(40).split(" ");
35
return Float.parseFloat(s[0]);
39
* Queries the T2500 device to obtain the soak time.
40
* @return Returns the soak time (values from 0-9999 seconds)
42
public float getSoakTime() {
44
String [] s = read(40).split(" ");
45
return Float.parseFloat(s[0]);
49
* Queries the T2500 device to obtain the current setpoint.
50
* @return Returns the current setpoint (values from -99.9C to 230C)
52
public float getSetpoint() {
54
String [] s = read(40).split(" ");
55
return Float.parseFloat(s[0]);
59
* Queiries the T2500 for its current status.
60
* @return Returns the current state of the T2500 (values from 0 - 255)
62
public float getStatus() {
64
String [] s = read(40).split(" ");
65
return Float.parseFloat(s[0]);
69
* Queiries the T2500 for its current head position.
70
* @return Returns false if head is down, true if head is up.
72
public boolean getHeadState() {
74
String [] s = read(40).split(" ");
75
return Boolean.valueOf(s[0]).booleanValue();
80
* Brings the head of the T2500 down.
81
* @param state If true, head goes down, otherwise head comes up.
83
public void headDown(boolean state) {
84
if (state) {write("HEAD 0");}
85
else { write("HEAD 1"); }
89
* Queiries the T2500 for its current compressor state.
90
* @return Returns false if compressor off, true if compressor on.
92
public boolean getCompressorState() {
94
String [] s = read(40).split(" ");
95
return Boolean.valueOf(s[0]).booleanValue();
99
* Turn the compressor of the T2500 on or off.
100
* @param state If state is true, compressor will turn on, else compressor will turn off
102
public void setCompressorState(boolean state) {
103
if (state){ write("COMP 1"); }
104
else { write("COMP 0"); }
108
* Sets one of five available temperature presets for manual control.
109
* @param presetNum Preset Number, 1-5
110
* @param value Temperature, -99.9C to 230C
112
public void setTemp (int presetNum, float value){
113
write("TEMP" + presetNum + " " + value);
117
* Gets the specified temperature preset
118
* @param presetNum Preset Number, 1-5
119
* @return Returns the set temperature of the specified preset
121
public float getTemp (int presetNum){
122
write ("TEMP"+presetNum+"?");
123
String [] s = read(40).split(" ");
124
return Float.parseFloat(s[0]);
128
* Activates one of the temperature presets that has been already set up on the manual control screen or through GPIB.
129
* @param presetNum preset temperature number, 1-5
131
public void goTemp (int presetNum){
132
write("GOTEMP" + presetNum);
136
* Sets the soak time for one of the temperature presets
137
* @param presetNum Preset Number, 1-5
138
* @param soakTime Amount of time to soak device in set temperature, 0-9999 seconds
140
public void setSoakTime (int presetNum, float soakTime){
141
write("SOAK" + presetNum + " " + soakTime);
145
* Queries the T2500 for the soak time of supplied preset number
146
* @param presetNum Preset number, 1-5
147
* @return Returns soak time for supplied preset number
149
public float getSoakTime (int presetNum){
150
write ("SOAK"+presetNum+"?");
151
String [] s = read(40).split(" ");
152
return Float.parseFloat(s[0]);
156
* Turns the air and the heaters in the thermal mixutre off.
158
public void airOff (){
163
* Sets the type of cold air functioning of the cold-boost feaure
164
* @param level 0 = no boost, normal air functioning; 1 = Air, causing the cold air regulator to be bypassed,
165
* allowing un-regulated cold air to flow; 2 = LN2, activates use of liquid nitrogen if the option is installed
167
public void setBoost (int level){
168
write("BOOST "+level);
172
* This method returns the boost level
173
* @return 0 = no boost, normal air functioning; 1 = Air, causing the cold air regulator to be bypassed,
174
* allowing un-regulated cold air to flow; 2 = LN2, activates use of liquid nitrogen if the option is installed
176
public float getBoostLevel (){
178
String [] s = read(40).split(" ");
179
return Float.parseFloat(s[0]);
183
* Sets the flow rate of the cold air.
184
* @param value Valid values range from 100 - 999 SCFH (Cubic Feet per Hour at Standard Conditions)
186
public void setColdFlow (int value){
187
write("COLDFLOW "+value);
191
* Gets the flow rate of the cold air.
192
* @return Valid values range from 100 - 999 SCFH (Cubic Feet per Hour at Standard Conditions)
194
public float getColdFlow (){
196
String [] s = read(40).split(" ");
197
return Float.parseFloat(s[0]);
201
* Sets the flow rate of the hot air.
202
* @param value Valid values range from 100 - 999 SCFH (Cubic Feet per Hour at Standard Conditions)
204
public void setHotFlow (int value){
205
write("HOTFLOW "+value);
209
* Gets the flow rate of the hot air.
210
* @return Valid values range from 100 - 999 SCFH (Cubic Feet per Hour at Standard Conditions)
212
public float getHotFlow (){
214
String [] s = read(40).split(" ");
215
return Float.parseFloat(s[0]);
219
* Turns temperature ramping on or off. Must be on for value set by RAMPRATE to function.
220
* @param state if true, ramp = on, else ramp = off
222
public void setRampState (boolean state){
223
if (state) {write("RAMP 1");}
224
else { write("RAMP 0"); }
228
* @return Returns true if RAMP is enabled, false if RAMP is disabled
230
public boolean getRampState() {
232
String [] s = read(40).split(" ");
233
return Boolean.valueOf(s[0]).booleanValue();
238
* Determines ramprate, which is the number of degrees/minute the temperature setpoint will change when the ramp
239
* feature has been activated.
240
* @param value Value of ramp rate, from 0 - 999 degrees/minute
242
public void setRampRate (int value){
243
write("RAMPRATE "+value);
248
* @return Returns the currently set up ramp rate value.
250
public float getRampRate (){
252
String [] s = read(40).split(" ");
253
return Float.parseFloat(s[0]);
257
* Determines the type (mode) of termperature sensing
258
* @param value 0 = Fixture/air sense control; 1 = DUT sense control, K-type thermocouple; 2 = DUT sense control,
259
* T-type thermocouple; 3 = RTD sensor control
261
public void setTempSensing (int value){
262
write("TCONTROL "+value);
266
* Returns the type (mode) of temperature sensing
267
* @return value 0 = Fixture/air sense control; 1 = DUT sense control, K-type thermocouple; 2 = DUT sense control,
268
* T-type thermocouple; 3 = RTD sensor control
270
public float getTempSensingMode (){
272
String [] s = read(40).split(" ");
273
return Float.parseFloat(s[0]);
277
* Sets the temperature resolution window around the setpoint at which the system is considered to be at temperature.
278
* @param value temperature tolerance, 0.1 - 15.0 degrees
280
public void setTempTolerance (float value){
281
write("TEMPTOL "+value);
285
* Returns the current temperature resolution window
286
* @return Resolution, 0.1 - 15.0 degrees
288
public float getTempTol (){
290
String [] s = read(40).split(" ");
291
return Float.parseFloat(s[0]);
295
* Sets the minimum temperature of the cold air that the DUT is exposed to in DUT-sense
296
* @param value Valid values range from -99 - 30.9
298
public void setMinTemp (float value){
299
write("MINTEMP "+value);
303
* Returns the min temp of the cold air that the DUT is exposed to in DUT-sense
304
* @return Min temp, -99 to 30.9
306
public float getMinTemp (){
308
String [] s = read(40).split(" ");
309
return Float.parseFloat(s[0]);
313
* Sets the minimum temperature of the of the hot air that the DUT is exposed to in DUT-sense
314
* @param value Valid values range from 31.0 - 230.0
316
public void setMaxTemp (float value){
317
write("MAXTEMP "+value);
321
* Returns the max temp of the hot air that the DUT is exposed to in DUT-sense
322
* @return Max temp, 31.0 to 230.0
324
public float getMaxTemp (){
326
String [] s = read(40).split(" ");
327
return Float.parseFloat(s[0]);
330
public String test() {
335
public float getFlow() {
337
String [] s = read(40).split(" ");
338
return Float.parseFloat(s[0]);
341
public static void main(String[] args) {
342
int [] gpibController = new int[] {0};
343
Infrastructure.gpibControllers = gpibController;
345
T2500 DUT = new T2500("T2500");
352
/*DUT.setTemp(2, 23);
354
System.out.println("Air Temp: " + DUT.getAirTemp());
355
System.out.println("Device Temp: " + DUT.getDeviceTemp());
356
System.out.println("Soak Time: " + DUT.getSoakTime());
357
System.out.println("Set Point: " + DUT.getSetpoint());
358
System.out.println("Status: " + DUT.getStatus());
359
System.out.println("Head State " + DUT.getHeadState());
360
//DUT.headDown(false);
361
//System.out.println("Head State " + DUT.getHeadState());
362
//DUT.headDown(true);
363
//System.out.println("Head State " + DUT.getHeadState());
364
//DUT.setCompressorState(true); //works
365
System.out.println("Compressor State " + DUT.getCompressorState()); //check to make sure this is not backwards, doesnt seem to work
366
System.out.println("Preset 2 temp: " + DUT.getTemp(2));
368
DUT.setSoakTime (2, 120);
369
System.out.println("Preset 2 soak time: " + DUT.getSoakTime (2));
372
System.out.println("Boost level: " + DUT.getBoostLevel());
373
DUT.setColdFlow(300);
374
System.out.println("Cold flow level: " + DUT.getColdFlow());
376
System.out.println("Hot flow level: " + DUT.getHotFlow());
377
DUT.setRampState(true); //not working
379
System.out.println("Ramp State: " + DUT.getRampState()); //may not be working b/c setRampState giving bad result
380
System.out.println("Ramp Rate: " + DUT.getRampRate());
381
DUT.setTempSensing(1);
382
System.out.println("Temp Sensing Mode: " + DUT.getTempSensingMode());
383
DUT.setTempTolerance(0.5f);
384
System.out.println("Temp Tol: " + DUT.getTempTol());
387
DUT.setMaxTemp(150f);
388
DUT.setMinTemp(-60f);
390
System.out.println("Min Temp: " + DUT.getMinTemp());
391
System.out.println("Max Temp: " + DUT.getMaxTemp());