rexp Posted October 28, 2010 Share Posted October 28, 2010 Hi I have got most of my monitor for the Xantrex Grid Tie inverter fully functioning thanks to the assistance here. I setup a sequence to run polling the inverter and getting all the values from the inverter ok. When darkness comes the inverter goes to sleep and does not respond - this generates lots of timeout alarms. What is the best way to monitor the serial port to see when it "comes alive" in the morning then start the poll sequence, and at night when it shuts down stop the poll sequence. There is a ROM command that the original Xantrex software appears to use to see when a response occurs then starts monitoring. At night the software continually sends the ROM?13 command with no response During the daytime this is the response Tx: ROM?13 Rx: B:01.05.01 M:03.07.02 X:01.02.07 P:03.00.0713 Hope this makes sense - been searching the forum but have not found anything so far. Thanks Rex Link to comment Share on other sites More sharing options...
AzeoTech Posted October 28, 2010 Share Posted October 28, 2010 I guess the return question is: why do you care? If you are properly catching the timeout errors, then your polling loop will just continually ping the device until the sun comes back up and it is successful. What is the problem with this? Link to comment Share on other sites More sharing options...
rexp Posted October 28, 2010 Author Share Posted October 28, 2010 Nothing I guess, just wanted to keep it tidy. Thanks rex Link to comment Share on other sites More sharing options...
AzeoTech Posted October 28, 2010 Share Posted October 28, 2010 Throw a try/catch block around it so the alert doesn't appear in the window and you are set. There actually is no tidier way to do it, other than, perhaps, installing a light sensor that you monitor or something like that, but that's overkill. There is nothing wrong with properly caught and handled errors. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.