ni datasocket server help - documentation.help · from national instruments fieldpoint modules,...

43

Upload: vodieu

Post on 26-Sep-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,
Page 2: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

NIDataSocketServerHelpApril2003Edition,PartNumber370716A-01UsethishelpfileasareferenceforinformationabouttheDataSocketServer,DataSocketServerManager,DataSocketServerDiagnosticsutility,andtheconceptsyouneedtounderstandsoyoucantransferdatausingtheDataSocketServer.Tonavigatethishelpfile,usetheContents,Index,andSearchtabstotheleftofthiswindow.Formoreinformationaboutthishelpfile,refertothefollowingtopics:Conventions—formattingandtypographicalconventionsinthishelpfileRelatedDocumentationImportantInformationTechnicalSupportResourcesTocommentonthedocumentation,[email protected]©2003NationalInstrumentsCorporation.AllRightsReserved.

Page 3: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

DataSocketServerOverviewADataSocketServerisanexecutablethatenablesdataexchangebetweenmultipleDataSocketReadersandDataSocketWriters.TheDataSocketServeracceptsandstoresinformationfromdatasourcesandrelaysittootherdatatargets.WhenyourunaDataSocketServeronacomputer,youmakedataeasilyaccessibletoDataSocketReadersandWritersonthesamecomputerorothercomputersconnectedthoughaTCPnetwork,suchastheInternet.

NoteTheDataSocketServerrequiressupportforTCP/IPnetworkingonthecomputer.IfyouhaveaworkingWebbrowseronthecomputer,theTCP/IPdriverisinstalled.

Page 4: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

LaunchingtheDataSocketServerLaunchtheDataSocketServerbyselectingStart»Programs»NationalInstruments»DataSocket»DataSocketServer.

TipWhentheDataSocketServerisrunning,youseetheDataSocketiconintheWindowssystemtray,indicatingthattheDataSocketServerisrunning.Tocheckonitsstatus,right-clicktheDataSocketiconandselectShowDataSocketServerfromtheshortcutmenu.

Page 5: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

ConfiguringtheDataSocketServerThedefaultDataSocketServerconfigurationworksformanyInternetapplications,butyoumightneedtochangetheconfigurationforsomeapplications.TomodifytheDataSocketServerconfiguration,usetheDataSocketServerManager.

NoteChangesthatyoumaketotheDataSocketServerusingtheDataSocketServerManagertakeeffectthenexttimeyoulaunchtheDataSocketServer.IfyouchangetheserverconfigurationintheDataSocketServerManagerwhentheDataSocketServerisrunning,youmustshutdownandlaunchtheDataSocketServeragainbeforethechangestakeeffect.

Page 6: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

ShuttingDowntheDataSocketServerToshutdowntheDataSocketServer,selectServer»ShutdownDataSocketServerintheDataSocketServer.IftheDataSocketServerishidden,right-clicktheDataSocketiconintheWindowssystemtrayandselectShutdownDataSocketServerfromtheshortcutmenu.

Page 7: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

DataItemsAdataitemonaDataSocketServerrepresentsareal-worldmeasurement.DataSocketReaderscansubscribetodataitemsonaDataSocketServer,andDataSocketWriterscancreateandpublishorupdatedataitemsonaDataSocketServer.Therearetwotypesofdataitems—predefineddataitemsanddynamicallycreateddataitems:

PredefineddataitemsalwaysexistontheDataSocketServer,andtheyalwayshaveaninitialvalueassociatedwiththem.BecausetheDataSocketServerneverreleasespredefineddataitems,theirvaluesexistevenwhennoDataSocketclientisconnectedtothem.Predefineddataitemscanhavespecialreadandwriteaccessgroupssoyoucanallowdifferentcomputerstoaccessdifferentpredefineddataitems.DynamicallycreateddataitemsexistonlyaslongasthereisatleastoneDataSocketclientconnectedtoreadorwritethedataitemvalue.Whennoconnectionstoadynamicallycreateddataitemremain,theDataSocketServerreleasesthedataitemanditsvalue.

Bydefault,onlyprogramsrunningonthesamecomputerastheDataSocketServercancreatedataitemsorpublishtodataitems,whereasapplicationsonthesamecomputerorothercomputerscanreaddataitems.UsetheDataSocketServerManagertospecifywhichcomputerscancreatedataitems,publishtodataitems,andsubscribetodataitems.

Page 8: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

