%Locate Your OPC Server hostInfo = opcserverinfo('localhost') %Show all servers: allServers = hostInfo.ServerID' %Create an OPC Data Access Client Object da = opcda('localhost', 'National Instruments.OPCFieldPoint') %Connect client object to OPC server: connect(da) %Create an OPC Data Access Group Object Group1 = addgroup(da) %Browse the Server Namespace opcitems = serveritems(da, '**') %Add OPC Data Access Items to the group named Group1 aninn0 = additem(Group1, 'FP Res\FP-TB-10 @1\Tacho_kanal0') anut0 = additem(Group1, 'FP Res\FP-TB-10 @1\Styresignal_kanal4'); %Reading Data from an Item r=read(aninn0) %To get the Value of the first (and here: only) record of the structured %array r: r(1).Value %Writing Data to an Item write(anut0, 5) %Cleaning up after the session: disconnect(da) delete(da)