The error message is pretty clear: "Device identifier is invalid". Have you checked in MAX that you have a DAQmx device called 'Dev1' under 'Devices and Interfaces'?
If that doesn't solve it - you need to post a lot more information and your code.
LabVIEW Champion, CLA, CLED, CTD
(blog)