DataSourceAdatasourceisalocationtowhichyouwantaDataSocketReadertoconnectandretrievedata.YouspecifyadatasourcelocationwithaURL.LikeURLsyouuseinaWebbrowser,thedatasourcelocatorcanpointtomanydifferenttypesofsourcesdependingontheprefix.TheprefixiscalledtheURLscheme.DataSocketsupportsseveralschemes:

dstp:(DataSockettransferprotocol)http:(hypertexttransferprotocol)ftp:(filetransferprotocol)opc:(OLEforProcessControl)fieldpoint:,logos:,lookout:(communicationprotocolforNationalInstrumentsFieldPointmodules,NationalInstrumentsLabVIEWDataloggingandSupervisoryControl(DSC)Moduleprocesses,andNationalInstrumentsLookoutprocesses)file:(localfileservers)

Page 9: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

DataTargetAdatatargetisalocationtowhichyouwantaDataSocketWritertoconnectandwritedata.YouspecifyadatatargetwithaURL.LikeURLsyouuseinaWebbrowser,thedatatargetlocatorcanpointtomanydifferenttypesofsourcesdependingontheprefix.TheprefixiscalledtheURLscheme.DataSocketsupportsseveralschemes:

dstp:(DataSockettransferprotocol)ftp:(filetransferprotocol)opc:(OLEforProcessControl)fieldpoint:,logos:,lookout:(communicationprotocolforNationalInstrumentsFieldPointmodules,NationalInstrumentsLabVIEWDataloggingandSupervisoryControl(DSC)Moduleprocesses,andNationalInstrumentsLookoutprocesses)file:(localfileservers)

Page 10: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

DataSocketDataSocketisatechnologythatsimplifiesdataexchangebetweenanapplicationandotherapplications,files,FTPservers,andWebservers.ItprovidesonecommonAPItoanumberofdifferentcommunicationprotocols.DataSocket,bothatechnologyandagroupoftools,facilitatestheexchangeofdataandinformationbetweenanapplicationandanumberofdifferentdatasourcesanddatatargets.Thesesourcesandtargetsincludefiles,HTTP/FTPservers,OLEforProcessControl(OPC)servers,andNationalInstrumentsDataSocketServersforpublishinglivedatabetweenapplications.Often,thesesourcesandtargetsarelocatedonadifferentcomputer.YoucanspecifyDataSocketsourcesandtargets(connections)usingURLs(uniformresourcelocators)thatadheretothefamiliarURLmodel.DataSocketusesanenhanceddataformatforexchangingmeasurementdata,aswellastheattributesofthedata.Dataattributesmightincludeinformationsuchasanacquisitionrate,testoperatorname,timestamp,andqualityofdata.AlthoughyoucanusegeneralpurposefileI/Ofunctions,TCP/IPfunctions,andFTP/HTTPrequeststotransferdatabetweendifferentapplications,applicationsandfiles,anddifferentcomputers,youmustwriteasignificantamountofprogramcodetodoso.DataSocketgreatlysimplifiesthistaskbyprovidingaunifiedAPIfortheselow-levelcommunicationprotocols.TransferringdataacrosscomputerswithDataSocketisassimpleasusingabrowsertoreadWebpagesontheInternet.

Page 11: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

DSTPDataSocketTransferProtocol.ProtocolbasedonTCP/IPthroughwhichdataispassedbetweenDataSocketclients—knownasDataSocketReaderandWriterapplications—usingtheDataSocketServer.YouconnecttoaDataSocketServerfromDataSocketReaderandWriterapplicationsusingtheDSTPURLscheme,asdemonstratedinthefollowingexampleURLs.ThefollowingURLconnectstothedataitemnamedwaveontheDataSocketServerrunningonthelocalcomputer:dstp://localhost/waveThefollowingURLconnectstothedataitemnamedwaveonaDataSocketServerrunningonanetworkedcomputernamedlab:dstp://lab/wave

Page 12: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

LogosProtocolTheNationalInstrumentsLogosprotocolsendsandreceiveslivedatatoandfromNationalInstrumentsFieldPointmodules,NationalInstrumentsLabVIEWDataloggingandSupervisoryControl(DSC)Moduleprocesses,andNationalInstrumentsLookoutprocesses.ThefollowingURLsarefunctionallyequivalent:logos://computer_name/process/data_item_namelookout://computer_name/process/data_item_namefieldpoint://computer_name/process/data_item_name

Page 13: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

DataSocketServerManagerTheDataSocketServerManagerisanexecutablethatconfiguresdefaultsettingsandpredefineddataitemsfortheDataSocketServeronthelocalcomputer.YoucanlaunchtheDataSocketServerManagerbyselectingStart»Programs»NationalInstruments»DataSocket»DataSocketServerManager.

