LabVIEW OPC with NI OPC Servers - halvorsen.blog · NI OPC Servers A Demo version should be...
Transcript of LabVIEW OPC with NI OPC Servers - halvorsen.blog · NI OPC Servers A Demo version should be...
Software
YouneedthefollowingSoftware:• LabVIEW(LabVIEWProfessionalDevelopmentSystem32-Bit:English)
• NIOPCServers
AllLabVIEWSoftwarecanbedownloadedfrom:www.ni.com/download
Youmayusethemin“EvaluationMode”ifyoudon'thaveavalidLicensekey
WriteDatatoOPCServerReadDatafromOPCServer
LabVIEWApplication#1 LabVIEWApplication#2
InthisExampleLabVIEWApplication #1andLabVIEWApplication#2areonthesamecomputer.Normallytheyarelocatedon2differentcomputersinaNetwork.
NIOPCServers
NIOPCServersADemoversionshouldbeincludedwithLabVIEWDSCModuleorLabVIEWReal-TimeModule
UseSearchinWindows.Searchfor«OPCServers»Andselect«OPCServersConfiguration»
TheOPCFunctionsinLabVIEW
TheDataSocketpaletteinLabVIEW: WriteDatatoOPC
ReadDatafromOPC
OpenConnectiontoOPCServer CloseConnection
toOPCServer
BrowseOPCServersandOPCItems
YoucanuseLabVIEWasanOPCclientbyconnecting toanOPCserverthrough aDataSocket connection.
WriteDatatoOPCServerReadDatafromOPCServer
LabVIEWApplication#1 LabVIEWApplication#2
InthisExampleLabVIEWApplication #1andLabVIEWApplication#2areonthesamecomputer.Normallytheyarelocatedon2differentcomputersinaNetwork.
NIOPCServers
Write toOPCServerusingLabVIEW
OrspecifyURLdirectly:
1 2 3 4
WhileLoop
WhileLoop
UsetheBucketBrigade Items– becausetheycanbeusedforbothreadingandwriting
WriteDatatoOPCServerReadDatafromOPCServer
LabVIEWApplication#1 LabVIEWApplication#2
InthisExampleLabVIEWApplication #1andLabVIEWApplication#2areonthesamecomputer.Normallytheyarelocatedon2differentcomputersinaNetwork.
NIOPCServers
WriteDatatoOPCServerReadDatafromOPCServer
LabVIEWApplication#1 LabVIEWApplication#2
InthisExampleLabVIEWApplication #1andLabVIEWApplication#2areonthesamecomputer.Normallytheyarelocatedon2differentcomputersinaNetwork.
NIOPCServers
Hans-PetterHalvorsen,M.Sc.
UniversityCollegeofSoutheastNorwaywww.usn.no
E-mail:[email protected]:http://home.hit.no/~hansha/