Is there a better way? (storing dates)

rankhornjp

Member
Join Date
Dec 2008
Location
Georgia
Posts
241
I have 9 tanks that are measured manually and then the measurement is entered into WonderWare and is displayed on the tank graphic. Supervisor wants a time stamp on each tank displaying the date and time the value was updated.

My solution:

Using a data change script, I move the PLC date/time to the Tank date/time whenever the measurement is changed. However, this uses 5 register numbers per tank (Month, Day, Year, Hour, Min).

Is there a way to do this that doesn't use up so many register numbers? I'm running short (about 100 left) and I don't know when I'll be able to stop the processor to increase my numbers. (Plant is a 24hr/day operation)


Processor: Modicon Quantum 652 60
HMI: WW 2014 (Version 11)
 
I once rolled my own using floats. With the HMI I was using, it was pretty easy to make them look right on screen. In the PLC I added some logic to calculate the real number something llike:

YYDDMMHH.MMSS

This made things easier on the comms than using strings or a bunch of new tags. I went to this trouble because comms were pretty heavily loaded and I was going through a NET-ENI module (bottle necked at 19.2k).

Just an idea.
 
I once rolled my own using floats. With the HMI I was using, it was pretty easy to make them look right on screen. In the PLC I added some logic to calculate the real number something llike:

YYDDMMHH.MMSS

This made things easier on the comms than using strings or a bunch of new tags. I went to this trouble because comms were pretty heavily loaded and I was going through a NET-ENI module (bottle necked at 19.2k).

Just an idea.

I've done that, too. Year*1,000,000 + day*10,000 + month*100, etc...
 
Why does the date have to come from the PLC? Let Wonderware furnish the date and time. Why does the date have to be stored in the PLC?

Encoding dates and times isn't hard, but it still takes a lot of extra steps and you have to encode and then decode.

There are several methods.

1) Use a julian date, or ordinal date. Instead of storing the month, you store the day of the year. Instead of storing the hour, you store the minute of the day (1440 minutes in a day) This saves you two words. See this http://www.plctalk.net/qanda/showthread.php?t=22008 and this http://www.plctalk.net/qanda/showthread.php?t=34242

2) Store the number of seconds from an ordinal date. A 32 bit integer is good for about 70 years. That saves you three words.

3) Pack bits. If you store only two digit years then you can store the year in 7 bits, the month in 4 bits, and the day in 5 bits of a 16 bit word. Then save the hour in the upper byte and the minute in the lower byte of another 16 bit word. This saves you three words.

4) Store it like Excel does, as a float. That saves three words.

Frankly, its a lot of work to save a tiny bit of space when your HMI has the tools already.
 
Why does the date have to come from the PLC? Let Wonderware furnish the date and time. Why does the date have to be stored in the PLC?

Letting WW furnish the date and time is ok.


It needs to be stored in the PLC because it (date/time) will be used by another PLC/WW application.

If you know another way.......
 

Similar Topics

Good Afternoon , It seems like we always have problems with using Type J Thermocouples with our slip rings . Would using a RTD at 10...
Replies
6
Views
1,634
I am beginner in B&R Automation Studio and TIA Portal. Have an experience in electrical part of PLC cabinets. Now its time to get a new skills...
Replies
8
Views
1,662
Bla Bla Bla, why doesn't it work, l need help and l don't understand PLC's. Or better they understand everything, but can't understand +1 -1 = 6...
Replies
22
Views
6,000
I rarely need to add a network card to the drives we install... very rarely. But my sales-guy said he needs to quote a network-connected ACH580...
Replies
6
Views
2,584
I'm currently on a research project where I can send tag read & write requests to both SLC as well as CLX controllers. Presently, there's no...
Replies
8
Views
2,406
Back
Top Bottom