Incorrect reading of the peak power

aurora protocol http://www.curtronics.com/Solar/
server2006
Posts: 40
Joined: Tue May 23, 2017 7:54 am

Re: Incorrect reading of the peak power

Post by server2006 » Tue Mar 12, 2019 2:28 pm

Code: Select all

aurora -b -a 2 -c -T -d0 -e -3 /dev/ttyUSB1 

szttyDevice: /dev/ttyUSB1
yDelay:     1
yTimeout    0 mS
yMaxRunTime ~
devLCKfile: </var/lock/LCK..ttyUSB1>
devLCKfileNew: </var/lock/LCK..ttyUSB1.27288>
Got Params

RunTime     20190312-11:23:29 v1.9.3 
Endian    : Little
tm_gmtoff : yes
PID       : 27288

Attempting to get lock on Serial Port /dev/ttyUSB1...
Checking for lock
PID: 27288 COMMAND: "aurora" LckPID: 27288 LckCOMMAND: "aurora" LckPIDcommand "aurora" = me
Appears we got the lock.

Opening Serial Port /dev/ttyUSB1...  Serial Port /dev/ttyUSB1 successfully opened.
Configuring serial device... Flushing unread data first...  Success!
Flushing serial device buffer... Success!

Comm Check: Let's see if the Aurora is listening... 
Elapsed time since last comm 0 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3a 00 00 00 00 00 00 00 00 
command: 02 3a 00 00 00 00 00 00 01 b7 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    11714/1000000  uS 
Read char #2 RC=1 (06) waited/max      874/1000000  uS 
Read char #3 RC=1 (72) waited/max       16/1000000  uS 
Read char #4 RC=1 (45) waited/max      815/1000000  uS 
Read char #5 RC=1 (4e) waited/max       15/1000000  uS 
Read char #6 RC=1 (4e) waited/max      819/1000000  uS 
Read char #7 RC=1 (e3) waited/max       18/1000000  uS 
Read char #8 RC=1 (e7) waited/max      764/1000000  uS 
answer:  00 06 72 45 4e 4e e3 e7 
received 8 characters
CRC receive OK e7e3
Transmission State Check: 0
Model ID "r" qMultiplier -1.0000000 -- unknown --
Comm Check: OK

Elapsed time since last comm 425 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 04 00 00 00 00 00 00 00 
command: 02 3b 04 00 00 00 00 00 78 38 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    12733/1000000  uS 
Read char #2 RC=1 (06) waited/max      900/1000000  uS 
Read char #3 RC=1 (42) waited/max       15/1000000  uS 
Read char #4 RC=1 (47) waited/max      819/1000000  uS 
Read char #5 RC=1 (e8) waited/max       15/1000000  uS 
Read char #6 RC=1 (75) waited/max      819/1000000  uS 
Read char #7 RC=1 (d6) waited/max       16/1000000  uS 
Read char #8 RC=1 (6a) waited/max      839/1000000  uS 
answer:  00 06 42 47 e8 75 d6 6a 
received 8 characters
CRC receive OK 6ad6
Transmission State Check: 0
szCvrtFloat    49.977009 0x4247e875
value        49.977009

Elapsed time since last comm 148 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 01 00 00 00 00 00 00 00 
command: 02 3b 01 00 00 00 00 00 ff 2c 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    11733/1000000  uS 
Read char #2 RC=1 (06) waited/max       15/1000000  uS 
Read char #3 RC=1 (43) waited/max      807/1000000  uS 
Read char #4 RC=1 (6f) waited/max       15/1000000  uS 
Read char #5 RC=1 (cf) waited/max      820/1000000  uS 
Read char #6 RC=1 (e6) waited/max       15/1000000  uS 
Read char #7 RC=1 (bd) waited/max      820/1000000  uS 
Read char #8 RC=1 (7b) waited/max       15/1000000  uS 
answer:  00 06 43 6f cf e6 bd 7b 
received 8 characters
CRC receive OK 7bbd
Transmission State Check: 0
szCvrtFloat   239.812103 0x436fcfe6
value       239.812103