NoteYoucannotconfigureaDataSocketServerremotelyorprogrammatically.YoumustlocallyconfiguretheDataSocketServerwiththeDataSocketServerManager.

ChangesthatyoumaketotheDataSocketServerusingtheDataSocketServerManagertakeeffectthenexttimeyoulaunchtheDataSocketServer.IfyouchangetheDataSocketServerconfigurationintheDataSocketServerManagerwhiletheDataSocketServerisrunning,youmustshutdownandlaunchtheDataSocketServeragainbeforethechangestakeeffect.

YoucanperformthefollowingtaskswiththeDataSocketServerManager:LimitthetotalnumberofsimultaneousconnectionstotheDataSocketServerfromDataSocketReadersandDataSocketWritersLimitthenumberofdataitemsthatDataSocketclientsareallowedtodynamicallycreateontheDataSocketServerSetbufferingconstraintsforpredefineditemsanddynamicallycreateditemsAdduserstopermissiongroupsCreatenewpermissiongroupsCreatepredefineddataitemsImportandexportDataSocketServerManagerconfigurations

Page 14: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

ConfiguringBufferingLaunchtheDataSocketServerManagerbyselectingStart»Programs»NationalInstruments»DataSocket»DataSocketServerManagertoconfigurebufferingconstraints.Bufferingconstraintssetthemaximumsizeofthebufferintermsofpacketsandintermsofbytes.Theseconstraintspreventabufferfromgrowingunboundedandconsumingexcessivememory.Completethefollowingstepstoconfigureserver-sidebufferingforpredefineddataitemsortotoconfiguredefaultbufferingconstraintsfordynamicallycreateddataitems.

Page 15: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

BufferingConstraintsforPredefinedDataItems1. Createapredefineddataitem.Bydefault,theDataSocketServer

Managersetsthemaximumbuffersizeto25MBand1packet,effectivelyprovidingunbufferedbehavior.

2. Tooverridethedefaultbufferingconstraints,selectthedataitemfromthePredefinedDataItemscategoryandspecifynewMaxBufferBytesandMaxBufferPacketsvalues.

Page 16: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

BufferingConstraintsforDynamicallyCreatedDataItemsYoucanspecifydefaultbufferingconstraintsthatapplytoalldataitemscreateddynamicallyontheDataSocketServer.AnydynamicdataitemresidingontheDataSocketServerinheritsthedefaultbufferingconstraintswhentheDataSocketServercreatesthedataitem.

1. SelectDfltBufferMaxBytesfromtheServerSettingscategoryandsetthenewmaximumbuffersizeinbytes.

2. SelectDfltBufferMaxPacketsfromtheServerSettingscategoryandsetthenewmaximumbuffersizeinpackets.

Page 17: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

ConfiguringPermissionstotheDataSocketServerYoucancategorizeusersaccordingtohowtheyinteractwiththeDataSocketServerandwhatpermissiontheyneedforconnectingtotheDataSocketServer.Differentpermissiongroupsincludereadaccess,writeaccess,dataitemcreators,andadministrators.Youalsocandefinenewpermissiongroups.Usethepermissiongroupstogrouphostswithsimilarneeds.TheDataSocketServerManagerprovidesthefollowingdefaultgroups:

TheAdministratorspermissiongroupisreservedforfutureuseandmainlyintendedforretrievingmanagementinformationfromtheDataSocketServer.TheDefaultReaderspermissiongroupcanreadalldynamicallycreateddataitemsfromtheDataSocketServer.Inaddition,theDefaultReaderspermissiongroupcanreadfromanypredefineddataitemthathasitsreadaccessgroupsettoDefaultReaders.TheDefaultWriterspermissiongroupcanwritetoalldynamicallycreateddataitemsontheDataSocketServer.Inaddition,theDefaultWriterspermissiongroupcanwritetoanypredefineddataitemthathasitswriteaccessgroupsettoDefaultWriters.TheCreatorspermissiongroupcandynamicallycreatenewdataitemsontheDataSocketServer.

Completethefollowingstepstoaddausertoadefaultgroup:1. LaunchtheDataSocketServerManagerbyselecting

Start»Programs»NationalInstruments»DataSocket»DataSocketServerManager.

2. SelectthegroupfromthePermissionGroupslist.3. ClicktheAddHostbuttontoaddausertothegroup.4. AddtheusertothepermissiongroupusingeitherthenameorIPaddress

