Hi Alexx,
You can get descriptions of the error in LabVIEW by going to Help >> Explain Error.
Here is what it said for your error:
Error -200279 occurred at an unidentified location
Possible reason(s):
Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
---------------
Where are you getting this error? I see that in your attached code that you have some subVIs missing.
---------------
However, you mentioned another error in your block diagram:
Error -200301 occurred at an unidentified location
Possible reason(s):
Cannot update the Pulse Generation property.
The pulse generation with previous property settings must complete a full cycle before the property can be updated.
---------------------
I would suggest not having the PWM stuff in a subVI. I'm guessing that you have a while loop in your PWM subVI. So what is happening is your LabVIEW code is entering the PWM subVI and then it stays in the loop. The program will not return from the PWM subVI until the loop inside it stops. This means that the loop in the main program does not execute until the PWM subVI is done. If this takes awhile, you will lose datapoints and get errors from the analog input VI.
Here is what I suggest:
1) put both tasks in the same VI (the top level main VI)
2) have the task setup outside the while loop
3) have both task's continuous stuff (DAQmxRead and the PWM's while loop stuff) inside the same loop
4) then have both stop/clear tasks on the other side of the loop
-Sal