Software based elapsed time meter on Rx3i

Ozpeter

Member
Join Date
Aug 2014
Location
Virginia
Posts
124
For better or worse the project I am working on has specified several equipment elapsed time meters that are supposed to have their values displayed on an HMI, but don't have any hardware interfaces - so apparently they are meant to be purely software based.

So I am looking for ideas for a persistent software based elapsed time meter that runs on an Rx3i PLC and also has a Cimplicity based HMI.

My experience tells me that anything that is Rx3i based is subject to being written over when someone does a download. (yes, you could specify a policy of don't download initial values - but you can't enforce that). But it may be that I don't know everything about an Rx3i. So is there any hidden corner of operation that would allow for a persistant software defined elapsed time meter?

Another alternative is to leverage the database in the HMI to accumulate time. But that requires a working HMI system to record the data - And a working HMI is not a requirement for the equipment to operate.

Any suggestions on things I might have missed?

Yes I know you can buy Ethernet connected elapsed time meters for only relatively small $$$, and I suggested doing this when I understood the consequences of the requirements - but that idea was shot down (and stupidly too IMHO)
 
Check out SVC_REQ commands 56 and 57. They are software-driven read and write to and from non-volatile memory. I'm not sure if they put values in a memory area separate from initial values or if they just overwrite the initial values. You'll have to do some testing to see.
 
Check out SVC_REQ commands 56 and 57. They are software-driven read and write to and from non-volatile memory. I'm not sure if they put values in a memory area separate from initial values or if they just overwrite the initial values. You'll have to do some testing to see.

That looks like it might do it. However the documentation insists that the use case for these requests is for set points etc that need to be maintained over a power cycle, and that it shouldn't be used for values that change frequently.

So I like the idea, but my lack of experience with it makes me nervous.
 
The reason for the caution is because it writes to flash memory which is limited to a finite number of read/writes. Off the top of my head I don't know what that number is, but you can look it up and adjust your schedule of using it to back up your data accordingly.
Also click the "Options" tab of the navigator window and under the "Ladder" item look at the "Confirmations". You can prevent downloads of retentive initial values. That alone won't prevent a determined person changing the settings you establish, but it adds an extra layer of protection against inadvertent changes.
 
The reason for the caution is because it writes to flash memory which is limited to a finite number of read/writes. Off the top of my head I don't know what that number is, but you can look it up and adjust your schedule of using it to back up your data accordingly.
The documentation mentions a 100k erase cycles. And an erase cycle is defined as:
  1. Write to flash is commanded from the programmer
  2. Clear flash operation
  3. Flash compaction after a power cycle when flash memory allotted for SVC_REQ 57 has become full.
So I am not 100% clear what that means in terms of my use case. However 100k writes at once per minute is only 70 days.

I could limit my writes to last scan cycle which would extend the flash usage almost indefinitely as the machines will hardly ever be powered down. But that makes me nervous too.
 
Check out SVC_REQ commands 56 and 57. They are software-driven read and write to and from non-volatile memory. I'm not sure if they put values in a memory area separate from initial values or if they just overwrite the initial values. You'll have to do some testing to see.

Some additional thoughts on this after testing.
  1. The Rx3i has 64kB of Flash.
  2. When new data is written to Flash, it doesn't overwrite the old data, instead it retains the old data and writes to a new location - which subtracts from the amount of free space
  3. When the Flash becomes full further writes will fail
  4. It requires a manual intervention to compact the Flash to release old, previous copies of data
So if I accumulate time in %R data during a normal sweep and then wrote it to Flash at a fixed interval, depending on the interval I can fill the flash up very quickly. But if I chose a longer interval I can extend the lifetime at the risk of losing that much data if the PLC crashes/fails in a manner that precludes writing to flash.

In my use case I only have 4 counters that I want to persist to Flash and if I wrote them to Flash every 48 hours I could extend filling up the Flash for 30 or 40 years. Not too shabby, but then again a Flash based system won't be saved by a CPU card being replaced.

While this solution does have some merits, it really rubs me the wrong way as I feel elapsed time meters need to be 100% reliable and shouldn't be open to being manipulated.
 
It sounds like your best bet would be a combination of the HMI's logging capability and the PLC's flash memory. Under normal conditions let the HMI handle logging the elapsed time meter values and don't bother writing to flash memory. Provide a two-way handshake between the PLC and the HMI so the PLC knows when the HMI is not communicating it When that is the case, activate your flash storage strategy. Keep track of the number of writes to flash. Once HMI communications get restored, do what you need to make sure your elapsed time data is still accurate. If the count of flash writes is high enough display an alert on the HMI that flash memory cleanup is required.

Just out of curiosity, what would your ideal solution look like?
 
It sounds like your best bet would be a combination of the HMI's logging capability and the PLC's flash memory

It's headed that way. But theoretically as long as the battery in the PLC works and I get notification of last scan I shouldn't to write continuously to flash - but I'm being paranoid about the whole thing as the customer is, how can I say it?, insistent on having exactly what they say they want and I have been burnt already by them.

Just out of curiosity, what would your ideal solution look like?

If I had a choice I'd install something like this (first link I saw on Google)
https://www.amazon.com/Linortek-Network-Hour-Meter-Industrial/dp/B01ELTSV42
 

Similar Topics

Looking for advice/experience with PC based HMI software? We are starting to put a PC in our control systems. I would like to use the monitor as...
Replies
28
Views
9,113
Hello PLCS.net! I have a server running with FactoryTalk activation manager on it. I activated a RSL5000 license on it, and can borrow/return...
Replies
2
Views
1,912
Howdy Folks Can anyone recommend some good software for PC based SCADA/HMI. Looking to run a plc either solely from desktop PC. Cheers
Replies
17
Views
7,884
I would like to turn on a bit with IAI software based on the value of a variable. I can do it with one CPEQ statement. It works great. I just need...
Replies
1
Views
2,811
where can you purchase low priced hmi pc based sw that will comm with various plc"s. :scratch:
Replies
3
Views
1,892
Back
Top Bottom