indotteddecimalnotationofthecomputer.TheDataSocketServerManageralsohastwovariables,localhostandeveryhost;localhostrepresentsthelocalcomputer(thecomputerwheretheserverisrunning)andeveryhostrepresentsallcomputers(unrestrictedaccess).

Page 18: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

CreatingPermissionGroupsYoucancreatenewpermissiongroupsforothersetsofusers.Forexample,youmightneedapermissiongroupthatreadsonlypredefineddataitems,unliketheDefaultReadersgroup.Predefineditemscanhavespecialreadandwriteaccessgroups.Youcanspecifywhichgroupscancreateitems,writeitems,andreaditems.Asaresult,differentcomputerscanhaveindividualizedaccesstodifferentpredefineditems.Completethefollowingstepstocreateanewpermissiongroupthatreadsorwritestoapredefineddataitem.

1. LaunchtheDataSocketServerManagerbyselectingStart»Programs»NationalInstruments»DataSocket»DataSocketServerManager.

2. ClicktheNewGroupbutton.3. EnteradescriptivenameforthepermissiongroupintheNametextbox.4. ModifytheHostslisttoincludethecomputerstowhichyouwantto

grantaccess.YoucanspecifyacomputereitherbythecomputernameonthenetworkortheIPaddressindotteddecimalnotation.TheDataSocketServerManageralsohastwovariables,localhostandeveryhost;localhostrepresentsthelocalcomputer(thecomputerwheretheserverisrunning)andeveryhostrepresentsallcomputers(unrestrictedaccess).

5. SelectthedataitemtowhichyouwanttograntaccessfromthePredefinedDataItemslist,andthenselectthenewpermissiongroupfromtheReadAccessorWriteAccesspull-downmenu.

Page 19: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

CreatingPredefinedDataItemsontheDataSocketServerYoucanspecifydataitemsthatmustbeautomaticallycreatedandinitializedwhenyoulaunchtheDataSocketServer.AsyoucreateDataSocketclients,considerdefiningthedataitemsintheDataSocketServerManagersothatyoucandefineaccesspermissiongroupsforthedataitems.CompletethefollowingstepstopredefineadataitemonaDataSocketServer.

1. LaunchtheDataSocketServerManagerbyselectingStart»Programs»NationalInstruments»DataSocket»DataSocketServerManager.ThePredefinedItemscategorylistsallitemsthattheDataSocketServercreateseachtimeyoulaunchit.TheseitemsexistwithoutDataSocketclientconnections,unlikedynamicallycreateditemsthatexistonlyduringaDataSocketclientconnection.

2. ClicktheNewItembutton.3. EnteradetaileddescriptionfortheitemintheDescriptiontextbox.For

example,youmightlistthedatasource,thedatatype,andaccesspermissions.

4. EnteradescriptivenameforthedataitemintheNametextbox.5. Grantreadandwriteaccesstopermissiongroupsbyselectingthe

appropriatepermissiongroupfromtheReadAccessandWriteAccesspull-downmenus.

6. IfyouwanttoallowmultiplewriterstoconnecttotheDataSocketServer,placeacheckmarkintheAllowMultipleWriterscheckbox.

7. SpecifythedatatypeandavaluefortheInitialValue.RememberthatpredefineddataitemsexistevenwithoutaDataSocketclientconnection.IfaDataSocketReaderisconnectedtoapredefineddataitemontheDataSocketServerbeforeaDataSocketWriterisconnected,theDataSocketServerreturnstheinitialvaluetotheReader.DataSocketWritersoverwritedefaultvalues;whenaDataSocketWriterwritestoapredefineddataitem,thatitemretainsthevalueeveniftheDataSocketWriterdisconnectsfromtheserver.AfteraDataSocketWriteroverwritestheinitialvalueofapredefineditem,theitemdoesnotreturntotheinitialvalueunlesstheDataSocketServerisshutdownandrelaunched.

Page 20: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

LimitingtheNumberofDynamicallyCreatedDataItemsCompletethefollowingstepstolimitthenumberofdataitemstheDataSocketServercandynamicallycreate.

1. LaunchtheDataSocketServerManagerbyselectingStart»Programs»NationalInstruments»DataSocket»DataSocketServerManager.

2. SelectMaxItemfromtheServerSettingscategory.3. Setthemaximumnumberofdataitemsyouwanttoallowthe

