How can I show data(like 2004-03-12) on OP-17 Siemens

Valera

Member
Join Date
Jan 2004
Location
Saransk town Russia
Posts
147
I'm sorry, maybe you will say to me "read for manual" or "it's obvious", but now I must read very very much information (furthermore now I even must learn quantum physics for pass examen).
My question: how I must correctly show data type Data-and-time or Data 2004-03-12 on display of OP-17.
I know I can "BTI and there will be" but maybe there is more correctly way for it.
 
I took a quick look at Pro Tool, and couldn't see a way to define a tag of type Date_Time, so I think the easiest thing would be to break it into the individual components and make three tags of type INT. But, there is then the possibility that they would be difficult to line up on the screen properly. If so, you may want to format a string in the PLC and create a sting tag in the OP. You would have to convert the values to ASCII and insert the "-", but it would certainly work.
 
There is a simple way to display the date that the OP17 uses internally.
Define an output field and specify Usage as "Date" (not "tag").
Unfortunately it appears that the format is limited to DD.MM.YY.
So you cant get the YYYY-MM-DD that you are after.
 
I think in this case (based on his other threads) that Valera is diplaying historic data from the PLC, so he's not trying to display the current time.

ProTool has always lagged just a bit behind S7 when it comes to functionality, and it's unfortunate that it can't support tags of more data types.
 
OK, now I understand.

PLucas wrote in THIS thread:
"You will have to split the 8 bytes up into single bytes, then the info is as follows:

1st byte = Year
2nd byte = month
3rd byte = day
4th byte = hour
5th byte = minutes
6th byte = seconds
7th byte = milliseconds
8th byte = milliseconds (4 MSB's) and day of the week (4 LSB's)

The day of the week starts at sunday, so sunday = 1, monday = 2 and so on until saturday = 7.

These bytes are in HEX, so you will have to convert them to INT in the DB, just declare the TYPE as INT."

So it should be possible to extract the year, month and day from bytes 1, 2 and 3.
 
Jesper,

one small (but significant) correction: the values are not in HEX but in BCD.

The year is only given with two digit, the range is from 1980 to 2079 I believe. So 80-00 is for the 20th century, 01 to 79 is for 21st century.

Kind regards,
 
I know, I can show DT-time by converting 1 byte BTI to year etc. But maybe if I present on panel OP information in type:1 byte in HEX, and (becouse this value is BCD like 16#4) then I will save some place of memory. Is not it?
 
Valera, that is correct. Specify the display format as HEX, and a BCD coded byte variable will display correctly (00-99). (I guess thats where PLucas little mistake came from).
You will have to add a "20" in front of the year address. I guess your program doesnt have to be pre year 2000 compliant.
 

Similar Topics

If I have a PanelView Plus, is it possible to show historical data via historian on it? I have the application all setup in FT Studio Machine...
Replies
3
Views
507
Hello, I have an array [1..40] where the last 40 steps of a sequencer are saved. I need a table: Step number | Step name | Runtime step | Runtime...
Replies
7
Views
5,432
We want to monitor a program tag and display the time and date and value on our HMI screen. I have put the tag into a Data Log Model, and...
Replies
3
Views
1,762
Is there anybody know why Histrend do not display the trend (i had sticked LOG DATA )? The current value of sensor is still display, if you've got...
Replies
1
Views
1,093
I am developing project for wincc flexible 2007 runtime on a PC. I have a licence of 128 tags rt,and archives. My customer wants to log data at...
Replies
1
Views
5,836
Back
Top Bottom