Hi,
There are a few things that could help you here.
First thing here is the fault code descriptions in carsoft are not always good. If you can post the code number along with the car details (last 7 digits of vin) I will give you a detailed description.
Vanos units can jam mechanically and this could well be your problem. Do you know of any recent history, eg head work?
The vanos is actuated by a solenoid which simply opens a valve to allow oil pressure act on the vanos unit. It is possible to get bits of carbon blocking this. The method to test this is to replace the oil feed with an air feed and measure the movement of the vanos unit.
If the code you have is correct then this is generated because the ECU has commanded the vanos and so expects to see the Cam position change, but it does not, or does not change the correct amount. It measures this by looking at the Cam and Crank positions as reported by the cam and Crank sensors. With the right scantool connected it is possible to watch the reported Cam position when it plays up compared to when it is ok.
A code for this fault will not be generated by an airmass or compression problem as these do not effect cam position.
The best course of action here is to note the code, clear it, drive until the fault occurs, check live data when it is happening, and check that the same code reoccurs. If it is the same code then check the actual vanos unit.
HTH
Alan