Elapsed time since last comm 100 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 02 00 00 00 00 00 00 00 
command: 02 3b 02 00 00 00 00 00 82 20 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    11741/1000000  uS 
Read char #2 RC=1 (06) waited/max      903/1000000  uS 
Read char #3 RC=1 (40) waited/max       15/1000000  uS 
Read char #4 RC=1 (98) waited/max      777/1000000  uS 
Read char #5 RC=1 (e4) waited/max       15/1000000  uS 
Read char #6 RC=1 (16) waited/max      818/1000000  uS 
Read char #7 RC=1 (55) waited/max       15/1000000  uS 
Read char #8 RC=1 (6e) waited/max      820/1000000  uS 
answer:  00 06 40 98 e4 16 55 6e 
received 8 characters
CRC receive OK 6e55
Transmission State Check: 0
szCvrtFloat     4.777843 0x4098e416
value         4.777843

Elapsed time since last comm 85 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 03 00 00 00 00 00 00 00 
command: 02 3b 03 00 00 00 00 00 a9 24 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    11736/1000000  uS 
Read char #2 RC=1 (06) waited/max       16/1000000  uS 
Read char #3 RC=1 (45) waited/max      815/1000000  uS 
Read char #4 RC=1 (4c) waited/max       16/1000000  uS 
Read char #5 RC=1 (74) waited/max      759/1000000  uS 
Read char #6 RC=1 (6d) waited/max       14/1000000  uS 
Read char #7 RC=1 (65) waited/max      818/1000000  uS 
Read char #8 RC=1 (38) waited/max      911/1000000  uS 
answer:  00 06 45 4c 74 6d 65 38 
received 8 characters
CRC receive OK 3865
Transmission State Check: 0
szCvrtFloat  3271.276611 0x454c746d
value      3271.276611

Elapsed time since last comm 107 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 17 00 00 00 00 00 00 00 
command: 02 3b 17 00 00 00 00 00 b5 76 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    10739/1000000  uS 
Read char #2 RC=1 (06) waited/max      906/1000000  uS 
Read char #3 RC=1 (44) waited/max       15/1000000  uS 
Read char #4 RC=1 (3a) waited/max      816/1000000  uS 
Read char #5 RC=1 (94) waited/max      912/1000000  uS 
Read char #6 RC=1 (aa) waited/max       14/1000000  uS 
Read char #7 RC=1 (f5) waited/max      822/1000000  uS 
Read char #8 RC=1 (29) waited/max       16/1000000  uS 
answer:  00 06 44 3a 94 aa f5 29 
received 8 characters
CRC receive OK 29f5
Transmission State Check: 0
szCvrtFloat   746.322876 0x443a94aa
value       746.322876

Elapsed time since last comm 101 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 19 00 00 00 00 00 00 00 
command: 02 3b 19 00 00 00 00 00 17 4f 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    11738/1000000  uS 
Read char #2 RC=1 (06) waited/max       15/1000000  uS 
Read char #3 RC=1 (40) waited/max      812/1000000  uS 
Read char #4 RC=1 (92) waited/max       15/1000000  uS 
Read char #5 RC=1 (56) waited/max      821/1000000  uS 
Read char #6 RC=1 (80) waited/max       15/1000000  uS 
Read char #7 RC=1 (4e) waited/max      826/1000000  uS 
Read char #8 RC=1 (e5) waited/max       15/1000000  uS 
answer:  00 06 40 92 56 80 4e e5 
received 8 characters
CRC receive OK e54e
Transmission State Check: 0
szCvrtFloat     4.573059 0x40925680
value         4.573059

Elapsed time since last comm 83 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 1a 00 00 00 00 00 00 00 
command: 02 3b 1a 00 00 00 00 00 6a 43 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    11744/1000000  uS 
Read char #2 RC=1 (06) waited/max       16/1000000  uS 
Read char #3 RC=1 (44) waited/max      810/1000000  uS 
Read char #4 RC=1 (3a) waited/max       15/1000000  uS 
Read char #5 RC=1 (05) waited/max      819/1000000  uS 
Read char #6 RC=1 (70) waited/max      912/1000000  uS 
Read char #7 RC=1 (a7) waited/max       15/1000000  uS 
Read char #8 RC=1 (50) waited/max      858/1000000  uS 
answer:  00 06 44 3a 05 70 a7 50 
received 8 characters
CRC receive OK 50a7
Transmission State Check: 0
szCvrtFloat   744.084961 0x443a0570
value       744.084961

