Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Remanent data storage on RT target.

Hello everyone,

 

An RT target (desktop PC) is running a machine vision inspection. The number of inspected and failed parts are counted. My problem is to keep this data in case of power loss.

I guess that my only chance is to write this two values to harddisk from time to time so in case of power loos or pc restart I can read the last written values and use them as initial values.

 

If we don't take into account access time to harddisk, I am concern about the physical stress to HD of re-writing these  two values over and over again.

 

- Am I writing to the same physical sectors of the HD everytime?. I think this can be dangerous.

- How often should  I save the data?

 

Any alternative idea is wellcome.

 

 

Thanks in advance. 

 

 

 

0 Kudos
Message 1 of 4
(3,890 Views)

 


Am I writing to the same physical sectors of the HD everytime?. I think this can be dangerous.

 

 


What is the physical sector mean?

 

 

The datarecording to hard disk can be done in a low priority loop than in the loop that does primary task.  Just pass the data in a queue and write the data in other loop.  Take care to flush the data in regular intervals @ 5000ms approx to ensure that data is written into hard drive.

 

Hope this helps.

 

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 2 of 4
(3,872 Views)
 

It's you are writing in the same physical sector if you are REwriting the same amount of data (same data type, format and value range) in a file every XXX seconds. If you want to be sure you are writing in different HD position, delete your actual file and generate a new one each XXX minutes.

 

Another option can be create a logging of values instead of just a single value. I mean, write a list of data instead of a single data in the file. After XXX lines, open a new file and delete the old one (or just delete the old one and star again).

0 Kudos
Message 3 of 4
(3,868 Views)

It's pretty hard to wear down a harddisk by re-writing the same sector. Harddisks also run sanity checks and will automatically exclude defective sectors, so the next re-write would go to a sane sector if the existing one appears to be damaged.

 

Herbert 

0 Kudos
Message 4 of 4
(3,858 Views)