I recently posted a script I'm working on that receives a packet from a swimming pool controller every 2.5 seconds (sort of a heartbeat packet). Problem is HS isn't reliably receiving the whole packet (5A thru DA). I know the data is coming in the serial port because I ran a serial port monitor program and got the full packets (see below)
5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B
02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA
But the data HS received is inconsistent. The fist 2 packets are "short" but the last packet is complete (see below):
4/25/2003 8:41:46 PM~!~dec2hex~!~5AFFAA0F1B02102B14002070441A000072A1000000704 004
4/25/2003 8:41:49 PM~!~dec2hex~!~5AFFAA0F1B02102B14002070441A000072A1000000704 004
4/25/2003 8:41:51 PM~!~dec2hex~!~5AFFAA0F1B02102B14002070441A000072A1000000704 004D55ADA
I'm using "rcvd=hs.getcomportdata(2)" to receive the data.
Is it possible that HS is truncating the com2 data or am I doing something wrong?
[This message was edited by WBMurray on Sat, 26 April 2003 at 10:51 AM.]
5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B
02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA 5A FF AA 0F 1B 02 10 13 14 00 20 70 45 1B 00 00 72 A1 00 00 00 70 40 04 BF 5A DA
But the data HS received is inconsistent. The fist 2 packets are "short" but the last packet is complete (see below):
4/25/2003 8:41:46 PM~!~dec2hex~!~5AFFAA0F1B02102B14002070441A000072A1000000704 004
4/25/2003 8:41:49 PM~!~dec2hex~!~5AFFAA0F1B02102B14002070441A000072A1000000704 004
4/25/2003 8:41:51 PM~!~dec2hex~!~5AFFAA0F1B02102B14002070441A000072A1000000704 004D55ADA
I'm using "rcvd=hs.getcomportdata(2)" to receive the data.
Is it possible that HS is truncating the com2 data or am I doing something wrong?
[This message was edited by WBMurray on Sat, 26 April 2003 at 10:51 AM.]
Comment