Error code 7 is "File Not Found". So use WebDAV or FTP to put your text file where you expect it to be.
.Yes,I had saved both the file and the text document in the folder containing LabVIEW
Folder containing LabVIEW?
Is that folder on the myRIO?
I don't know what LabVIEW folder you are talking about.
in case this is not clear yet, your myRIO-VI is not running on your development machine,
so any file references must be local to the myRIO file system structure.
also you have to make sure you are in a read/writeable directory for the 'lvuser' ( i am guessing that myRIO and cRIO run the same linux), but that should be if you move your files via webdav/ftp onto the myRIO.
i did use the "/c/" path and created a subdirectory there, for file writes from my VI.
also, move the file open and close outside the loop, unless you really need that, like changing the file or something while the loop is running.
if you have an active subscription, i recommend you to take the two real-time courses.