资源描述
Nl-lndustrial Communications for DeviceNet2023-03-01Nl-lndustrial Communications for DeviceNetContentsNl-lndustrial Communications for DeviceNet Help.6Overview.7Error Codes.8DeviceNet Fundamentals.20Connection Type.20Expected Packet Rate.21Explicit Messaging Object.22Interface Object.23I/O Object.23Poll Mode.24Reset Request Message Format.25LabVIEW and DeviceNet Data Types.27Actions that Load or Unload the Bit File on the CompactRIO RT Controller.28Upgrading the Firmware of the Nl 9882 Module.30Tutorial:Creating Applications on Different Types of Chassis and Controllers.31Creating Applications on CompactRIO Targets with Nl Linux Real-Time.31Step 1.Installing the Software on the Host.31Step 2.Installing Nl-lndustrial Communications for DeviceNet on the CompactRIO RT Controller.31Step 3.Creating Applications by Using the DeviceNet Vis.33Creating Applications on CompactRIO Targets with Operating Systems Other Than NlLinux Real-Time.33Step 1.Installing the Software on the Host.33Step 2.Installing Nl-lndustrial Communications for DeviceNet on the CompactRIO RT Controller.34Step 3.Adding an FPGA Target and the Nl 9882 Module to the LabVIEW Project.34Step 4.Running an FPGA VI to Load DeviceNet.36Step 5.Waiting to Detect Interfaces.37Step 6.Creating Applications by Using the DeviceNet Vis.38Creating Applications on PCI and PXI.39DeviceNet Hardware.40Overview.40/Nl-lndustrial Communications for DeviceNetCabling.42DeviceNet Vis.46Close Object.47Convert For DeviceNet Write.48Convert From DeviceNet Read.50Easy IO Close.52Easy IO Config.53Get DeviceNet Attribute.60Open DeviceNet Explicit Messaging.63Open DeviceNet Interface.65Open DeviceNet IO.67Operate DeviceNet Interface.73Read DeviceNet IO.77Set DeviceNet Attribute.78Wait For State.81Write DeviceNet IO.84Advanced Vis.85Get Driver Attribute.86Open CAN Frame Read.92Read CAN Frame.93Read DeviceNet Explicit Message.95Set Driver Attribute.96Write CAN Frame.102Write DeviceNet Explicit Message.103Function Block.105Measurement&Automation Explorer Help for DeviceNet.109DeviceNet Device.109Product.109Serial Number.109Interface.109Slot.110Legacy.IllGetting Started with Nl I/O Variable and Function Block.IllStep 1.Installing the Software.Ill National InstrumentsNl-lndustrial Communications for DeviceNetStep 2.Adding a Real-Time Controller.112Step 3.Adding a DeviceNet Master and Connected Slave Devices.112Step 4.Using Nl I/O Variable and Function Block to Develop Applications.114Project Explorer Window Environment.114LabVIEW Project Items.115LabVIEW Project Item Menus.116DeviceNet Change Slave Address Dialog Box.117DeviceNet Change Slave Baud Rate Dialog Box.117DeviceNet Datasheet Dialog Box.118DeviceNet I/O Item Editor Dialog Box.118DeviceNet Master Interface Online Test Panel.119DeviceNet Master Properties Dialog Box.120DeviceNet Master Settings Dialog Box.122DeviceNet Slave Device Online Test Panel.122DeviceNet Slave Device Properties Dialog Box.124DeviceNet Slave Settings Dialog Box.128DeviceNet Parameter Editor Dialog Box.129DeviceNet Parameter Publish Option Dialog Box.129Configuring the DeviceNet Network.130Adding/Editing/Removing a Real-Time Controller.131Adding/Editing/Removing a DeviceNet Master Item.132Adding/Editing/Removing a DeviceNet Slave Device.134Adding/Editing/Removing a DeviceNet I/O Variable.136Enabling the Nl Scan Engine on Windows.137Changing the Scan Period.138Deploying and Undeploying a DeviceNet Configuration.138Uploading a DeviceNet Configuration.138Comparing the DeviceNet Configurations.139Accessing a Parameter.140Monitoring the Slave Device State.141Assigning or Changing a Device Datasheet.141Importing a Device Datasheet.142Changing a Slave Device Address.142Changing a Slave Device Baud Rate.1434 Nl-lndustrial Communications for DeviceNetDeveloping the DeviceNet Application in LabVIEW.143Notice to Develop the DeviceNet Application in LabVIEW.144I/O Variable.144Palette.144Usingthe Nl Scan Engine.145Nl Scan Engine Mode.145Project Data,Scan Engine Data,and Device Data.147Legacy Troubleshooting.147Specifications.149PCI-DeviceNet Hardware Specifications.149PXI-DeviceNet Hardware Specifications.151Electromagnetic Compatibility.153CE Compliance.155Online Product Certification.156Environmental Management.158Troubleshooting.160 National InstrumentsNl-lndustrial Communications for DeviceNetApril 2018,372945J-01This help includes information about DeviceNet concepts,hardware specifications,step-by-step instructions on how to use Nl-lndustrial Communications for DeviceNet,and reference information.The reference information includes the description of the DeviceNet Vis and palettes for applications on CompactRIO,PCI,and PXL6 Nl-lndustrial Communications for DeviceNetOverviewDeviceNetDeviceNet is a digital multi-drop communication network between industrial controllers and I/O devices.Each device and/or controller is a node on the network.DeviceNet supports multiple communication hierarchies and message prioritization as a producer-consumer network.You can configure DeviceNet systems to operate in a master-slave or distributed control architecture using peer-to-peer communication.Nl-lndustrial Communications for DeviceNetThe Nl-lndustrial Communications for DeviceNet enables you to configure and control DeviceNet devices on a DeviceNet network.The Nl-lndustrial Communications for DeviceNet contains the following components:Hardware,which supports the real-time DeviceNet network operation Software,including the DeviceNet driver,the DeviceNet Vis for CompactRIO,PCI,and PXI National InstrumentsNl-lndustrial Communications for DeviceNetError CodesThe DeviceNet Vis can return the following error codes.Refer to the KnowledgeBase for more information about correcting errors in LabVIEW.CodeDescription-2147136510Board self test failed(code 2).Solution:Try to re install the driver or switch the slot(s)of the boar d(s).If the error persists,contact National Instru merits.-2147136509Board self test failed(code 3).Solution:Try to re install the driver or switch the slot(s)of the boar d(s).If the error persists,contact National Instru merits.-2147136508Board self test failed(code 4).Solution:Try to re install the driver or switch the slot(s)of the boar d(s).If the error persists,contact National Instru merits.-2147136507Board self test failed(code 5).Solution:Try to re install the driver or switch the slot(s)of the boar d(s).If the error persists,contact National Instru merits.-2147136506Board self test failed(code 6).Solution:Try to re install the driver or switch the slot(s)of the boar d(s).If the error persists,contact National Instru merits.-2147136505The computer goes to the hibernation mode an d the board is powered off.Solution:Prevent th e computer from going to the hibernation mode by using the control panel.-2147136504A Write queue is overflowed.Solution:Wait until queue space becomes available and try again.-2147136503The firmware of the board does not answer a co mmand.Solution:Stop your application and ex ecute a self test.Try to deactivate or reactivate t he driver in the Device Manager.If the problem persists,contact National Instruments.8 Nl-lndustrial Communications for DeviceNet-2147136502The operation is timeout.Solution:Specify a ti meout period that is long enough to complete t he operation.Or use less time to complete the o peration.For example,read less data in an oper ation.-2147136501A Read queue is overflowed.Solution:Reduce y our data rate or call Read more frequently.-2147136500The Read buffer is too small to hold a single fra me.Solution:Provide a buffer that is large enou gh.-2147136497You cannot conduct a self test because the boar d is in use by an application.Solution:Stop all t he DeviceNet applications before executing a se If test.-2147136496Allocation of memory failed.You do not have en ough memory.Solution:Add more RAM or try to use fewer resources in your applications.The re sources include IO variables and function blocks-2147136495The maximum number of sessions is exceeded.Solution:Use fewer sessions.-2147136494The maximum number of connection objects is exceeded.Solution:Use fewer connection objec ts in your sessions.-2147136493The maximum number of interface devices is de tected.Solution:Use fewer devices.-2147136492A driver support file is missing.Solution:Try to r einstall the driver.If the error persists,contact N ational Instruments.-2147136480An invalid reference has been passed to a Devic eNet function.Solution:Only pass a reference re trieved from the DeviceNet function or an I/O co ntrol name in a LabVIEW project.-2147136479An invalid handle has been passed to a DeviceN et system function.Solution:Only pass a valid s ystem handle.-2147136478A device handle was expected for a DeviceNet fu nction.Solution:Only pass a device handle.National InstrumentsNl-lndustrial Communications for DeviceNet-2147136477An interface handle was expected for a DeviceN et function.Solution:Only pass an interface han die.-2147136475Create Timing Source VI is not supported on Win dows.This VI is supported on LabVIEW Real-Tim e targets only.-2147136399The transceiver value is invalid or you are trying to perform an operation that requires a differen t transceiver.Solution:Set a valid value.-2147136398The baud rate value is invalid.Solution:Set a val id value.-2147136397The baud rate value is invalid.Solution:Set a val id value.-2147136396The bit timing value is invalid.Solution:Set a va lid value.-2147136395The baud rate setting does not match the allow ed range of the transceiver.Solution:Change th e setting of either the baud rate orthe transceiv er.-2147136394The configured timing source is not known by th is interface.Solution:Make sure that you pass a valid timing value.-2147136393The configured synchronization source is inappr op ri ate for the hardware.Solution:Pick an appr opriate timing source for the hardware.-2147136392The source that you connected to the Master Ti mebase destination is missing.When the start tr igger is received,the interface verifies that a sig nal is present on the configured source.This che ck has determined that this signal is missing.So lution:Verify that your cables are configured cor rectly and that yourtimebase source is generati ng an appropriate waveform.-2147136391The source that you connected to the Master Ti mebase destination is not generating an approp riate signal.When the start trigger is received,th e interface verifies that a signal of a known freq uency is present on the configured source.This check has determined that this source is genera10 Nl-lndustrial Communications for DeviceNetting a signal,but that the signal is not one of the supported frequencies for this hardware.Soluti on:Verify that your source is generating a signal at a supported frequency.-2147136383An invalid parameter has been passed to a Devic eNet VI.For example,a null pointer is passed in.Solution:Check the input parameters and ensur e they are valid.You can reference the VI descrip tion to know each parameter.-2147136382Error occurs when you acquire the driver resour ce.Solution:Add more RAM or try to use fewer r esources in your applications.The resources inc lude IO variables and function blocks.-2147136381The operation is timeout.Solution:Specify a ti meout period that is long enough to complete t he operation or change the operation that can b e complete in less time.-2147136380The DeviceNet hardware can not be found or ha s been removed.Solution:1.Ensure the Device Net hardware is correctly installed.2.Ensure yo u use the correct port name.Get the port name of your device by using MAX.-2147136368The interface name given does not specify a vali d and existing interface.Solution:Use a valid an d existing interface port name.-2147136367The interface name is invalid.Solution:Ensure y ou use a valid interface name.The name of the DeviceNet interface is an ASCII string with forma t DeviceNetx,where x is a decimal number star ting at one that indicates which interface is bein g used.For example,DeviceNetl,DeviceNet2,and DeviceNet32.-2147136366The object handle passed in is invalid.Solution:Use a correct object handle returned from the 0 pen DeviceNet Interface VI,the Open DeviceNet Explicit Messaging VI,or the Open DeviceNet IO VI.-2147136365The property ID is invalid for the specified objec t type.Solution:Ensure you use a valid property ID.National InstrumentsNl-lndustrial Communications for DeviceNet-2147136364A object handle is passed in,but the correspond ing object has not been opened or has been clos ed.Solution:Use an object handle in the followi ng sequence:open,use,and close.-2147136363The interface object has not been opened befor e it is used.Solution:Use an object handle in th e following sequence:open,use,and close.-2147136362The I/O connection object has not been opened before it is used.Solution:Use an object handle in the following sequence:open,use,and close.-2147136361The interface object has not been started.Soluti on:Start the interface before performing this op e ration.-2147136360The I/O connection input length is not valid.Sol ution:Use a valid input length.The valid input I ength for Poll,COS,and Cyclic ranges from 0 to 255.The valid input length for Strobe ranges fro m 0 to 8.-2147136359The I/O connection output length is not valid.S olution:Use a valid output length.The valid out put length for Poll,COS,and Cyclic ranges from 0 to 255.The valid output length for Strobe is 1.-2147136358The property is get-only and can not be set.Solu tion:Check the property ID and find out some pr operties are get-only.-2147136357The property is set-only and can not be used to get an attribute.Solution:Check the property ID and find out some properties are set-only.-2147136356The property size passed in is not correct.Soluti on:Check the manual or header file to determin e the correct property size.-2147136355The property ID and the object handle do not m atch.For example,the property ID is an I/O conn ection property,but the object handle passed in is an Explicit Messaging Object.Solution:Use ap prop ri ate property ID for the given object type.-2147136354This error occurs when you start an EM request or response cycle before the previous cycle finis hed.At any given time,only one EM request or r上 Nl-lndustrial Communications for DeviceNetesponse cycle is allowed to use a DeviceNet inte rface port.Solution:Use the following order for the EM request or response:write EM,wait for re ad available,and read EM.-2147136353This error occurs when you try to send an EM re quest to a slave device but an EM request or res ponse cycle is still pending on another slave dev ice.At any given time,an EM request or respons e cycle can only pend on a single slave device.S olution:The existing EM request or response eye le on a slave device must end before a new EM r equest or response cycle starts.-2147136352This error occurs when you try to get an EM resp onse from a slave device,but the EM request or response cycle is pending on another slave dev
展开阅读全文