Elapsed time since last comm 105 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 1b 00 00 00 00 00 00 00 
command: 02 3b 1b 00 00 00 00 00 41 47 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    13744/1000000  uS 
Read char #2 RC=1 (06) waited/max       16/1000000  uS 
Read char #3 RC=1 (00) waited/max      824/1000000  uS 
Read char #4 RC=1 (00) waited/max       15/1000000  uS 
Read char #5 RC=1 (00) waited/max       14/1000000  uS 
Read char #6 RC=1 (00) waited/max       14/1000000  uS 
Read char #7 RC=1 (17) waited/max      611/1000000  uS 
Read char #8 RC=1 (cc) waited/max       15/1000000  uS 
answer:  00 06 00 00 00 00 17 cc 
received 8 characters
CRC receive OK cc17
Transmission State Check: 0
szCvrtFloat     0.000000 0x00000000
value         0.000000

Elapsed time since last comm 83 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 15 00 00 00 00 00 00 00 
command: 02 3b 15 00 00 00 00 00 e3 7e 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    11736/1000000  uS 
Read char #2 RC=1 (06) waited/max       16/1000000  uS 
Read char #3 RC=1 (41) waited/max      810/1000000  uS 
Read char #4 RC=1 (f9) waited/max       15/1000000  uS 
Read char #5 RC=1 (c3) waited/max      816/1000000  uS 
Read char #6 RC=1 (a0) waited/max       15/1000000  uS 
Read char #7 RC=1 (f9) waited/max      818/1000000  uS 
Read char #8 RC=1 (93) waited/max       16/1000000  uS 
answer:  00 06 41 f9 c3 a0 f9 93 
received 8 characters
CRC receive OK 93f9
Transmission State Check: 0
szCvrtFloat    31.220520 0x41f9c3a0
value        31.220520

Elapsed time since last comm 97 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 16 00 00 00 00 00 00 00 
command: 02 3b 16 00 00 00 00 00 9e 72 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    12872/1000000  uS 
Read char #2 RC=1 (06) waited/max       15/1000000  uS 
Read char #3 RC=1 (41) waited/max      665/1000000  uS 
Read char #4 RC=1 (db) waited/max       15/1000000  uS 
Read char #5 RC=1 (7c) waited/max      819/1000000  uS 
Read char #6 RC=1 (20) waited/max       14/1000000  uS 
Read char #7 RC=1 (d4) waited/max      819/1000000  uS 
Read char #8 RC=1 (18) waited/max       14/1000000  uS 
answer:  00 06 41 db 7c 20 d4 18 
received 8 characters
CRC receive OK 18d4
Transmission State Check: 0
szCvrtFloat    27.435608 0x41db7c20
value        27.435608

Attempting to get Partial Energy value 
Elapsed time since last comm 271 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 4e 06 00 00 00 00 00 00 00 
command: 02 4e 06 00 00 00 00 00 c1 d1 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    11591/1000000  uS 
Read char #2 RC=1 (06) waited/max      899/1000000  uS 
Read char #3 RC=1 (00) waited/max       15/1000000  uS 
Read char #4 RC=1 (54) waited/max      814/1000000  uS 
Read char #5 RC=1 (75) waited/max       15/1000000  uS 
Read char #6 RC=1 (0c) waited/max      817/1000000  uS 
Read char #7 RC=1 (85) waited/max      913/1000000  uS 
Read char #8 RC=1 (68) waited/max       15/1000000  uS 
answer:  00 06 00 54 75 0c 85 68 
received 8 characters
CRC receive OK 6885
Transmission State Check: 0
szCvrtLong        5534988 0x0054750c
value             5534988

Elapsed time since last comm 68 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 4e 00 00 00 00 00 00 00 00 
command: 02 4e 00 00 00 00 00 00 3b c9 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    11742/1000000  uS 
Read char #2 RC=1 (06) waited/max      856/1000000  uS 
Read char #3 RC=1 (00) waited/max       15/1000000  uS 
Read char #4 RC=1 (00) waited/max      823/1000000  uS 
Read char #5 RC=1 (19) waited/max       14/1000000  uS 
Read char #6 RC=1 (8a) waited/max      814/1000000  uS 
Read char #7 RC=1 (cc) waited/max       15/1000000  uS 
Read char #8 RC=1 (a5) waited/max      823/1000000  uS 
answer:  00 06 00 00 19 8a cc a5 
received 8 characters
CRC receive OK a5cc
Transmission State Check: 0
szCvrtLong           6538 0x0000198a
value                6538

