LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can i configure OPC through Labview.

Solved!
Go to solution
Hello Sir,
 
I am using NI-OPC. In my project i have to monitor parameters of 50 AC drives on MODBUS protocol. I have connected these drives on two different comport. I have defined Channel,Devices and Tag in opc. But my problem is if I want to give UI to User to modify tag address or comport in channel then how can i access properties of OPC through Active X so that i can configure OPC through labview if Drives model or make changes.
 
Thanking You
PBP
Labview 6.1 - 2019
0 Kudos
Message 1 of 10
(4,146 Views)

I'm sure if there is something you want to do, it is possible to find a way to do it in LabVIEW.  But is it worth the time and trouble?  Where does ActiveX come into play in your situation?

How much work was it to do the configuring of the parameters in the way you did it?  How much more work would it be do try to program into LabVIEW the steps that you did?  Probably quite a bit more work.  How many timess and how frequently do you think the Drives' models or makes would change?  Probably very infrequently.

I think you would save a lot of time and trouble (which would be for little gain) if you just clearly document the procedures you just went through to set up the Drive parameters in OPC and use that in the future as a reference.

0 Kudos
Message 2 of 10
(4,125 Views)
HI Thanx for your reply,
  I want to know that can i call .opf file through activex in NI-opc so that if changes occur then i can modifiy it at office and replace older one at site.
PBP
Labview 6.1 - 2019
0 Kudos
Message 3 of 10
(4,107 Views)
Solution
Accepted by topic author PBP
I am also not very clear where ActiveX comes into play here. If you are using LabVIEW DSC, it comes with VI's that enable you to programmatically create (and configure) and delete I/O servers. Using these VI's you could re-configure the I/O server if something changed.


Message Edited by Eli_S on 07-14-2008 02:14 PM
Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 10
(4,090 Views)
Anyway thanx for your kind reply,

 I am reading tags through datasocket. I have not used DSC so that i dont know how to do it with. Ok i will use DSC to do it. I have also tried drive communication through MODBUS library but when i read data of 50 drives it takes 25sec to update values.I there anyway to reduce time. I am keeping 100mS between command write and response read.If i reduce timing then i am getting garbage values.

So if you have any suggestion pls reply

Thanking you...
PBP
Labview 6.1 - 2019
0 Kudos
Message 5 of 10
(4,079 Views)
Hi,

I am not sure about the delay with the Modbus library, but if you have LabVIEW DSC I would try doing the Modbus communication through that and see if you get a different behavior.
Eli S.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 10
(4,057 Views)

Are the AC drives connected through TCP/IP or a serial port?  If serial, are all 50 on the same serial line?  How many tags are you reading from each drive?

I don't think 25 seconds for 50 drives would be that unusual if you were reading a few tags/drive, and all drives were on the same serial port.  That is less than 1/2 second for write a query, wait and get the read on each drive.

0 Kudos
Message 7 of 10
(4,049 Views)
Hi Thanx for your reply,

I am using 232-485 converter.I have connected 32 drives on one serial port(Named as LOOP1) and rest on other serial port(Named as LOOP2). I am reading 10 addresses in each drive and addresses are also not in sequence. 
PBP
Labview 6.1 - 2019
0 Kudos
Message 8 of 10
(4,040 Views)

Setting the OPF file NI OPC Servers loads at startup: 

 

In NI OPC Servers, go to Tools >> Options >> Service tab and verify that "Automatically start as a Windows NT service" is checked.

 

You can start the service programmatically by sending this command line (via System Exec.vi):

net start "NI OPC Service"

 

(If the service is already started, you will get text back but the service will continue to run.)

 

You can stop the service by sending:

net stop "NI OPC Service"

  

Whenever the service starts, NI OPC Servers obtains the location of the Default Project (OPF file) here:

C:\Program Files\National Instruments\Shared\NI OPC Servers\ServerMain.ini

 

You can change the OPF file NI OPC Servers loads at startup by changing the path in the "Default Project" key in the "Service" section.  See attached for an example program.


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 9 of 10
(3,872 Views)

Caveat: 

 

NI OPC Servers overwrites the existing ServerMain.ini file when it shuts down.  Therefore, shutdown NI OPC Servers (as described above) before attempting to make the aforementioned changes to ServerMain.ini.

 

-Jason


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 10 of 10
(3,869 Views)