Hi All,
I currently operate a 6 inch refracting telescope for astronomical imaging purposes. The scope’s imaging is automated by the program CCDAutopilot4 from CCDware. I want to add an automatic shutdown feature that closes my observatory shutter if rain appears. Hence I need the output of my Hydreon rain gage, which closes or opens an electrical contact when it “sees” rain, to trigger the shutdown sequence in CCDAutopilot4. The shutdown sequence must be completed in CCDAutopilot in order for the telescope to be placed in the “park” position before the shutters close.
The observatory control schematic I will be using for this project is at dppobservatory.net/ROR/ED-ROR-V02.pdf. The output relay of the rain sensor is active when it senses rain. This control scheme uses a K8055 USB interface board.
On the other end, the CCDAutopilot4 program requires the output of the K8055 board to be a text file on the pc hard drive with the following format:
"The file is written for each message received from the rain sensor (3 seconds apart). The format is:
Date Time U SkyT AmbT SenT Hea W Since Now() Day’s S
2005-06-03 02:07:23 C -28.5 18.7 22.5 3 0 00004 038506.08846 1
The immediately above line is an example of the only line in the file.
The fields mean:
Date local date yyyy-mm-dd
Time local time hh:mm:ss (24 hour clock)
U temperature units, ‘C’ for Celsius or ‘F’ for Fahrenheit
SkyT sky-ambient temperature
AmbT ambient temperature
SenT sensor case temperature
Hea heater setting in %
W wet flag, =0 for dry, =1 for wet
Since seconds since last valid data
Now() Day’s VB6 Now() function result (in days)
S SkyCondition (see the SkyCond enum in section 13).
The rain sensor’s output will only effect the “W” wet flag value, which should be 0 for dry or 1 for wet. I’m thinking the time and date will come from the pc. Temperature values will be left blank or have dummy values.
I don’t have experience in Visual Basic, and I was wondering if anyone could send me an example of the necessary code/steps required for the the K8055 in order to accomplish this task, or perhaps point me in the right direction.
Thanks in advance,
Bob English