DataSocketServerrunningonthelocalcomputertodynamicallycreate.TheDataSocketServercancreatebetween1and1000dynamicdataitems,whichdoesnotincludepredefineddataitems.Thedefaultis200.

Page 21: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

SavingDataSocketServerConfigurationsYoucancreatemultipleDataSocketServerconfigurationsandimportandexportthem,whichisespeciallyusefulwhenyouwantaDataSocketServeronanothercomputertohavethesameconfigurationastheoneonthelocalcomputerbecauseyoucannotconfiguretheDataSocketServerremotelyorprogrammatically.YoumustlocallyconfiguretheDataSocketServerwiththeDataSocketServerManager.Bydefault,theDataSocketServerusestheconfigurationspecifiedincwdssini.dss,whichexistsinthesamedirectoryastheDataSocketServerexecutable.

Page 22: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

SavingDefaultConfigurationsAfteryouconfiguresettingsintheDataSocketServerManager,selectSettings»SaveSettingsNowtosavethesettingstocwdssini.dss.

Page 23: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

ImportingConfigurationsToimportsettingsfromanotherfile,selectSettings»ImportSettingsandselectafilefromtheOpenDataSocketServerconfigurationdialogbox.

Page 24: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

ExportingConfigurationsTosavethecurrentconfigurationoftheDataSocketServersoyoucanloaditonanothercomputeroratalatertime,selectSettings»ExportSettingsandselectafilefromtheSaveDataSocketServerconfigurationdialogbox.

Page 25: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

SettingConnectionLimitsCompletethefollowingstepstolimitthenumberofsimultaneousconnectionstotheDataSocketServer.

1. LaunchtheDataSocketServerManagerbyselectingStart»Programs»NationalInstruments»DataSocket»DataSocketServerManager.

2. SelectMaxConnectionsfromtheServerSettingscategory.3. Setthemaximumnumberofsimultaneousconnectionsyouwantto

allowtotheDataSocketServerrunningonthelocalcomputer.YoucansetMaxConnectionsbetween1and1000.Thedefaultis50.

Page 26: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

BufferingBufferingisaDataSocketTransferProtocol(DSTP)featurethatminimizesthelikelihoodthataDataSocketServerwilldropdatavalues.Withbuffering,theDataSocketServertemporarilystoresthevaluespublishedtoadataiteminafirst-in,first-out(FIFO)bufferforthedataitembeforesendingthedatatosubscribingclients.Providedthatabufferneverexceedsitscapacity,bufferingpreventsunprocessedvaluesfrombeingoverwrittenanddroppedbytheDataSocketServer.YoucanconfigureindividualbufferingconstraintsforeachpredefineddataitemonaDataSocketServeroryoucanconfiguredefaultbufferingconstraintsforalldynamicallycreateddataitems.

NoteSomeapplicationdevelopmentenvironmentssuchasLabVIEWmaintainclient-sidebuffersinadditiontotheserver-sidebuffer.Tominimizedataloss,setthebufferingconstraintsforboththeDataSocketServerandthesubscribingDataSocketclients.RefertotheLabVIEWHelpforinformationaboutclient-sidebufferinginLabVIEW.

SometimestheDataSocketServerwillhavetodropvaluestoenforcethebufferingconstraintsforadataitem.WhentheDataSocketServerneedstodropavalue,itdropsvaluesfromthefrontofabuffer—thatis,itdropsolderdatainfavorofnewerdata.Morespecifically,theDataSocketServerdropsavaluefromthefrontofabufferwhenoneofthefollowingconditionsistrue:

Allclientscurrentlysubscribedtothedataitemhavereceivedthevalue,orInsertinganewvalueintothebackofthebufferviolateseitherofthetwobufferingconstraintsthatyousetforthatdataitem.

TheDataSocketServerdoesnotnotifyDataSocketReadersorWriterswhenitdropsdatavalues.DataSocketWriterscanaddasequencenumberattributetothepublisheddata,soDataSocketReaderscandetectdroppedvaluesinadatastreambycheckingthesequencenumberattribute.

Page 27: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

DataSocketServerDiagnosticsUtilityTolaunchtheDataSocketServerDiagnosticsutility,selectTools»DiagnosticsintheDataSocketServer.UsethisutilitytoviewinformationabouttheactivedataitemsontheDataSocketServerandtofine-tunebufferingconstraints.

Page 28: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

ViewingInformationaboutDataItemsToviewinformationaboutaspecificdataitem,selectthedataitemfromthetreeintheleftpaneofthewindow.Intherightpaneofthewindow,youcanfindinformationabouttheDataSocketclientscurrentlysubscribingtothedataitem,bufferingconstraints,bufferutilization,andnumberofpacketsthatweredropped.