Elapsed time since last comm 66 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 4e 01 00 00 00 00 00 00 00 
command: 02 4e 01 00 00 00 00 00 10 cd 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    11745/1000000  uS 
Read char #2 RC=1 (06) waited/max       15/1000000  uS 
Read char #3 RC=1 (00) waited/max      819/1000000  uS 
Read char #4 RC=1 (00) waited/max       15/1000000  uS 
Read char #5 RC=1 (38) waited/max      819/1000000  uS 
Read char #6 RC=1 (fc) waited/max      858/1000000  uS 
Read char #7 RC=1 (96) waited/max       15/1000000  uS 
Read char #8 RC=1 (89) waited/max      819/1000000  uS 
answer:  00 06 00 00 38 fc 96 89 
received 8 characters
CRC receive OK 8996
Transmission State Check: 0
szCvrtLong          14588 0x000038fc
value               14588

Elapsed time since last comm 66 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 4e 03 00 00 00 00 00 00 00 
command: 02 4e 03 00 00 00 00 00 46 c5 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    12742/1000000  uS 
Read char #2 RC=1 (06) waited/max       15/1000000  uS 
Read char #3 RC=1 (00) waited/max      816/1000000  uS 
Read char #4 RC=1 (02) waited/max       15/1000000  uS 
Read char #5 RC=1 (dc) waited/max      819/1000000  uS 
Read char #6 RC=1 (92) waited/max       14/1000000  uS 
Read char #7 RC=1 (af) waited/max      820/1000000  uS 
Read char #8 RC=1 (38) waited/max       16/1000000  uS 
answer:  00 06 00 02 dc 92 af 38 
received 8 characters
CRC receive OK 38af
Transmission State Check: 0
szCvrtLong         187538 0x0002dc92
value              187538

Elapsed time since last comm 66 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 4e 04 00 00 00 00 00 00 00 
command: 02 4e 04 00 00 00 00 00 97 d9 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    12743/1000000  uS 
Read char #2 RC=1 (06) waited/max      909/1000000  uS 
Read char #3 RC=1 (00) waited/max       15/1000000  uS 
Read char #4 RC=1 (09) waited/max      819/1000000  uS 
Read char #5 RC=1 (79) waited/max       15/1000000  uS 
Read char #6 RC=1 (ee) waited/max      822/1000000  uS 
Read char #7 RC=1 (a5) waited/max       15/1000000  uS 
Read char #8 RC=1 (79) waited/max      820/1000000  uS 
answer:  00 06 00 09 79 ee a5 79 
received 8 characters
CRC receive OK 79a5
Transmission State Check: 0
szCvrtLong         621038 0x000979ee
value              621038

Elapsed time since last comm 67 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 4e 05 00 00 00 00 00 00 00 
command: 02 4e 05 00 00 00 00 00 bc dd 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    15702/1000000  uS 
Read char #2 RC=1 (06) waited/max       16/1000000  uS 
Read char #3 RC=1 (00) waited/max      814/1000000  uS 
Read char #4 RC=1 (54) waited/max       15/1000000  uS 
Read char #5 RC=1 (75) waited/max      821/1000000  uS 
Read char #6 RC=1 (0c) waited/max       15/1000000  uS 
Read char #7 RC=1 (85) waited/max      824/1000000  uS 
Read char #8 RC=1 (68) waited/max       17/1000000  uS 
answer:  00 06 00 54 75 0c 85 68 
received 8 characters
CRC receive OK 6885
Transmission State Check: 0
szCvrtLong        5534988 0x0054750c
value             5534988

Elapsed time since last comm 149 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 1f 00 00 00 00 00 00 00 
command: 02 3b 1f 00 00 00 00 00 ed 57 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    11744/1000000  uS 
Read char #2 RC=1 (06) waited/max       15/1000000  uS 
Read char #3 RC=1 (44) waited/max      816/1000000  uS 
Read char #4 RC=1 (3a) waited/max      936/1000000  uS 
Read char #5 RC=1 (7b) waited/max       15/1000000  uS 
Read char #6 RC=1 (03) waited/max      798/1000000  uS 
Read char #7 RC=1 (6f) waited/max       14/1000000  uS 
Read char #8 RC=1 (7b) waited/max      824/1000000  uS 
answer:  00 06 44 3a 7b 03 6f 7b 
received 8 characters
CRC receive OK 7b6f
Transmission State Check: 0
szCvrtFloat   745.922058 0x443a7b03
value       745.922058

