LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Alarm from the Datasocket activeX

I am sucessfully able to get the data from OPC tags using Datasocket activex control in my delphi application.But is it is possible to get whether there is any alram persiting on that tag. Does Datasocket component have any such property or any other activex component to get the alarm on any particular tag.

Regards
Uttam
0 Kudos
Message 1 of 6
(2,639 Views)
Datasocket is just a transfer protocol and does not have any specific features for reporting an alarm on a tag.

-Regards,
Brett
0 Kudos
Message 2 of 6
(2,626 Views)
Is there some other activeX control avialable for getting alarms on a particular tag

Regards
Uttam
0 Kudos
Message 3 of 6
(2,624 Views)
Uttam,

I got a chance to play around with OPC Tags and bringing the objects in via Datasocket. One of the things I noticed is that the OPC server does not seem to send the alarm information as part of the data. I found that there are really 3 ways to work around this.

  1. Simply state what your alarm values are in LabVIEW and then have some indicator showing if those limits have been exceeded
  2. You could set up your OPC server to have a Boolean value connected to the alarm state of each tag. This would greatly increase your server overhead, but would still allow you to see an alarm event from the OPC side of the data.
  3. National Instruments makes a product called LabVIEW Datalogging and Supervisory Control Module that would allow you to view the alarms on the tags.
0 Kudos
Message 4 of 6
(2,610 Views)
Thanks for clarification.

I am using Labview Datalogging and supervisory control for storing in tag and then retriving tag. And I am able to show online data as well as alrams on the screens made in Laview DSC using alarm. But my application requirement is such that I require that in Delphi.

However workaround can be to make an DLL in Labview DSC which exposes a function which can check whether any alarm exist on the tag or not and return a boolean variable for alram indication.
Can you please tell is it possible to make such DLL in labview. Any link /url will be helpful.

Regards
Uttam
0 Kudos
Message 5 of 6
(2,609 Views)
Hi, Uttam,

Probably, one option for this application will be to use the NIAlarmEvent Browser ActiveX object that installs when you install the LabVIEW DSC Module. This is basically the same object as the Alarm & Event Display object in a VI's Front Panel. To use it, I will recommend you to place one in LabVIEW and see the different properties and methods that get called in the Block Diagram for it. I personally have never tried to call it from an environment outside of LabVIEW, but I believe it should be fine.

The second option, as you suggested, could be to create a DLL out of a DSC VI. Again, that should be possible. You could have the Read Tag and Write Tag VIs inside your code, and also any VIs used to retrieve alarm information. Attached to this post, you will see the VIs and the DLL that I created. In my example, I am just writing and reading one value from a simulated OPC server (one that installs with LabVIEW), and I'm also looking for alarms on the tag being written. Just for testing purposes, I tried calling the DLL from the same LabVIEW environment and that worked just perfect. The only thing you need to make sure is that you place the DLL files in the same directory where the DSC Engine is located (by default it is C:\Program Files\National Instruments\LabVIEW 7.1\.

I hope this helps!

GValdes
0 Kudos
Message 6 of 6
(2,578 Views)