How to setting Parameters in received serial port from device?
-
Now I have a device and it can be received data from serial port in hyperminal data automatic.
I want to get the data in mango .
what have I tried: I use free device monitoring studio software to monior the received data. show them as below:
02 51 2C 31 38 32 2C 30 30 30 2E 30 35 2C 30 39 .Q,182,000.05,09
39 35 2E 37 2C 30 37 34 2E 32 2C 2B 30 32 38 2E 95.7,074.2,+028.
35 2C 2B 30 32 33 2E 35 2C 2C 2B 30 2E 30 30 33 5,+023.5,,+0.003
34 2C 2B 39 39 39 39 38 2E 30 30 30 34 2C 30 30 4,+99998.0004,00
30 30 2E 30 30 30 2C 2B 30 34 2E 39 2C 30 30 2C 00.000,+04.9,00,
03 34 38 0D 0A 02 51 2C 31 38 31 2C 30 30 30 2E .48...Q,181,000.
30 34 2C 30 39 39 35 2E 37 2C 30 37 34 2E 32 2C 04,0995.7,074.2,
2B 30 32 38 2E 35 2C 2B 30 32 33 2E 35 2C 2C 2B +028.5,+023.5,,+
30 2E 30 30 33 34 2C 2B 39 39 39 39 38 2E 30 30 0.0034,+99998.00
30 34 2C 30 30 30 30 2E 30 30 30 2C 2B 30 34 2E 04,0000.000,+04.
39 2C 30 30 2C 03 34 41 0D 0A 02 51 2C 31 37 38 9,00,.4A...Q,178
2C 30 30 30 2E 30 34 2C 30 39 39 35 2E 37 2C 30 ,000.04,0995.7,0
37 34 2E 32 2C 2B 30 32 38 2E 35 2C 2B 30 32 33 74.2,+028.5,+023
2E 35 2C 2C 2B 30 2E 30 30 33 34 2C 2B 39 39 39 .5,,+0.0034,+999
39 38 2E 30 30 30 34 2C 30 30 30 30 2E 30 30 30 98.0004,0000.000
2C 2B 30 34 2E 39 2C 30 30 2C 03 34 43 0D 0A 02 ,+04.9,00,.4C...
51 2C 31 37 37 2C 30 30 30 2E 30 35 2C 30 39 39 Q,177,000.05,099
35 2E 37 2C 30 37 34 2E 32 2C 2B 30 32 38 2E 35 5.7,074.2,+028.5
2C 2B 30 32 33 2E 35 2C 2C 2B 30 2E 30 30 33 34 ,+023.5,,+0.0034
2C 2B 39 39 39 39 38 2E 30 30 30 34 2C 30 30 30 ,+99998.0004,000
30 2E 30 30 30 2C 2B 30 34 2E 39 2C 30 30 2C 03 0.000,+04.9,00,.
34 32 0D 0A 02 51 2C 31 38 30 2C 30 30 30 2E 30 42...Q,180,000.0
35 2C 30 39 39 35 2E 37 2C 30 37 34 2E 32 2C 2B 5,0995.7,074.2,+
30 32 38 2E 35 2C 2B 30 32 33 2E 35 2C 2C 2B 30 028.5,+023.5,,+0
2E 30 30 33 34 2C 2B 39 39 39 39 38 2E 30 30 30 .0034,+99998.000
34 2C 30 30 30 30 2E 30 30 30 2C 2B 30 34 2E 39 4,0000.000,+04.9
2C 30 30 2C 03 34 41 0D 0A 02 51 2C 31 38 34 2C ,00,.4A...Q,184,
30 30 30 2E 30 35 2C 30 39 39 35 2E 37 2C 30 37 000.05,0995.7,07
34 2E 32 2C 2B 30 32 38 2E 35 2C 2B 30 32 33 2E 4.2,+028.5,+023.
35 2C 2C 2B 30 2E 30 30 33 34 2C 2B 39 39 39 39 5,,+0.0034,+9999
38 2E 30 30 30 34 2C 30 30 30 30 2E 30 30 30 2C 8.0004,0000.000,
2B 30 34 2E 39 2C 30 30 2C 03 34 45 0D 0A 02 51 +04.9,00,.4E...Q
2C 31 38 36 2C 30 30 30 2E 30 35 2C 30 39 39 35 ,186,000.05,0995
2E 37 2C 30 37 34 2E 32 2C 2B 30 32 38 2E 35 2C .7,074.2,+028.5,
2B 30 32 33 2E 35 2C 2C 2B 30 2E 30 30 33 34 2C +023.5,,+0.0034,
2B 39 39 39 39 38 2E 30 30 30 34 2C 30 30 30 30 +99998.0004,0000
2E 30 30 30 2C 2B 30 34 2E 39 2C 30 30 2C 03 34 .000,+04.9,00,.4
43 0D 0A 02 51 2C 31 38 36 2C 30 30 30 2E 30 35 C...Q,186,000.05
2C 30 39 39 35 2E 37 2C 30 37 34 2E 32 2C 2B 30 ,0995.7,074.2,+0
32 38 2E 35 2C 2B 30 32 33 2E 35 2C 2C 2B 30 2E 28.5,+023.5,,+0.
30 30 33 34 2C 2B 39 39 39 39 38 2E 30 30 30 34 0034,+99998.0004
2C 30 30 30 30 2E 30 30 30 2C 2B 30 34 2E 39 2C ,0000.000,+04.9,
30 30 2C 03 34 43 0D 0A 02 51 2C 31 38 38 2C 30 00,.4C...Q,188,0
30 30 2E 30 35 2C 30 39 39 35 2E 37 2C 30 37 34 00.05,0995.7,074
2E 32 2C 2B 30 32 38 2E 35 2C 2B 30 32 33 2E 35 .2,+028.5,+023.5
2C 2C 2B 30 2E 30 30 33 34 2C 2B 39 39 39 39 38 ,,+0.0034,+99998
2E 30 30 30 34 2C 30 30 30 30 2E 30 30 30 2C 2B .0004,0000.000,+
30 34 2E 39 2C 30 30 2C 03 34 32 0D 0A 02 51 2C 04.9,00,.42...Q,
31 38 39 2C 30 30 30 2E 30 35 2C 30 39 39 35 2E 189,000.05,0995.
37 2C 30 37 34 2E 32 2C 2B 30 32 38 2E 35 2C 2B 7,074.2,+028.5,+
30 32 33 2E 35 2C 2C 2B 30 2E 30 30 33 34 2C 2B 023.5,,+0.0034,+
39 39 39 39 38 2E 30 30 30 34 2C 30 30 30 30 2E 99998.0004,0000.
30 30 30 2C 2B 30 34 2E 39 2C 30 30 2C 03 34 33 000,+04.9,00,.43
0D 0A 02 51 2C 31 38 38 2C 30 30 30 2E 30 35 2C ...Q,188,000.05,
30 39 39 35 2E 37 2C 30 37 34 2E 32 2C 2B 30 32 0995.7,074.2,+02
38 2E 35 2C 2B 30 32 33 2E 35 2C 2C 2B 30 2E 30 8.5,+023.5,,+0.0
30 33 34 2C 2B 39 39 39 39 38 2E 30 30 30 34 2C 034,+99998.0004,
30 30 30 30 2E 30 30 30 2C 2B 30 34 2E 39 2C 30 0000.000,+04.9,0
30 2C 03 34 32 0D 0A 02 51 2C 31 38 38 2C 30 30 0,.42...Q,188,00
30 2E 30 35 2C 30 39 39 35 2E 37 2C 30 37 34 2E 0.05,0995.7,074.
32 2C 2B 30 32 38 2E 35 2C 2B 30 32 33 2E 35 2C 2,+028.5,+023.5,
2C 2B 30 2E 30 30 33 34 2C 2B 39 39 39 39 38 2E ,+0.0034,+99998.
30 30 30 34 2C 30 30 30 30 2E 30 30 30 2C 2B 30 0004,0000.000,+0
34 2E 39 2C 30 30 2C 03 34 32 0D 0A 02 51 2C 31 4.9,00,.42...Q,1
38 39 2C 30 30 30 2E 30 35 2C 30 39 39 35 2E 37 89,000.05,0995.7
2C 30 37 34 2E 32 2C 2B 30 32 38 2E 35 2C 2B 30 ,074.2,+028.5,+0
32 33 2E 35 2C 2C 2B 30 2E 30 30 33 34 2C 2B 39 23.5,,+0.0034,+9
39 39 39 38 2E 30 30 30 34 2C 30 30 30 30 2E 30 9998.0004,0000.0
30 30 2C 2B 30 34 2E 39 2C 30 30 2C 03 34 33 0D 00,+04.9,00,.43.
0A 02 51 2C 31 38 38 2C 30 30 30 2E 30 35 2C 30 ..Q,188,000.05,0
39 39 35 2E 37 2C 30 37 34 2E 32 2C 2B 30 32 38 995.7,074.2,+028
2E 35 2C 2B 30 32 33 2E 35 2C 2C 2B 30 2E 30 30 .5,+023.5,,+0.00
33 34 2C 2B 39 39 39 39 38 2E 30 30 30 34 2C 30 34,+99998.0004,0
30 30 30 2E 30 30 30 2C 2B 30 34 2E 39 2C 30 30 000.000,+04.9,00
2C 03 34 32 0D 0A 02 51 2C 31 38 34 2C 30 30 30 ,.42...Q,184,000
2E 30 35 2C 30 39 39 35 2E 37 2C 30 37 34 2E 32 .05,0995.7,074.2
2C 2B 30 32 38 2E 35 2C 2B 30 32 33 2E 35 2C 2C ,+028.5,+023.5,,
2B 30 2E 30 30 33 34 2C 2B 39 39 39 39 38 2E 30 +0.0034,+99998.0
30 30 34 2C 30 30 30 30 2E 30 30 30 2C 2B 30 34 004,0000.000,+04
2E 39 2C 30 30 2C 03 34 45 0D 0A 02 51 2C 31 38 .9,00,.4E...Q,18
31 2C 30 30 30 2E 30 35 2C 30 39 39 35 2E 37 2C 1,000.05,0995.7,
30 37 34 2E 32 2C 2B 30 32 38 2E 35 2C 2B 30 32 074.2,+028.5,+02
33 2E 35 2C 2C 2B 30 2E 30 30 33 34 2C 2B 39 39 3.5,,+0.0034,+99
39 39 38 2E 30 30 30 34 2C 30 30 30 30 2E 30 30 998.0004,0000.00
30 2C 2B 30 34 2E 39 2C 30 30 2C 03 34 42 0D 0A 0,+04.9,00,.4B..
02 51 2C 31 38 36 2C 30 30 30 2E 30 35 2C 30 39 .Q,186,000.05,09
39 35 2E 37 2C 30 37 34 2E 32 2C 2B 30 32 38 2E 95.7,074.2,+028.
35 2C 2B 30 32 33 2E 35 2C 2C 2B 30 2E 30 30 33 5,+023.5,,+0.003
34 2C 2B 39 39 39 39 38 2E 30 30 30 34 2C 30 30 4,+99998.0004,00
30 30 2E 30 30 30 2C 2B 30 34 2E 39 2C 30 30 2C 00.000,+04.9,00,
03 34 43 0D 0A 02 51 2C 31 38 35 2C 30 30 30 2E .4C...Q,185,000.
30 35 2C 30 39 39 35 2E 37 2C 30 37 34 2E 32 2C 05,0995.7,074.2,
2B 30 32 38 2E 35 2C 2B 30 32 33 2E 35 2C 2C 2B +028.5,+023.5,,+
30 2E 30 30 33 34 2C 2B 39 39 39 39 38 2E 30 30 0.0034,+99998.00
30 34 2C 30 30 30 30 2E 30 30 30 2C 2B 30 34 2E 04,0000.000,+04.
39 2C 30 30 2C 03 34 46 0D 0A 02 51 2C 31 38 35 9,00,.4F...Q,185
2C 30 30 30 2E 30 35 2C 30 39 39 35 2E 37 2C 30 ,000.05,0995.7,0
37 34 2E 32 2C 2B 30 32 38 2E 35 2C 2B 30 32 33 74.2,+028.5,+023
2E 35 2C 2C 2B 30 2E 30 30 33 34 2C 2B 39 39 39 .5,,+0.0034,+999
39 38 2E 30 30 30 34 2C 30 30 30 30 2E 30 30 30 98.0004,0000.000
2C 2B 30 34 2E ,+04.and I try to setting in mango :
Message Terminator: \r
Message Regex: ([A-Z][A-Z][0-9]+.[0-9]+[a-zA-Z0-9]+=).\r
Point Identifier:Wind Speed=
Value Index :2
Value Regex:Wind Speed=(.)\r
but I have not get the value.Have any idea?
Attachment: download link
-
You can use a site like regexpal.com or regexr.com to try out regex queries.
Your serial dump shows hex and ASCII. You really only want/need the ASCII.
Further to that, it looks like there are only a few bits of data being repeated, so your actual serial output looks like:+028.5,+023.5,,+0.0034,+99998.0004,0000.000,+04.9,00,.4A...Q,178,000.04,0995.7,074.2,
However It doesn't look like it will be too easy to pull out the value/s you want using Regex.
[url=http://forum.infiniteautomation.com/forum/posts/list/1871.page]As I said in one of your other threads, your weather station supports Modbus, you just need to enable it in the software.
Then it will be no problem to get Mango to read it. Why don't you want to use Modbus? -
Thanks.jeremyhs.
I know modbus protocol.Because we have some kinds of device.and some kinds of device have no supported the protocol.
So I must test the serial data source. and We have not need received the data in every second.and I test again:
Message Regex:^[^\r\n]+
Message Terminato: \r
Point Identifier:wind speedValue Index:1
Value Regex:^(?:[^,]+,){2}([^,]+)result: 18:29:19: 'aa': Recieved message: ^[^\r\n]+ does not match pattern: Q,201,000.03,0990.5,072.1,+022.7,+017.4,,+0.0033,+99998.0004,0000.000,+04.9,00,4D
any idea?
Attachment: download link
-
try many times :
Message Terminator: /r
Message Regex: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+)[\s\S]+
Point Identifier: wind speed=
Value Index: 1
Value Regex: wind speed=(.*)\rrusult:
22:26:15: 'aa': Recieved message: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+)[\s\S]+ does not match pattern: Q,180,000.05,0991.0,079.0,+025.6,+021.7,,+0.0033,+99998.0004,0000.000,+04.9,00,4F
Urgent22:26:13: 'aa': Recieved message: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+)[\s\S]+ does not match pattern: Q,190,000.07,0991.0,079.0,+025.6,+021.7,,+0.0033,+99998.0004,0000.000,+04.9,00,4C
Urgent22:25:34: 'aa': Recieved message: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+)[\s\S]+ does not match pattern: Q,187,000.05,0990.9,078.9,+025.7,+021.7,,+0.0033,+99998.0004,0000.000,+04.9,00,49
Urgent22:24:34: 'aa': Recieved message: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+)[\s\S]+ does not match pattern: Q,197,000.06,0990.9,079.0,+025.6,+021.7,,+0.0033,+99998.0004,0000.000,+04.9,00,42
Urgent22:24:30: 'aa': Recieved message: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+)[\s\S]+ does not match pattern: Q,179,000.06,0991.0,079.0,+025.7,+021.8,,+0.0033,+99998.0004,0000.000,+04.9,00,44
Urgent22:22:20: 'aa': Recieved message: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,188,000.04,0991.0,079.1,+025.6,+021.7,,+0.0033,+99998.0004,0000.000,+04.9,00,47
Urgent22:22:19: 'aa': Recieved message: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: 0.000,+04.9,00,49
Urgent22:22:17: 'aa': Recieved message: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,194,000.05,0991.0,079.1,+025.6,+021.7,,+0.0033,+99998.0004,0000.000,+04.9,00,4B
Urgent22:21:42: 'aa': Recieved message: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,191,000.07,0990.9,078.8,+025.6,+021.7,,+0.0033,+99998.0004,0000.000,+04.9,00,4C
Urgent22:21:40: 'aa': Recieved message: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,212,000.05,0990.9,078.8,+025.6,+021.7,,+0.0033,+99998.0004,0000.000,+04.9,00,46
Urgent22:21:02: 'aa': Recieved message: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,190,000.05,0991.0,079.0,+025.6,+021.7,,+0.0033,+99998.0004,0000.000,+04.9,00,4E
Urgent22:20:59: 'aa': Recieved message: ^([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,195,000.05,0991.0,079.0,+025.6,+021.7,,+0.0033,+99998.0004,0000.000,+04.9,00,4B
Urgent22:17:08: 'aa': Recieved message: ^([\s\S])([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,188,000.05,0990.9,078.8,+025.6,+021.7,,+0.0033,+99998.0004,0000.000,+04.9,00,46
Urgent22:17:06: 'aa': Recieved message: ^([\s\S])([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,204,000.04,0990.9,078.9,+025.6,+021.7,,+0.0033,+99998.0004,0000.000,+04.9,00,41
Urgent22:17:05: 'aa': Recieved message: ^([\s\S])([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: 00,4C
Urgent21:42:28: 'aa': Recieved message: Q,([^,]+)[^\r\n]+ does not match pattern: Q,195,000.05,0991.1,078.5,+025.4,+021.4,,+0.0033,+99998.0004,0000.000,+04.9,00,4F
Urgent21:42:19: 'aa': Recieved message: Q,([^,]+)[^\r\n]+ does not match pattern: Q,181,000.06,0991.2,078.5,+025.4,+021.4,,+0.0033,+99998.0004,0000.000,+04.9,00,4A
Urgent21:42:16: 'aa': Recieved message: Q,([^,]+)[^\r\n]+ does not match pattern: Q,194,000.04,0991.2,078.5,+025.4,+021.4,,+0.0033,+99998.0004,0000.000,+04.9,00,4C
Urgent21:42:12: 'aa': Recieved message: Q,([^,]+)[^\r\n]+ does not match pattern: Q,189,000.05,0991.2,078.5,+025.4,+021.4,,+0.0033,+99998.0004,0000.000,+04.9,00,41
Urgent21:39:04: 'aa': Recieved message: ([^,]+),([^,]+) does not match pattern: Q,189,000.04,0991.2,078.4,+025.4,+021.4,,+0.0033,+99998.0004,0000.000,+04.9,00,41
Urgent21:38:52: 'aa': Recieved message: ([^,]+),([^,]+) does not match pattern: Q,189,000.04,0991.3,078.3,+025.4,+021.3,,+0.0033,+99998.0004,0000.000,+04.9,00,40
Urgent21:38:48: 'aa': Recieved message: ([^,]+),([^,]+) does not match pattern: Q,193,000.03,0991.3,078.3,+025.4,+021.3,,+0.0033,+99998.0004,0000.000,+04.9,00,4C
Urgent21:27:09: 'aa': Recieved message: ^([\s\S])([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,201,000.04,0991.1,077.9,+025.3,+021.2,,+0.0033,+99998.0004,0000.000,+04.9,00,42
Urgent21:25:36: 'aa': Recieved message: ^([\s\S])([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,195,000.06,0991.3,077.9,+025.3,+021.2,,+0.0033,+99998.0004,0000.000,+04.9,00,4C
Urgent21:25:33: 'aa': Recieved message: ^([\s\S])([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,195,000.05,0991.3,077.9,+025.3,+021.2,,+0.0033,+99998.0004,0000.000,+04.9,00,4F
Urgent21:24:49: 'aa': Recieved message: ^([\s\S])([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,186,000.05,0991.0,077.9,+025.3,+021.2,,+0.0033,+99998.0004,0000.000,+04.9,00,4E
Urgent21:24:44: 'aa': Recieved message: ^([\s\S])([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,189,000.06,0991.0,077.8,+025.3,+021.1,,+0.0033,+99998.0004,0000.000,+04.9,00,40
Urgent21:18:58: 'aa': Recieved message: ^([\s\S])([A-Za-z]),([\d.]+),([\d.]+),([\d.]+),([\d.]+),([+\d.]+),([+\d.]+),,([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([+\d.]+),([^\r\n]+) does not match pattern: Q,188,000.04,0991.3,077.7,+025.3,+021.1,,+0.0033,+99998.0004,0000.000,+04.9,00,4F
Urgent21:18:16: 'aa': Read failed because port is not configured correctly
Urgent21:18:16: 'aa': Serial Port COM11 failed with error jssc.SerialPortException: Port name - COM11; Method name - openPort(); Exception type - Port busy.
Urgent21:18:15: 'aa': Read failed because port is not configured correctly
Urgent21:18:15: 'aa': Serial Port COM11 failed with error jssc.SerialPortException: Port name - COM11; Method name - openPort(); Exception type - Port busy.
Urgent21:18:12: 'aa': Read failed because port is not configured correctly
Urgent21:18:12: 'aa': Serial Port COM11 failed with error jssc.SerialPortException: Port name - COM11; Method name - openPort(); Exception type - Port busy.
Urgent21:17:20: 'aa': Read failed because port is not configured correctly
Urgent21:16:38: 'aa': Serial Port COM11 failed with error jssc.SerialPortException: Port name - COM11; Method name - openPort(); Exception type - Port busy.
Urgent19:41:29: 'aa': Recieved message: [.\d+#]+(?=,) does not match pattern: Q,181,000.03,0990.6,075.9,+024.4,+019.9,,+0.0033,+99998.0004,0000.000,+04.9,00,4C
Urgent19:27:02: 'aa': Recieved message: [.\d+#]+(?=,) does not match pattern: Q,187,000.04,0990.7,076.2,+024.2,+019.7,,+0.0033,+99998.0004,0000.000,+04.9,00,4C
Urgent19:26:44: 'aa': Recieved message: [.\d+#]+(?=,) does not match pattern: Q,210,000.04,0990.7,076.3,+024.2,+019.8,,+0.0033,+99998.0004,0000.000,+04.9,00,4F
Urgent18:29:19: 'aa': Recieved message: ^[^\r\n]+ does not match pattern: Q,201,000.03,0990.5,072.1,+022.7,+017.4,,+0.0033,+99998.0004,0000.000,+04.9,00,4D
Urgent16:30:23: 'aa': Read failed because port is not configured correctly
Urgent16:30:23: 'aa': Serial Port COM11 failed with error jssc.SerialPortException: Port name - COM11; Method name - openPort(); Exception type - Port busy.
Urgent16:29:43: 'aa': Read failed because port is not configured correctly
Urgent16:29:43: 'aa': Serial Port COM11 failed with error jssc.SerialPortException: Port name - COM11; Method name - openPort(); Exception type - Port busy.any idea?
-
Do you understand what a regex is and how it works?
-
Sorry,I know a little .
-
The closest I can get (though trial and error basically) is this:
/(\d*\.)\d{4}/
Using your provided sample, it matches '0.0033' which I think is your wind speed (?).
This is too hard for me, I will have to leave this one for someone else. I can't help you anymore, good luck.
-
Thank you for your precious time for the test and thanks again!!!