Page 29: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

AdjustingBufferingConstraintsYoucanadjustthebufferingconstraintsintheDataSocketServerDiagnosticsutilitytofine-tuneperformance.Toupdateabufferingconstraintforadataitem,selectthedataitem,updatetheBytesorPacketsconstraintvalueinthenumericcontrol,andclicktheUpdatebuttontoapplythenewconstraint.Afteryoufine-tunethebufferingconstraints,savethesettingstotheDataSocketServerconfigurationfilebyselectingFile»SaveSettings.

NoteWhenyousavedataitemsandnewbufferingconstraintstotheconfigurationfile,yousaveonlypredefineddataitems,notdynamicallycreateddataitemscurrentlypublishedontheDataSocketServer.TheDataSocketServersavespredefineddataitemswiththeirinitialvalues,nottheircurrentvalues.

Page 30: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

ReadingfromaDataSocketServerUseNILabVIEW,LabWindows/CVI,orMeasurementStudiotocreateaDataSocketReaderapplication.ADataSocketReaderapplicationsubscribestolivedatabeingpublishedbyaDataSocketWriterapplicationtoaDataSocketServer.UsetheDataSocketAPIsprovidedinLabVIEW,LabWindows/CVI,andMeasurementStudiotocreateaVIorapplicationthatconnectstotheDataSocketServerusingaURLandretrievesliveupdatesasnewdataispublishedtotheDataSocketServer.

NoteYoumusthaveInternetExplorer3.0orlaterinstalledonWindowscomputersonwhichyourunDataSocketReadersorWriters.

RefertotheLabVIEWHelp,LabWindows/CVIHelp,orMeasurementStudioHelpforinformationaboutcreatingaDataSocketReaderVIorapplication.

Page 31: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

WritingtoaDataSocketServerUseNILabVIEW,LabWindows/CVI,orMeasurementStudiotocreateaDataSocketWriterapplication.ADataSocketWriterapplicationpublisheslivedatatoaDataSocketServer.UsetheDataSocketAPIsprovidedinLabVIEW,LabWindows/CVI,andMeasurementStudiotocreateaVIorapplicationthatconnectstotheDataSocketServerusingaURLandpublishesupdatesthataDataSocketReaderapplicationcanretrieve.

NoteYoumusthaveInternetExplorer3.0orlaterinstalledonWindowscomputersonwhichyourunDataSocketReadersorWriters.

RefertotheLabVIEWHelp,LabWindows/CVIHelp,orMeasurementStudioHelpforinformationaboutcreatingaDataSocketWriterVIorapplication.

Page 32: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

TechnicalSupportandProfessionalServicesVisitthefollowingsectionsoftheNationalInstrumentsWebsiteatni.comfortechnicalsupportandprofessionalservices:

Support—Onlinetechnicalsupportresourcesincludethefollowing:Self-HelpResources—Forimmediateanswersandsolutions,visitourextensivelibraryoftechnicalsupportresourcesavailableinEnglish,Japanese,andSpanishatni.com/support.Theseresourcesareavailableformostproductsatnocosttoregisteredusersandincludesoftwaredriversandupdates,aKnowledgeBase,productmanuals,step-by-steptroubleshootingwizards,conformitydocumentation,examplecode,tutorialsandapplicationnotes,instrumentdrivers,discussionforums,ameasurementglossary,andsoon.AssistedSupportOptions—ContactNIengineersandothermeasurementandautomationprofessionalsbyvisitingni.com/support.Ouronlinesystemhelpsyoudefineyourquestionandconnectsyoutotheexpertsbyphone,discussionforum,oremail.

Training—Visitni.com/custedforself-pacedtutorials,videos,andinteractiveCDs.Youalsocanregisterforinstructor-led,hands-oncoursesatlocationsaroundtheworld.SystemIntegration—Ifyouhavetimeconstraints,limitedin-housetechnicalresources,orotherprojectchallenges,NIAllianceProgrammemberscanhelp.Tolearnmore,callyourlocalNIofficeorvisitni.com/alliance.

Ifyousearchedni.comandcouldnotfindtheanswersyouneed,contactyourlocalofficeorNIcorporateheadquarters.YoucanalsovisittheWorldwideOfficessectionofni.com/niglobaltoaccessthebranchofficeWebsites,whichprovideup-to-datecontactinformation,supportphonenumbers,emailaddresses,andcurrentevents.

