LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create and configure an OPC IO server programatically in LV 2010

Can I create and configure an OPC IP server programatically using LabVIEW 2010?  Currently I create a process (using code) then wire the process name to the LV express VI to create an IO server that I have manually set the attributes for.  Then I can create my shared variables and bind them to the OPC items.  I would like to eliminate the manual configuration of the attributes to give my VI greater flexibility.  Is this possible in LabVIEW 2010?

 

Thanks in advance,

 

AJL

0 Kudos
Message 1 of 11
(4,018 Views)

AJL,

   All this is possible through the Datalogging and Supervisory Module. All these features and more allow you to programmatically make an IO Server, bind OPC items to shared variables, and other similar functions. I do not believe there are other ways to accomplish all these and this is why the DSC module was made. 

Ben J.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 11
(3,987 Views)

Ben

 

Thanks for the reply.  I should have mentioned I do use the DSC module.  What I am looking for is a way to programatically set the "Registered OPC servers" value on the block diagram.  From what I have seen this is only available from a dialog box entry.  Is their a way to set this with something like a properly node?  The reason being is because I am trying to make a fairly universal app where the name of my registered servers may be slightly different based on how the customer sets up his Woodhead Profibus card.

0 Kudos
Message 3 of 11
(3,964 Views)

AJL,

   I think this might be what you are looking for. If not please explain a little more in depth:

SS-2010.12.03-10.08.18.png

Ben J.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 11
(3,948 Views)

Ben,

 

I am using the create/configure I/O server express VI you pointed out.  With that VI you have to double click on the VI, click the attributes button then you can select an OPC server you wish to tie your IO server to.  I would like to know if there is a way to select the OPC server to tie my IO server to by writing software such as looking up the OPC server name in an ini file.  This way if my OPC server name changes but the information is the same I can just change the ini file instead of changing my software and re-compiling my application.

0 Kudos
Message 5 of 11
(3,874 Views)

You can still use this VI to programmatically setup I/O servers without manually configuring it every time. Is the following picture not somewhere around what you are looking to do?

SS-2010.12.16-11.49.30.png

Ben J.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 11
(3,837 Views)

it is possible to write the datas to devices through the OPC I/O sever programatically.

 

Manikandan

Research student

0 Kudos
Message 7 of 11
(3,535 Views)

Hi mani.siet.eng,

 

You can write data to OPC tags using LabVIEW. There are multiple ways to do this such as binding shared variables (which you can create programmatically) to the tags or by using DataSockets. Information on how to use OPC in LabVIEW can be found in this KnowledgeBase article.

 

If you have any more specific questions, I would recommend creating a new thread since the last activity on this one was over three years ago.

 

Best Regards,

Matthew B.
Offering Manager
NI
0 Kudos
Message 8 of 11
(3,508 Views)

Thankyou sir,

 

                      I had tried with OPC server and got the output but next time didn't got the output, than go to the Modbus it will works ultimately.Now i am trying to datasockets write the data to plc.

0 Kudos
Message 9 of 11
(3,494 Views)

Hello,

i am also trying to do same thing,

i have created one modbus IO server (DSC module )and used its shared variable in my VI.

Now when i disconnect hardware and reconnect it, it take different serial port then i have defined in IO SERVER  configuration which gives me a error.

i want to give functionality to user to set com port and other communication parameters from my VI. so that every time when new hardware connects user can set parameters in VI.

I am new to labview so please suggest in detail and upload VI if available any.

 

Thanks..

 

0 Kudos
Message 10 of 11
(2,910 Views)