Elapsed time since last comm 101 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 26 00 00 00 00 00 00 00 
command: 02 3b 26 00 00 00 00 00 4e b5 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    12707/1000000  uS 
Read char #2 RC=1 (06) waited/max       15/1000000  uS 
Read char #3 RC=1 (00) waited/max      822/1000000  uS 
Read char #4 RC=1 (00) waited/max       14/1000000  uS 
Read char #5 RC=1 (00) waited/max      820/1000000  uS 
Read char #6 RC=1 (00) waited/max       14/1000000  uS 
Read char #7 RC=1 (17) waited/max      822/1000000  uS 
Read char #8 RC=1 (cc) waited/max       15/1000000  uS 
answer:  00 06 00 00 00 00 17 cc 
received 8 characters
CRC receive OK cc17
szCvrtFloat     0.000000 0x00000000
value         0.000000

Elapsed time since last comm 64 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 3d 00 00 00 00 00 00 00 
command: 02 3b 3d 00 00 00 00 00 db da 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    16773/1000000  uS 
Read char #2 RC=1 (06) waited/max       15/1000000  uS 
Read char #3 RC=1 (43) waited/max      794/1000000  uS 
Read char #4 RC=1 (6f) waited/max       14/1000000  uS 
Read char #5 RC=1 (cf) waited/max      820/1000000  uS 
Read char #6 RC=1 (e6) waited/max       15/1000000  uS 
Read char #7 RC=1 (bd) waited/max      819/1000000  uS 
Read char #8 RC=1 (7b) waited/max       15/1000000  uS 
answer:  00 06 43 6f cf e6 bd 7b 
received 8 characters
CRC receive OK 7bbd
Transmission State Check: 0
szCvrtFloat   239.812103 0x436fcfe6
value       239.812103

Elapsed time since last comm 97 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 3e 00 00 00 00 00 00 00 
command: 02 3b 3e 00 00 00 00 00 a6 d6 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    13672/1000000  uS 
Read char #2 RC=1 (06) waited/max       15/1000000  uS 
Read char #3 RC=1 (43) waited/max      817/1000000  uS 
Read char #4 RC=1 (5c) waited/max       15/1000000  uS 
Read char #5 RC=1 (e0) waited/max      847/1000000  uS 
Read char #6 RC=1 (00) waited/max       15/1000000  uS 
Read char #7 RC=1 (b4) waited/max      757/1000000  uS 
Read char #8 RC=1 (30) waited/max       16/1000000  uS 
answer:  00 06 43 5c e0 00 b4 30 
received 8 characters
CRC receive OK 30b4
Transmission State Check: 0
szCvrtFloat   220.875000 0x435ce000
value       220.875000

Elapsed time since last comm 98 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 3f 00 00 00 00 00 00 00 
command: 02 3b 3f 00 00 00 00 00 8d d2 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    10747/1000000  uS 
Read char #2 RC=1 (06) waited/max      762/1000000  uS 
Read char #3 RC=1 (43) waited/max       16/1000000  uS 
Read char #4 RC=1 (61) waited/max      806/1000000  uS 
Read char #5 RC=1 (cc) waited/max       14/1000000  uS 
Read char #6 RC=1 (c1) waited/max      815/1000000  uS 
Read char #7 RC=1 (73) waited/max       15/1000000  uS 
Read char #8 RC=1 (14) waited/max      820/1000000  uS 
answer:  00 06 43 61 cc c1 73 14 
received 8 characters
CRC receive OK 1473
Transmission State Check: 0
szCvrtFloat   225.799820 0x4361ccc1
value       225.799820

Elapsed time since last comm 107 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 27 00 00 00 00 00 00 00 
command: 02 3b 27 00 00 00 00 00 65 b1 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (2d) waited/max      451/1000000  uS 
Read char #2 RC=1 (84) waited/max      863/1000000  uS 
Read char #3 RC=0 (00) waited/max    97978/1000000  uS 
answer:  Got -1 characters
_ERROR_ (59 39)

Elapsed time since last comm 14 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 28 00 00 00 00 00 00 00 
command: 02 3b 28 00 00 00 00 00 ec 8c 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    11877/1000000  uS 
Read char #2 RC=1 (06) waited/max        8/1000000  uS 
Read char #3 RC=1 (40) waited/max      877/1000000  uS 
Read char #4 RC=1 (98) waited/max        7/1000000  uS 
Read char #5 RC=1 (1a) waited/max      918/1000000  uS 
Read char #6 RC=1 (da) waited/max        6/1000000  uS 
Read char #7 RC=1 (2d) waited/max      925/1000000  uS 
Read char #8 RC=1 (84) waited/max        6/1000000  uS 
answer:  00 06 40 98 1a da 2d 84 
received 8 characters
CRC receive OK 842d
Transmission State Check: 0
szCvrtFloat     4.753278 0x40981ada
value         4.753278

