Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Macros, Scripts, and Formulas Repository
 PowerHome Messageboard : PowerHome Macros, Scripts, and Formulas Repository
Subject Topic: QKITS Temperature Sensor Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
nadler
Super User
Super User


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: May 29 2007 at 20:13 | IP Logged Quote nadler

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,'');
Back to Top View nadler's Profile Search for other posts by nadler
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum