iFix OPC communication

S

Thread Starter

Sreeni T S

We are collecting data to Intellution iFix from an Alstom relay (P141) through OPC. A third party software acts as an OPC server that fethces data from the relay and makes it available to the OPC client of iFix. For each tag while we are able to get the value and quality in the OPC client, we are not able to get the timestamp associated with the tag. The OPC server software fetches the timestamp from the device and displays the same in its user interface. But the same is not available in iFix OPC client. Is there someway to force the OPC client to fetch the timestamp of the tag and make it available in iFix?
 
J
I **think** that while OPC servers must support certain features, OPC clients do not; they only have to support what they want to use/need to function.. So historically since OPC was added after DDE and other technologies, I'd bet most HMIs like iFix don't specifically support the timestamp. I'm suprised it supports the Quality parameter.

If the OPC Server provider has a special format for getting more info that would be helpful. For example if the item was TANK1 then maybe you could get the quality as: [topic]item.quality or [topic]TANK1.Quality
Not sure if that's possible or not.

Your other option, if the OPC server offers an Automation interface, you could create VB scripting to bring back the timestamp values of a group of tags. To do this you'd have to:

1- Create an OPC server object
2- Connect to it
3- Add an OPC Group
4- Add individual items to the group
5- Turn on scan for the group
6- Periodically read the group or put in event handling to update your internal tags with the timestamp as the tag's timestamp changes

Kludge, yes, function it will [Words from Yoda].

I'm not familiar with iFix (WW & RSView myself), so maybe there is a possibility I don't know.

Hope this helps!

Jim Zupich
[email protected]
 
S
Dear Jim,

Thank you very much for your response. Further investigation from my end has validated both your comments, that:
i) iFix OPC client does not support device timestamps
ii) There is a lack of uniformity in the implementation of timestamp across differenct OPC clients, and many of them chose not to implement it

I tired my own OPC client in VB. The problem here is that millisecond value of the timestamp is lost. So presently I am trying to cobble up the same feature in VC++. The problem with VB is that it casts the server response as a "Date" datatype and there is no support for millisecond here. Would someone be aware of a workaround to this?
 
N

Neil Kingston (Data Layers)

Hello Sreeni T S,

You have correctly observed that VB loses the milliseconds part of the timestamp due to the typecast to VB Date. Indeed casting to Date does appear to trim the milliseconds, but actually the milliseconds part is still available to you, if you bear in mind that VB Date type is really a Double in disguise. A quick conversion is all that it takes to access the milliseconds part of a VB Date value.

Like the automation wrapper which you used with VB, our OPCWare Client Developer product also provides dates as VB Date type, and the millisecond part appears to be lost. So we wrote a sample to show our customers how to access the milliseconds part if they required it. You are welcome to use this sample for your own purposes with the automation wrapper.

Contact me directly by email neil<at>opcware<dot>com if you want me to send you the example of how this is done with our OPC client in VB6.

Neil Kingston
Data Layers Ltd
http://www.opcware.com
 
Top