Page 33: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

RelatedDocumentationThefollowingdocumentscontaininformationthatyoumightfindhelpfulasyouusethishelpfile:

LabVIEWHelpMeasurementStudioHelpLabWindows/CVIHelp

Page 34: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

ImportantInformationWarrantyCopyrightTrademarksPatentsWarningRegardingUseofNIProducts

Page 35: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

WarrantyThemediaonwhichyoureceiveNationalInstrumentssoftwarearewarrantednottofailtoexecuteprogramminginstructions,duetodefectsinmaterialsandworkmanship,foraperiodof90daysfromdateofshipment,asevidencedbyreceiptsorotherdocumentation.NationalInstrumentswill,atitsoption,repairorreplacesoftwaremediathatdonotexecuteprogramminginstructionsifNationalInstrumentsreceivesnoticeofsuchdefectsduringthewarrantyperiod.NationalInstrumentsdoesnotwarrantthattheoperationofthesoftwareshallbeuninterruptedorerrorfree.AReturnMaterialAuthorization(RMA)numbermustbeobtainedfromthefactoryandclearlymarkedontheoutsideofthepackagebeforeanyequipmentwillbeacceptedforwarrantywork.NationalInstrumentswillpaytheshippingcostsofreturningtotheownerpartswhicharecoveredbywarranty.NationalInstrumentsbelievesthattheinformationinthisdocumentisaccurate.Thedocumenthasbeencarefullyreviewedfortechnicalaccuracy.Intheeventthattechnicalortypographicalerrorsexist,NationalInstrumentsreservestherighttomakechangestosubsequenteditionsofthisdocumentwithoutpriornoticetoholdersofthisedition.ThereadershouldconsultNationalInstrumentsiferrorsaresuspected.InnoeventshallNationalInstrumentsbeliableforanydamagesarisingoutoforrelatedtothisdocumentortheinformationcontainedinit.Exceptasspecifiedherein,NationalInstrumentsmakesnowarranties,expressorimplied,andspecificallydisclaimsanywarrantyofmerchantabilityorfitnessforaparticularpurpose.Customer'srighttorecoverdamagescausedbyfaultornegligenceonthepartofNationalInstrumentsshallbelimitedtotheamounttheretoforepaidbythecustomer.NationalInstrumentswillnotbeliablefordamagesresultingfromlossofdata,profits,useofproducts,orincidentalorconsequentialdamages,evenifadvisedofthepossibilitythereof.ThislimitationoftheliabilityofNationalInstrumentswillapplyregardlessoftheformofaction,whetherincontractortort,includingnegligence.AnyactionagainstNationalInstrumentsmustbebroughtwithinoneyearafterthecauseofactionaccrues.NationalInstrumentsshallnotbeliableforanydelayinperformanceduetocausesbeyonditsreasonablecontrol.Thewarrantyprovidedhereindoesnotcoverdamages,defects,malfunctions,orservicefailurescausedbyowner's

Page 36: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

failuretofollowtheNationalInstrumentsinstallation,operation,ormaintenanceinstructions;owner'smodificationoftheproduct;owner'sabuse,misuse,ornegligentacts;andpowerfailureorsurges,fire,flood,accident,actionsofthirdparties,orothereventsoutsidereasonablecontrol.

Page 37: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

CopyrightUnderthecopyrightlaws,thispublicationmaynotbereproducedortransmittedinanyform,electronicormechanical,includingphotocopying,recording,storinginaninformationretrievalsystem,ortranslating,inwholeorinpart,withoutthepriorwrittenconsentofNationalInstrumentsCorporation.

Page 38: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

TrademarksCVI™,DataSocket™,FieldPoint™,LabVIEW™,MeasurementStudio™,NationalInstruments™,andni.com™aretrademarksofNationalInstrumentsCorporation.Productandcompanynamesmentionedhereinaretrademarksortradenamesoftheirrespectivecompanies.

Page 39: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

PatentsForpatentscoveringNationalInstrumentsproducts,refertotheappropriatelocation:Help»Patentsinyoursoftware,thepatents.txtfileonyourCD,orni.com/patents.

Page 40: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

