on ‎2009 Oct 09 9:18 PM
Hi,
Can somebody tell me how to generate a timestamp (for eg. datenow) accurate to the millisecond in MII 12.0? Appreciate it.
Chanti.
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
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.
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.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.