ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Linux, embedded PC!

I am working using Labview over Linux, and my problem is that I was using the Open File function(deny write/read) to control when someone was writing or reading the file.
But this function doesn work in Linux, although you canb open a file one hundred times that this function doesn't give an error, if you do this in Windows this fucntion works properly!
So to control if someone is using a file I have different options:
-Using semaphores. It is not a good solution becuase the processes that are using the file are independent, and I don know what kind of variable I can use to comunicate each other.
- Using a flag file. It is not a good option because I am using a embedded pc and the flash has a limited numbers of writing, so I must avoid wr
ite!

Do you have other solution?

Thanks in advanced!

Graci
0 Kudos
Message 1 of 3
(2,996 Views)
hi Graci,
first you can try to use the "Lock range" - function, maybe it works under embedded linux (see attachment). another solution could be to bundle all file-operations into one single vi, which stores the current owner of the file in a unitialized shift-register and inhibits all other accesses (will work only if ALL processes can use this one VI).

greetings
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 2 of 3
(2,996 Views)
Hi Graci,

Me again. Could you attach a sample of your program?
0 Kudos
Message 3 of 3
(2,996 Views)