Elapsed time since last comm 50 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 29 00 00 00 00 00 00 00 
command: 02 3b 29 00 00 00 00 00 c7 88 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    12884/1000000  uS 
Read char #2 RC=1 (06) waited/max        7/1000000  uS 
Read char #3 RC=1 (40) waited/max      939/1000000  uS 
Read char #4 RC=1 (99) waited/max      935/1000000  uS 
Read char #5 RC=1 (de) waited/max        6/1000000  uS 
Read char #6 RC=1 (30) waited/max      923/1000000  uS 
Read char #7 RC=1 (6f) waited/max        6/1000000  uS 
Read char #8 RC=1 (3b) waited/max      927/1000000  uS 
answer:  00 06 40 99 de 30 6f 3b 
received 8 characters
CRC receive OK 3b6f
Transmission State Check: 0
szCvrtFloat     4.808372 0x4099de30
value         4.808372

Elapsed time since last comm 35 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 2a 00 00 00 00 00 00 00 
command: 02 3b 2a 00 00 00 00 00 ba 84 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    13898/1000000  uS 
Read char #2 RC=1 (06) waited/max      915/1000000  uS 
Read char #3 RC=1 (42) waited/max        6/1000000  uS 
Read char #4 RC=1 (47) waited/max      925/1000000  uS 
Read char #5 RC=1 (ed) waited/max        6/1000000  uS 
Read char #6 RC=1 (93) waited/max      922/1000000  uS 
Read char #7 RC=1 (56) waited/max        6/1000000  uS 
Read char #8 RC=1 (96) waited/max      925/1000000  uS 
answer:  00 06 42 47 ed 93 56 96 
received 8 characters
CRC receive OK 9656
Transmission State Check: 0
szCvrtFloat    49.982006 0x4247ed93
value        49.982006

Elapsed time since last comm 48 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 2b 00 00 00 00 00 00 00 
command: 02 3b 2b 00 00 00 00 00 91 80 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    12888/1000000  uS 
Read char #2 RC=1 (06) waited/max        6/1000000  uS 
Read char #3 RC=1 (42) waited/max      929/1000000  uS 
Read char #4 RC=1 (47) waited/max        6/1000000  uS 
Read char #5 RC=1 (ed) waited/max      919/1000000  uS 
Read char #6 RC=1 (93) waited/max        6/1000000  uS 
Read char #7 RC=1 (56) waited/max      924/1000000  uS 
Read char #8 RC=1 (96) waited/max        6/1000000  uS 
answer:  00 06 42 47 ed 93 56 96 
received 8 characters
CRC receive OK 9656
Transmission State Check: 0
szCvrtFloat    49.982006 0x4247ed93
value        49.982006

Elapsed time since last comm 43 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 2c 00 00 00 00 00 00 00 
command: 02 3b 2c 00 00 00 00 00 40 9c 
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00 
Read char #1 RC=1 (00) waited/max    12890/1000000  uS 
Read char #2 RC=1 (06) waited/max      957/1000000  uS 
Read char #3 RC=1 (42) waited/max        6/1000000  uS 
Read char #4 RC=1 (47) waited/max      924/1000000  uS 
Read char #5 RC=1 (ed) waited/max        7/1000000  uS 
Read char #6 RC=1 (93) waited/max      924/1000000  uS 
Read char #7 RC=1 (56) waited/max      965/1000000  uS 
Read char #8 RC=1 (96) waited/max        6/1000000  uS 
answer:  00 06 42 47 ed 93 56 96 
received 8 characters
CRC receive OK 9656
Transmission State Check: 0
szCvrtFloat    49.982006 0x4247ed93
value        49.982006
Complete.

rc: 0


Restoring Serial Port settings /dev/ttyUSB1... Success!
Flushing serial device buffer... Success!
Closing Serial Port /dev/ttyUSB1... Success!

devLCKfile: </var/lock/LCK..ttyUSB1>
devLCKfileNew: </var/lock/LCK..ttyUSB1.27288>
Clearing Serial Port Lock (27288)... done.

Complete 20190312-11:23:30

Image

