As I wrote before
There is no different code in the two circumstances. All the code does is match whatever it is given to the start of the incoming sentences so if "$IIMWV" matches but "$IIMWV,R" doesnt there are sentences arriving prefixed with $IIMWV" but no sentences arriving prefixed "$IIMWV,R". Note that the comparison is case sensitive.
I think we both may have made some incorrect assumptions and realise why the ,R and ,T circumstances aren't working.
I didn't take your instructions as being so literal and thought the character after the comma was being used as a search term for the remainder of the sentence. The R or T don't in fact occur immediately after the sentence identifier field.
The actual sentence structure is as follows:
$--MWV,x.x,a,y.y,b,A*hh<CR><LF>
where
x.x is a variable length numeric field for wind angle
a is a single character R or T
y.y is a variable length numeric field for wind speed
b is units K or M or N
A is status, A = valid
hh is hex checksum
Clearly, simply matching a string isn't going to work to select the specific R or T sentence.