SHARE.EXE


Recommended Posts

Hi,

I log my channels to a .txt file, and read them from another program(flash player).

and, there is following fault in Daqfactory:

F0011 SHARE.EXE was not loaded, or a shared region was locked.

And, my write sequence is stopping.

what is the SHARE.EXE?

And, while my sequence is writing, can I read these channels at the same time?

Thank you..

best regards,

Link to comment
Share on other sites

Share.exe is a file from the first versions of DOS. I'm not sure why windows still uses that error message and not something a little clearer. Basically, DAQFactory has the file open and locked and so you can't read it from another program while the file is open. How are your writing the file in the sequence? Using the File. functions? If so, make sure and Close() the file when you are done.

Link to comment
Share on other sites

I wrote following scripts.

And, at the same time to show on the web, I am reading that text file.

while(1)
   Private FileHandle = File.Open("D:\DaqFactory\ariza\Kazan_arizalar.txt",0,1,1,1)
   Private string strText = DoubletoStr(Mychannel[0])
   File.Write(FileHandle,strText)
   File.Close(FileHandle)
   delay(2)
endwhile

Link to comment
Share on other sites

I'm not sure. To test, I stripped off the while/endwhile, changed the directory to something on my machine and ran it. The file was created and I was able to open it in notepad to view and edit it. I modified the file and saved the document proving that DAQFactory wasn't holding the file exclusively. Perhaps your other app is trying to access the file exclusively using some older windows method, which would also explain the SHARE error. I also do not know how quickly windows releases files when it closes them. It may take a second, especially if your sequence is running at priority 5 (maybe try 0), and thus the file is really kept constantly open because of the loop.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.