Serial port active


rexp

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.