Splitting data from msg.payload

Okay, then I'll spoil you with the solution, with an explanation on the how (I'm sick and bored and that's the excuse I'll use for it today :P):
What you're going to need is a function node, after your serial node. From what I remember from seeing this node, there is a configuration option that lets you trim off the whitespace, by selecting the return type or something like that. If it's there, select carriage return line feed or enter \r\n if it is an input. If it's not present there, you will have to add it to the function node as well. As for the code, let me show you the input message again, but simplified:

msg = {
    payload: "PPV\t7\r\n"
}
msg = { 
    payload: "VPV\t35790\r\n"
}

These are the two messages you posted in the first post. For the first one you would like the value 7 as output, for the second 35790. In the current shape, the msg.payload is a string. Meaning you can call the split() method on it directly. The separator you want to split it on is the tab part of the whitespace, that is the horizontal arrow. In a string that tab is displayed as \t. So to split you take msg.payload.split('\t') and now you have an array with in the first item the VPV or PPV string, and in the second the value followed by the ending whitespace. To get rid of that whitespace, you take the value and call .trim() on it. You could also flip those around, first calling .trim() to get rid of the whitespace at the start and end, then on the result from that split on the tab in the middle.

var stripped = msg.payload.trim();
var values = stripped.split('\t');
// As you are only appear to be interested in the value, 
// use [1] to access the actual value. The array is zero-indexed, meaning
// that the first item is [0], and the second is thus [1].
msg.payload = values[1];
return msg;

If you put that in a function node, it gives you the value, but still as a string. If you need it as a number, you have three options, more or less:

  1. for a whole number, an integer: msg.payload = parseInt(msg.payload, 10); // 10 as in base 10, a decimal number
  2. for a decimal number, or rather a floating point: msg.payload = parseFloat(msg.payload);
  3. if you don't know if it's a decimal or whole number, or if you want it to fail if there's still text in it: msg.payload = Number(msg.payload); If it has any text in it that makes it's unable to get a number, you will get NaN instead: Not a Number.