WARNINGREGARDINGUSEOFNATIONALINSTRUMENTSPRODUCTS(1)NationalInstrumentsproductsarenotdesignedwithcomponentsandtestingforalevelofreliabilitysuitableforuseinorinconnectionwithsurgicalimplantsorascriticalcomponentsinanylifesupportsystemswhosefailuretoperformcanreasonablybeexpectedtocausesignificantinjurytoahuman.(2)Inanyapplication,includingtheabove,reliabilityofoperationofthesoftwareproductscanbeimpairedbyadversefactors,includingbutnotlimitedtofluctuationsinelectricalpowersupply,computerhardwaremalfunctions,computeroperatingsystemsoftwarefitness,fitnessofcompilersanddevelopmentsoftwareusedtodevelopanapplication,installationerrors,softwareandhardwarecompatibilityproblems,malfunctionsorfailuresofelectronicmonitoringorcontroldevices,transientfailuresofelectronicsystems(hardwareand/orsoftware),unanticipatedusesormisuses,orerrorsonthepartoftheuserorapplicationsdesigner(adversefactorssuchasthesearehereaftercollectivelytermed"systemfailures").Anyapplicationwhereasystemfailurewouldcreateariskofharmtopropertyorpersons(includingtheriskofbodilyinjuryanddeath)shouldnotbereliantsolelyupononeformofelectronicsystemduetotheriskofsystemfailure.Toavoiddamage,injury,ordeath,theuserorapplicationdesignermusttakereasonablyprudentstepstoprotectagainstsystemfailures,includingbutnotlimitedtoback-uporshutdownmechanisms.Becauseeachend-usersystemiscustomizedanddiffersfromNationalInstruments'testingplatformsandbecauseauserorapplicationdesignermayuseNationalInstrumentsproductsincombinationwithotherproductsinamannernotevaluatedorcontemplatedbyNationalInstruments,theuserorapplicationdesignerisultimatelyresponsibleforverifyingandvalidatingthesuitabilityofNationalInstrumentsproductswheneverNationalInstrumentsproductsareincorporatedinasystemorapplication,including,withoutlimitation,theappropriatedesign,processandsafetylevelofsuchsystemorapplication.

Page 41: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

ConventionsThishelpfileusesthefollowingconventions:» The»symbolleadsyouthroughnestedmenuitemsanddialogboxoptionstoafinalaction.The

sequenceFile»PageSetup»OptionsdirectsyoutopulldowntheFilemenu,selectthePageSetupitem,andselectOptionsfromthelastdialogbox.

Thisicondenotesatip,whichalertsyoutoadvisoryinformation.

Thisicondenotesanote,whichalertsyoutoimportantinformation.

bold Boldtextdenotesitemsthatyoumustselectorclickoninthesoftware,suchasmenuitemsanddialogboxoptions.Boldtextalsodenotesparameternames,emphasis,oranintroductiontoakeyconcept.

green Underlinedtextinthiscolordenotesalinktoahelptopic,helpfile,orWebaddress.

italic Italictextdenotesvariablesorcrossreferences.Thisfontalsodenotestextthatisaplaceholderforawordorvaluethatyoumustsupply.

monospace Textinthisfontdenotestextorcharactersthatyoushouldenterfromthekeyboard,sectionsofcode,programmingexamples,andsyntaxexamples.Thisfontisalsousedforthepropernamesofdiskdrives,paths,directories,programs,subprograms,subroutines,devicenames,functions,operations,variables,filenamesandextensions,andcodeexcerpts.

Page 42: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

BranchOfficesOffice TelephoneNumber

Australia 61296728846

Austria 4306624579900

Belgium 32027570020

Brazil 551132623599

Canada(Calgary) 4032749391

Canada(Montreal) 5142885722

Canada(Ottawa) 6132335949

Canada(Québec) 5146948521

Canada(Toronto) 9057850085

Canada(Vancouver) 5146857530

China 862165557838

CzechRepublic 420224235774

Denmark 4545762600

Finland 3850972572511

France 330148142424

Germany 490897413130

Greece 302104296427

HongKong 26453186

India 918051190000

Israel 972036393737

Italy 3902413091

Japan 81354722970

Korea 820234513400

Malaysia 60390596711

Mexico 0018000100793

Netherlands 310348433466

NewZealand 64099140488

Norway 47032277300

Poland 480223390150

Portugal 351210311210

Russia 70952387139

Singapore 6562265886

Slovenia 38634254200

SouthAfrica 270118058197

Spain 34916400085

Sweden 460858789500

Page 43: NI DataSocket Server Help - documentation.help · from National Instruments FieldPoint modules, National Instruments LabVIEW Datalogging and Supervisory Control (DSC) Module processes,

Switzerland 41562005151

Taiwan 886225287227

UnitedKingdom 4401635523545

UnitedStates(Corporate) 5126830100