11-29-2010 08:31 AM
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
12-01-2010 10:04 AM - edited 12-01-2010 10:05 AM
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.
12-02-2010 08:31 AM
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.
12-03-2010 10:11 AM
AJL,
I think this might be what you are looking for. If not please explain a little more in depth:
12-13-2010 10:20 AM
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.
12-16-2010 11:50 AM
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?
03-01-2014 06:47 AM
it is possible to write the datas to devices through the OPC I/O sever programatically.
Manikandan
Research student
03-03-2014 09:15 AM
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,
03-04-2014 10:59 PM
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.
06-11-2018 07:35 AM
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..