08-08-2013 05:19 PM
Hi Choong,
I want to help clear some things up for you!
OPC and Modbus are separate industrial communication protocols that are commonly used by PLC's to communicate across a network. Modbus and OPC cannot talk to each other. A Modbus Slave needs to talk to a Modbus Master and an OPC Client connects to an OPC Server.
Through the LabVIEW DSC Module, we can create a Modbus slave or master I/O server or a PLC Client I/O server that connects tags (OPC) or coils (Modbus) to shared variables. So through DSC alone, we can do a Modbus loopback test, communicating between a modbus master (Modbus Fundamentals.lvproj LabVIEW Example) and a modbus slave (Modbus Simulator.lvproj LabVIEW Example). For OPC communication to take place, we need to be communicating with an OPC server. NI sells licenses to OPC Servers through NI OPC Servers, which can also be run on your local computer and connected to specific PLCs through drivers.
If you want to perform an OPC loopback, you need to have both LabVIEW DSC Module and an OPC Server installed on your computer. This tutorial walks us through how we would configure an example server and connect to it through LabVIEW.
http://www.ni.com/white-paper/7450/en
This tutorial shows us how we would do Modbus communication in LabVIEW using the DSC module:
http://www.ni.com/white-paper/13911/en
The topology you linked to here is a typical set up for communicating between a computer and a PLC speaking OPC.
Try following the tutorial I linked above and see if that works for you!
08-09-2013 01:03 AM
Hi Joey,
Thanks for the clarification. So now my understanding is this, in short, I would need a real PLC with OPC communication capability to be connected to the OPC server in order for the OPC server to generate tags for the PLC. After which, using LabView DSC Module, I would then be able to connect these tags to shared variables for further processing. Do let me know if I have gotten it wrong.
Best Regards,
Choong How
08-09-2013 09:38 AM
Choong,
You are correct that this would ultimately be your set up.
However, for learning about how OPC works for now, this tutorial shows you how you can do OPC communication all within your local computer.
joule.ni.com/nidu/cds/view/p/id/3250/lang/en
This connects you to a sample OPC server, National Instruments.NIOPCServers.V5.
You should be able to see the sine function hosted on the OPC server through the DSC module (an OPC client) in LabVIEW.
08-11-2013 11:27 PM
Hello Choong,
The OPC server you need when you are trying to develop your own server and deploy in your device/system and handed-over to costumer and costumer can use his client to communicate with your OPC server. Here you will define all tags and data in short all configurations.
In your case
The OPC server is already developed and deployed in your hardware/system, here you are not developing any server you are try to connect with other device server. The tags already defined in device you want to access them, you are not defining any tags. So here you required OPC client that can connect with device OPC server and the pre-define tags you can access on your PC using OPC client.
You can use NI OPC client demo version for your testing and once you done with your Investigation you can proceed to purchase NI OPC.
08-12-2013 07:30 AM
Thanks Joey and Himanshu for your clarification. I have a better understanding of how NI OPC server works.