nadler Super User
Joined: February 25 2006 Location: United States
Online Status: Offline Posts: 354
|
Posted: May 29 2007 at 20:13 | IP Logged
|
|
|
This is a PH Macro that works with Qkits.com VK011 Serial Temperature Sensor Interface. Each line is commented for easy adaptation for your set up.
insert into macroheader values ('QKIT TEMP','Temp Sensor',0,0,1);
insert into macrodetail values ('QKIT TEMP',1,37,'',NULL,'Open comm port 4 and turns on Temp Sens board',0,'');
insert into macrodetail values ('QKIT TEMP',2,38,'',NULL,'ph_comopen(4,4,9600,"N",8,1,1,0,0,0,0,0, 1,"?","")',0,'');
insert into macrodetail values ('QKIT TEMP',3,37,'',NULL,'Necessary delay to get the 1st temp reading',0,'');
insert into macrodetail values ('QKIT TEMP',4,31,'',NULL,'2',0,'');
insert into macrodetail values ('QKIT TEMP',5,37,'',NULL,'Next line get the info from the receive buffer',0,'');
insert into macrodetail values ('QKIT TEMP',6,15,'[LOCAL1]',NULL,'ph_comrecvstring(4,9999)',0,'');
insert into macrodetail values ('QKIT TEMP',7,37,'',NULL,'Parses the info to get just the temp. Next line for debugging purposes',0,'');
insert into macrodetail values ('QKIT TEMP',8,24,'TTS',2,'mid ( "[LOCAL1]", 52 , 5 )
',0,'');
insert into macrodetail values ('QKIT TEMP',9,37,'',NULL,'Set global variable OFFICE TEMP to temprature',0,'');
insert into macrodetail values ('QKIT TEMP',10,10,'OFFICE TEMP',NULL,'mid ( "[LOCAL1]", 52 , 5 )
',0,'');
insert into macrodetail values ('QKIT TEMP',11,37,'',NULL,'Close Comm port 4 opened in Line 10',0,'');
insert into macrodetail values ('QKIT TEMP',12,38,'',NULL,'ph_comclose(4)',0,'');
|