using PWM outputs after setting the value, is there a way to read what was sent?

Sembazuru:
The first issue that I see with your analogOutputReadPWM() function is it never actually returns val when it completes. I haven't dug into the Arduino AnalogWrite() function to know if any of the other logic is correct, but conceptually reading the register that is controlling the hardware PWM pin is the way to go if you really don't want to remember what value you sent to AnalogWrite() as a global variable and report the contents of that global variable.

I suppose your method would be simpler if one has a 3rd (or even 1st) party library that controls PWM and one doesn't want to bother modifying libraries, and locally maintaining one's fork of the library over updates to the effected library.

P.S. My apologies if I should have used "affected" instead of "effected"... This is one of the grammar rules with which I always have issues.

Thank you for pointing that out I have corrected in my above code it uniquely enough it worked either way but correctness is more important than details.
I am planning on placing this function in my web page library to allow for simplicity I just need to know what is happening with the arduino. I have i'm mind using a GPS to feed a PID routine to control my H-bridges to drive my tank style rover and so I need to know what is happening, the PID is making changes multiple times a second and I only need to see what is generally happening every 5 seconds or so.

I have been running the sketch on my UNO for a while now with excelent results:

Lets set the PWM Value to:119
My PWM Value is:119
Lets set the PWM Value to:42
My PWM Value is:42
Lets set the PWM Value to:26
My PWM Value is:26