Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I connect LabView with a PLC S7-300?

Hi Folks
I want to build industrial equipments like tanks/heaters/valves/motor or mixer/RTD/Level sensor in LabVIEW
i could find tanks/RTD but i couldnt find the rest.
After building these things i want to control the action of this total process by PLC Siemens S7 200
i dont have any idea about this thing
Let me know how it can be controlled whether by using RS 232/ RS 485 or OPC server
if so is OPC server is a software...where can i download or where can i buy
If any body could help me i will be happy

0 Kudos
Message 21 of 42
(15,818 Views)
consider
 
Preston Johnson
Solutions Manager, Industrial IoT: Condition Monitoring and Predictive Analytics
cbt
512 431 2371
preston.johnson@cbtechinc
0 Kudos
Message 22 of 42
(15,807 Views)

I have S7200 PLC and its OPC server to interface LABVIEW
Should i program anything in LabVIEW
or just build and interface the PLC

0 Kudos
Message 23 of 42
(15,638 Views)
First, you can use ServerExplorer to see if the OPC server runs properly with the PLC. It's easy to use and test.
Then, in LabVIEW you can find some examples that show how to use datasocket to connect to OPC server.  
Ryan Shi
National Instruments
0 Kudos
Message 24 of 42
(15,624 Views)
Its all fine and thanks for your reply Ryan
 
but i just want to know should i connect the stuffs in Block diagram of labview
and i couldnt find any exampleds like that
 
i wil have opc server in a day
i have built tanks and pipes in labview but i didnt even connect the block diagram
 
i just want to open and close the valves if the level reaches certain and so as the temperature
 
how to compile this project..
i have no clue regarding this stuff..
so only i am disturbing you like this guys
 
thanks and will be happy if you (anyone) reply in detail
thanks again
 
0 Kudos
Message 25 of 42
(15,624 Views)
In LabVIEW "Find Examples", search "opc", you will get several examples that show how to use datasocket to connect opc server.
The only thing you need to care is the URL. The format is like this: opc:/ServerMachineName/OPCServerName/ItemName. Those examples show in detail how to construct the URL.
Ryan Shi
National Instruments
0 Kudos
Message 26 of 42
(15,607 Views)

yes ryan i could see examples about OPC but i dont have any clue on that stuff

i have the OPC PC access for s7 200 right now

but i dont know how to start ...i dont have any knowledge on this

i just want to do this project and leave off. so  let me know what should i do to control the flow of tanks simulated in labview by PLC

pleaseeeeeeeee...........reply me as soon as possible

many thanks

0 Kudos
Message 27 of 42
(15,575 Views)
The example "NI Demo OPC Client.vi" clearly describes how to do it.
You can use a probe to get the URL connected to Datasocket open.vi. It's "opc:/National Instruments.OPCDemo/sine:0.0..8.0:3.0?updaterate=100". 
National Instruments.OPCDemo is a demo opc server running on your machine. "sine:0.0..8.0:3.0" is a simulated item. You can ignore "?updaterate=100" 
So, use your opc server name and the item name here, which can be found in the ServerExplorer.
Which part can't you understand in this example?
Ryan Shi
National Instruments
0 Kudos
Message 28 of 42
(15,561 Views)

yes i have programmed plc

when i access the program in PC access the value is bad

the same is when i test with the server explorer also

but the program is running properly  with external inputs

what can i do ryan

my program and my pca file for ur verification

0 Kudos
Message 29 of 42
(15,531 Views)

Hi Nura,

Are you still using the OPC server?  Is it up and running?  I would first make sure that the OPC server is working correctly, and then go from there.  I know you said you haven't really used an OPC server before, but there is lots of information online that should help you through it.  Take a look at the following link for a starting point:

Connecting LabVIEW to an OPC Server through a DataSocket Connection

Thanks,

Justin M.
National Instruments

0 Kudos
Message 30 of 42
(15,502 Views)