cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Timestamp accurate to millisecond

Former Member
0 Likes
599

Hi,

Can somebody tell me how to generate a timestamp (for eg. datenow) accurate to the millisecond in MII 12.0? Appreciate it.

Chanti.

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Likes

Unless you cast your date as a string and get the milliseconds into the format you will not see it in MII. A typical SQLDataType of 93 shows a date in the following format: yyyy-MM-ddTHH:mm:ss which is only accurate to the second.

Former Member
0 Likes

Thanks. My scenario is to calculate the time lapsed between when the tag value was generated by the PLC and when it showed up on the display screen. I am integrating the OPC server with xMII through PCo. My requirement is -

i) to capture the time when the value was generated by the PLC (millisecond) and

ii) when it showed up on the display screen (millisecond)

Chanti.

jcgood25
Active Contributor
0 Likes

MII is not a SCADA system, it is a web based application. Timing accuracy in seconds should be considered good, but worrying about milliseconds might be a bit rediculous. Is the user staring at the browser waiting for OPC updates via PCo?

Former Member
0 Likes

Jeremy's Point is quite valid, In addition to this, your proposed application would break down in other areas, for one, If your sending a timestamp from you PLC, chances are, the clock on it will be off by a certain percent (they almost always are to some degree) If your getting your timestamp from PCo, then its timestamp will be from the server that its installed on, finally your screen update time would be the time from the local system clock of the client. So you have potentially 3 clocks here. When your dealing in milliseconds, chances are that the clocks will be out of sync and your result will be meaningless.

Sounds like what you need is a SCADA system, And most of the major players now have web components now for there SCADA layers that can be interlaced into MII quite easily.

Former Member
0 Likes

Jeremy/Doug - I'm not sure I agree.

Internally, MII can keep timestamps down to millseconds or smaller. In many applications, such as utilities or high-speed production processes, this information can be invaluable for troubleshooting. I think it would be valuable to propagate this information through MII. The ISO 8601 date format supports fractional seconds, so it is technically quite possible.

I think this is worth consideration for a future release.

Former Member
0 Likes

Yes, you are right...the user will be staring at the MII (or to be precise MES) screen for OPC updates via PCo. How to guage the reponse time in such a scenario? Do we have to have 2 physical entities (lets say one 'across the pond' and one here) testing the scenario? The servers may be located in different timezones.

Chanti.

Answers (0)

Ask a Question