LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bind a front panel control to an item

Hi all,

 

I have a problem with selecting DataSocket in "Data Binding Selection" when I want to bind a front panel control to an item in another server such as an OPC Server. I want to know whether we connect to that item via OPC Server or DataSocket Server after specifying an OPC URL. The LED_DataSocket near the front panel control planned to bind to an OPC Server's causing this doubtfulness for me.

 

And I want to know in a big application what the difference between these two is:

Connecting a front panel control to an OPC Item selecting:

NI_PSP\network Items\then selecting the item from an OPC client instance currently created or,

DataSocket\browse\ finding the item we want through Servers listed.

 

Please advice.

0 Kudos
Message 1 of 4
(2,751 Views)
You can use Datasocket to read write to OPC 'tags', but as you are using LV 8, I would recommend using the Shared Variables instead. If you are using the LV DSC module (which is ideally suited to SCADA type applications), the shared variables which are bound to the OPC Server tags have inbuild features such as alarming, deadband, logging and more.

To go with the shared variable method, inside your Project, righ click on 'My Computer' item and go to New>> I/O Server. This will allow you to browse to any OPC Servers which are currently available. Once you have added this to the project it is now possible to create and bind a shared variable to this I/O Server by right clicking again and going to New>> Variable. Inside the properties page, go through the Bind to Source settings, which will allow you to bind the variable to any of the OPC items now available from the previously configured I/O Server.

For your information, Datasocket can still be used to read/write OPC bound variables but I would certainly recommend just using the standard shared variable method.

If you want to just stick with the Datasocket approach, try looking at the shipping examples 'Browse to OPC Item.vi' and 'NI Demo OPC Client.vi' as a good starting point.
0 Kudos
Message 2 of 4
(2,713 Views)

I'm working on a big HMI application with more than 200 I/Os. if I want to read/write these data items from an OPC server, do you mean it's better to use shared variables bound to OPC data items, then read/write directly the shared variable from a front panel object, connecting a shared variable node to it?

 

I want to know if I bind my all front panel objects to shared variables or OPC items via NI-PSP or Datasocket, for this number of I/Os, it works. And what are the differences between these two technologies?

I 'm for the best way of gathering data from an OPC Server.

Message Edited by Maryam on 04-20-2006 11:41 AM

0 Kudos
Message 3 of 4
(2,688 Views)
Yes, binding OPC items to shared variables will work the way you want it. Two hundred variables will not be a problem either.

If you are looking at HMI Applications, LabVIEW DSC module is definitely the way to go.
0 Kudos
Message 4 of 4
(2,676 Views)