Read Only XP HMI with EWF

K

Thread Starter

Ken Emmons Jr.

Hello,

I'm contemplating installing EWF on a commercially available HMI running Windows XP OS off of a Compact Flash card. I've been reading that the Windows XP Enhanced write filter (as delivered with Embedded XP) can be deployed on a full Windows system to enable a read only filesystem, thereby preventing file corruption, etc. Has anyone experience with this? Here are some questions:

- Will EWF protect from a regular power loss? I would prefer to just kill power to my PC in this application in order to shutdown.

- In some documentation I read it seems that you have to reboot after making the system write-able. Is this true? I might need to do this to make changes and upgrades to the HMI.

Thank you,

~KEJR
 
M

Michael Griffin

I haven't used EWF, but I have done this sort of setup with Linux and I think the basic technique would be similar with both (although they differ in details).

What I think you really want to do is to partition the CF card into two partitions. Make one read-only and put MS Windows XP Embedded on that. Make the other partition read-write, and put the MMI data that you want to be able to change on that. I imagine this would be the screens, configurations, etc. Make sure that MS Windows is writing it's various temporary files into RAM disk and not into the read-write flash partition.

A number of Linux distros use this technique to get a version which is bootable from a USB flash drive, but still has writable storage. With Linux, remounting drives on the fly to change between read-write and read-only is routine, but people still prefer to use the two partition technique for USB flash drives or CF.

One possible problem with what you would like to do is that upgrading the MMI software itself will probably mean making a new image and doing the whole installation over again. I mention this as a "problem", but I don't know if this is really a concern for you. You can buy flash drives that emulate a regular hard drive and use wear levelling algorithms to prevent wearing out one area of flash too quickly. I don't know if these would work with the MMI panel that you are thinking of using.

There isn't a simple solution to the power loss problem though. Most operating systems buffer up data before writing it out to disk. Even if you can prevent the buffering, it is possible the power may go off in the middle of a write. If writing is only happening when you are making an occasional change, then perhaps this really isn't a problem. With Linux, a "sync" command flushes everything out to disk. There might be something equivalent to this for MS Windows.

If it is a problem, then I would suggest a small UPS. Configure the UPS to send a shut down signal to the PC when power has been off for more than a few seconds. Check the power consumption of the MMI panel in order to size the UPS correctly. Get a UPS that is bigger than your minimum requirements, as the batteries will decline over time. Also, the UPS will need to cover several consecutive power interuptions as the batteries may not have time to be recharged before power is lost again.

If you use a UPS, take a good look at the software that comes with it. Most newer small UPSes use a USB connection instead of RS-232. The RS-232 UPS driver that came with MS Windows XP was written by APS (a UPS manufacturer) and worked quite well. The USB version though appears to have been written by Microsoft and is completely useless for this sort of application. All of the third party ones that I have seen are unfortunately either overly complex or don't have the required functionality. Perhaps someone else could make a suggestion for this.
 
K

Ken Emmons Jr.

Hello,

Thanks for your reply. I have done the read only trick with Linux as well. It's much easier than Windows. :eek:)

Supposedly the EWF is supposed to buffer all writes to RAM, which essentially makes your flash disk a read only partition. If you loose power you really don't stand a chance to corrupt your disk.

I can do a shutdown over Ethernet, perhaps, but in some circumstances operators will be doing a hard power down via a main power switch for this machine. I'd just like to help insure that the disk will not change over time.

Updating of the HMI software might not be an issue. I've read that you can configure the EWF to once again be writeable (via command line or API interface), and issue a reboot to make changes. The reboot is probably the worst of it.

I'm also considering HMI on a dedicated Mitsubishi panel (we use Mitsu PLCs) and have a Windows based display panel just displaying our Cognex images. I'm also looking into a dedicated Cognex display, which they just came out with. It will probably be more expensive, but drop right in.

Thank you for your advice.

~Ken
 
Top