server2006
Posts: 40
Joined: Tue May 23, 2017 7:54 am

Re: Incorrect reading of the peak power

Post by server2006 » Thu Mar 14, 2019 7:38 pm

Hello!
I uploaded the file that came to me from Jean-Marc.
And the second day works without problems and errors.
Thank you very much!!

jeanmarc
Posts: 1767
Joined: Thu Aug 29, 2013 7:16 am

Re: Incorrect reading of the peak power

Post by jeanmarc » Thu Mar 14, 2019 9:56 pm

Great but i am unsure i will put this aurora protocol as default since you are the only one who complain ;)

Code: Select all

<?php
if (!defined('checkaccess')) {
    die('Direct access not permitted');
}
// For Aurora http://www.curtronics.com/Solar
$CMD_RETURN = '';

if (!${'PHASE' . $invt_num}) { // Monophased
    if ($DEBUG) {
        $CMD_POOLING = "aurora -b -a ${'ADR'.$invt_num} -c -T ${'COMOPTION'.$invt_num} -d0 -e ${'PORT'.$invt_num} 2> /tmp/de.err";
    } else {
        $CMD_POOLING = "aurora -a ${'ADR'.$invt_num} -c -T ${'COMOPTION'.$invt_num} -d0 -e ${'PORT'.$invt_num}";
    }
    $ok = 21;
} else { // Triphased
    if ($DEBUG) {
        $CMD_POOLING = "aurora -b -a ${'ADR'.$invt_num} -c -T ${'COMOPTION'.$invt_num} -d0 -e -3 ${'PORT'.$invt_num} 2> /tmp/de.err";
    } else {
        $CMD_POOLING = "aurora -a ${'ADR'.$invt_num} -c -T ${'COMOPTION'.$invt_num} -d0 -e -3 ${'PORT'.$invt_num}";
    }
    $ok = 31;
}
$dataarray = array();

$CMD_RETURN = exec($CMD_POOLING);
$dataarray  = preg_split('/[[:space:]]+/', $CMD_RETURN);

if (!isset($dataarray[$ok])) {
    $dataarray[$ok] = 'NOK';
}

if ($dataarray[$ok] == 'OK') {
    //$SDTE = $dataarray[0]; // 20150719-11:31:02
    $I1V  = (float) $dataarray[1];
    $I1A  = (float) $dataarray[2];
    $I1P  = (float) $dataarray[3];
    $I2V  = (float) $dataarray[4];
    $I2A  = (float) $dataarray[5];
    $I2P  = (float) $dataarray[6];
    $FRQ  = (float) $dataarray[10];
    $EFF  = (float) $dataarray[11];
    $INVT = (float) $dataarray[12];
    $BOOT = (float) $dataarray[13];
    $KWHT = (float) $dataarray[19];
    
    if (!${'PHASE' . $invt_num}) {
        $G1V = (float) $dataarray[7];
        $G1A = (float) $dataarray[8];
        $G1P = (float) $dataarray[9];
        $I3V = null;
        $I3A = null;
        $I3P = null;
        $I4V = null;
        $I4A = null;
        $I4P = null;
        $G2V = null;
        $G2A = null;
        $G2P = null;
        $G3V = null;
        $G3A = null;
        $G3P = null;
    } else {
        $I3V = null;
        $I3A = null;
        $I3P = null;
        $I4V = null;
        $I4A = null;
        $I4P = null;
        $G1V = (float) $dataarray[22];
        $G1A = (float) $dataarray[25];
        $G1P = round(($G1V * $G1A), 3);
        $G2V = (float) $dataarray[23];
        $G2A = (float) $dataarray[26];
        $G2P = round(($G2V * $G2A), 3);
        $G3V = (float) $dataarray[24];
        $G3A = (float) $dataarray[27];
        $G3P = round(($G3V * $G3A), 3);
    }
    
    if ($FRQ > 0) { // Avoid null values at early startup
        $RET = 'OK';
    } else {
        $RET = 'NOK';
    }
    if ($G1P > 10000 || $G2P > 10000 || $G3P > 10000) {
        $RET = 'NOK';
    }
} else {
    $RET = 'NOK';
    if ($DEBUG) {
        $time = date('Ymd-H:i:s');
        exec('cp /tmp/de.err ' . $DATADIR . '/errors/de' . $time . '.err');
        file_put_contents($DATADIR . '/errors/out' . $time . '.txt', $CMD_RETURN);
    }
}
?>

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest