-
euicho
Reply
| Kimba Shaw on FBI cell phone tapping | |
| euicho on Amazon – View Book on Sh… | |
| B on Powermap Update | |
| euicho on Maine Power Outages Map | |
| Andrei on Amazon – View Book on Sh… |
Doody,
euicho, and
Jesse are discussing. Toggle Comments
Proudly powered by WordPress. Theme: P2 by Automattic.

Jesse 3:03 pm on 4/16/2007 Permalink
Here’s what I’m currently Reading:
unit GasGunMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, TeeProcs, TeEngine, Chart, GasGunInterface,
Errex, GasGunC, AppEvnts, daqx;
type
TGasGunMainForm = class(TForm)
RelatStatuGB: TGroupBox;
vrs: TEdit;
Label1: TLabel;
Label2: TLabel;
srs: TEdit;
SensorStatusGB: TGroupBox;
StrainGaugeStatusGB: TGroupBox;
Label4: TLabel;
Label6: TLabel;
Label7: TLabel;
Edit5: TEdit;
Edit6: TEdit;
Edit7: TEdit;
Voltagegraph: TChart;
Chart2: TChart;
RoomtempGB: TGroupBox;
RoomAirTempEB: TEdit;
Label8: TLabel;
GroupBox1: TGroupBox;
FireControlBT: TButton;
SensorVoltageSourceGB: TGroupBox;
Label9: TLabel;
SensorVoltageEB: TEdit;
VoltageOnBT: TButton;
VoltageOffBT: TButton;
VacPumpOn: TButton;
VacPumpOff: TButton;
SolValveOff: TButton;
SolValveOn: TButton;
Label10: TLabel;
Label11: TLabel;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
Label14: TLabel;
GroupBox2: TGroupBox;
Edit1: TEdit;
Label16: TLabel;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
Label15: TLabel;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Timer2: TTimer;
procedure FormCreate(Sender: TObject);
procedure VacPumpOnClick(Sender: TObject);
procedure VacPumpOffClick(Sender: TObject);
procedure SolValveOnClick(Sender: TObject);
procedure SolValveOffClick(Sender: TObject);
procedure VoltageOnBTClick(Sender: TObject);
procedure VoltageOffBTClick(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure FireControlBTClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
GasGunMainForm: TGasGunMainForm;
Fired: Integer;
Counter: Integer;
SensorVoltage: Real;
implementation
{$R *.DFM}
procedure TGasGunMainForm.FormCreate(Sender: TObject);
begin
OpenTheDaq(1);
daq9513SetMasterMode(DaqHandle00, DiodtLocal9513, 0, 1, DcsF4, false, false,
DtodDisabled);
daq9513SetCtrMode (DaqHandle00, DiodtLocal9513, 0, 1, DgcNoGating, true,
DcsF4, false, false, false, false, true, DocInactiveLow);
GasGunInterface_Frm.InitRelays;
{Turning all relay status settings to off}
vrs.text := ‘OFF’;
srs.text := ‘OFF’;
Counter := 0;
end;
{Turning on Vacuum Pump Relay via button}
procedure TGasGunMainForm.VacPumpOnClick(Sender: TObject);
begin
GasGunInterface_Frm.TurnRelayOn(VacuumPumpRelay);
vrs.text := ‘ON’;
end;
{Turning off Vacuum Pump Relay via button}
procedure TGasGunMainForm.VacPumpOffClick(Sender: TObject);
begin
GasGunInterface_Frm.TurnRelayOff(VacuumPumpRelay);
vrs.text := ‘OFF’;
end;
{Turning on Solenoid Valve Relay via button}
procedure TGasGunMainForm.SolValveOnClick(Sender: TObject);
begin
GasGunInterface_Frm.TurnRelayOn(SolenoidValveRelay);
srs.text := ‘ON’;
end;
{Turning off Solenoid Valve Relay via button}
procedure TGasGunMainForm.SolValveOffClick(Sender: TObject);
begin
GasGunInterface_Frm.TurnRelayOff(SolenoidValveRelay);
srs.text := ‘OFF’;
end;
procedure TGasGunMainForm.VoltageOnBTClick(Sender: TObject);
begin
GasGunInterface_Frm.TurnRelayOn(SensorVoltageSource);
end;
procedure TGasGunMainForm.VoltageOffBTClick(Sender: TObject);
begin
GasGunInterface_Frm.TurnRelayOff(SensorVoltageSource);
end;
{***********************************************************************
* Firing Controls *
***********************************************************************}
procedure TGasGunMainForm.Timer2Timer(Sender: TObject);
begin
SensorVoltage := Scandata.ReadOneChannel(SensorChan);
SensorVoltageEB.Text := FloatToStr(SensorVoltage);
end;
procedure TGasGunMainForm.FireControlBTClick(Sender: TObject);
var
loop : boolean;
SensorV : real;
str : string;
DateTime : TDateTime;
Hour, Min1, Min2, Sec1, MSec1,Sec2, MSec2: Word;
eTime : real;
counts : WORD;
count1 : WORD;
count2 : WORD;
ctrval : WORD;
velocity: real;
begin
loop := true;
counts := 0;
count1 := 0;
count2 := 0;
DecodeTime(Time,Hour,Min1,Sec1,MSec1);
GasGunInterface_Frm.TurnRelayOn(SolenoidValveRelay);
daq9513SetHold(DaqHandle00, DiodtLocal9513,0, 1, 0);
daq9513MultCtrl(DaqHandle00, DiodtLocal9513, 0, DmccArm, true, false, false,
false, false);
daq9513MultCtrl(DaqHandle00, DiodtLocal9513, 0, DmccSave, true, false, false,
false, false);
daq9513GetHold(DaqHandle00, DiodtLocal9513, 0, 1, count1);
while loop
do
begin
SensorV := Scandata.ReadOneChannel(SensorChan);
daq9513MultCtrl(DaqHandle00, DiodtLocal9513, 0, DmccSave, true, false, false,
false, false);
daq9513GetHold(DaqHandle00, DiodtLocal9513, 0, 1, count2);
if SensorV > 3.1 then Loop := false;
end;
daq9513MultCtrl(DaqHandle00, DiodtLocal9513, 0, DmccDisarm, true, false, false,
false, false);
GasGunInterface_Frm.TurnRelayOff(SolenoidValveRelay);
DecodeTime(Time,Hour,Min2,Sec2,MSec2);
eTime := (Sec2-Sec1) + (MSec2-Msec1)/1000;
velocity := 24/((count2+1)*1.0);
{str :=’Travel Time – ‘+ ‘Low=’ + FloatToStr(eTime-0.015)+’s'+’ High=’ + FloatToStr(eTime) +’s';
showmessage(str);
str :=’Projectile Velocity – ‘+ ‘Low=’ + FloatToStr(24/eTime*1/12) +’ ft/s’+’ High=’ + FloatToStr(24/(eTime-0.015)*1/12) + ‘ ft/s’;
showmessage(str);
str := FloatToStr(count2-count1-11);
showmessage(str);}
str := ‘Projectile Velocity ‘ + ‘ High – ‘ + FloatToStr(24/((count2-count1)/1000-0.0109999)) + ‘ ft/s’+ ‘ Low – ‘ + FloatToStr(24/((count2-count1)/1000)) + ‘ ft/s’;
showmessage(str);
str := ‘Projectile Travel Time ‘ + ‘ High – ‘ + FloatToStr((count2-count1)/1000)+ ‘ Low – ‘ + FloatToStr((count2-count1)/1000-0.0109999);
showmessage(str);
end;
end.
After a month of writing this program I’m beginning to go a little bit crazy. It’s a good thing it only fires one round.
Jesse 3:04 pm on 4/16/2007 Permalink
They delted my gravatar, artards.
euicho 11:04 am on 4/17/2007 Permalink
ROFL awesome! But why the heck did they delete your gravatar? R-tards indeed.
Doody 10:00 pm on 4/17/2007 Permalink
That is an awesome picture though.