LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Differents between open csv file by mannually and program automatically?

Dear great master

I haved been consfused by a problem deeply.
Why a csv file if already open can be detected by mannually. can't be detected by program automatically.


I verify this phenomenon by below procedure:

First:

 Execute <simple_ErrCode_modify_by_NI2.vi>  at both computer respectively.then open csv file mannually,thus two programs both can detect the csv file already

open. also can enter case5 and wait case5's loop.


Second:
 Compare with First produre.firstly,execute <simple_ErrCode_modify_open_csv_atloop1.vi> in one computer , Adding while loop  after open/creat/replace file ,thus

 can maintain csv file open all the time.
 secondly,execute <simple_ErrCode_modify_by_NI2.vi> in the other computer.I find that <simple_ErrCode_modify_by_NI2.vi> cann't enter case5.


  Through above,

 I confused that why program can detect csv file already open by mannually.
 cann't detect csv file already open by the other pragram open.
 
Why have thus two kinds of mechanism in labview .

  Can who great master help me and answer me .

mentioned program attached.


 Thanks earnestly.

0 Kudos
Message 1 of 4
(2,458 Views)
If I understand your question, the answer lies in the access programs request when they open files. First, a program can have read-only, write-only or read-write access. Second, they can specify exclusive or nonexclusive access to a file. If a program requests and get exclusive access to a file, no other process can open it for any reason.

Now when you open a file manually, what you are really doing is opening it using the default program specified in Windows. So its a matter of how that program opens files.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(2,411 Views)

Why are you re-posting this question?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 4
(2,401 Views)

 

Dear mikeporter

 

thanks for you help kindly.

Just as  you said ,

 

When a program requests and get exclusive access to a file, no other process can open it for any reason.

 

According to your mention.

 

I have realize the function .

 

Thanks

0 Kudos
Message 4 of 4
(2,370 Views)