Error 您所在的位置:网站首页 可能未正确设置配置设置 Error

Error

2023-07-12 09:35| 来源: 网络整理| 查看: 265

Solution

This error occurs when NI-VISA expects to receive a message or response from a device, but that message is not received within the timeout period, or at all. This error is commonly caused by improper physical connection, incorrect communication settings, or using commands that the device does not recognize. This document will walk you through the process of troubleshooting each component of your system. 

Test the Physical Connection Make sure that the cable is properly connected to your device.If possible, try a different cable.Depending on your device, follow the instructions in the appropriate article below to ensure that your communication settings are correct: Set Up Communication with Serial Instruments in LabVIEW using NI-VISAGPIB Instrument Control TutorialSet Up Communication With USB InstrumentEthernet Instrument Control Tutorial Ensure that you are using the correct termination characters for your device.(If using a serial device) Perform a Serial Loopback Test. This can highlight problems in the serial port, the cable, or the software generating the messages without having to connect to third party hardware.If using a PXI/PXIe Serial card try changing it to a different chassis slot. Run a Shipping Example If you have confirmed that your physical connection and communication settings are configured properly, try running a shipping example. A shipping example will perform basic inputs and outputs to your device, and may help narrow down the specific functions or commands that are causing the error.  For GPIB examples, open LabVIEW and navigate to the Help >> Find Examples >> Hardware Input and Output >> GPIB >> GPIB with VISA Functions vi.For serial examples, open LabVIEW and navigate to the Help >> Find Examples >> Hardware Input and Output >> Serial >> Simple Serial.vi. There is also an example specific to RS-485 communication available at Help >> Find Examples >> Hardware Input and Output >> Serial >> RS-485 Transceiver Control.vi.   Troubleshoot Your LabVIEW Application Try to narrow down your program to the smallest possible section of code that consistently reproduces the error. Compare this section to a shipping example, or try modifying a shipping example to perform the same task. Note: Be sure to save a copy of the shipping example before modifying. Refer to your device’s user manual to ensure that you are using the correct command syntax.You can configure indicators in LabVIEW to display hidden characters such as linefeed (\n), carriage return (\r), or tab (\t). Use this functionality to ensure that your messages and termination characters match the device’s user manual.Refer to the manual for your device to see if a response is expected for the particular command you are sending.If you are using older instrumentation, try implementing a Wait function between VISA Write and Read. Older instrumentation may not respond immediately to commands written to the port, causing a large delay between VISA Write and VISA Read commands. Applications designed to interface with this type of instrumentation should anticipate this delay. Alternatively, if the response time from the device is not consistent, you can add code to handle the timeout error. You may want to retry the VISA Read operation a certain number of times before throwing the error to the user. Manually designate a timeout using the VISA Set Timeout Property. For more information, refer to Configuring Timeout for VISA Sessions. Take an I/O Trace. This will give you a record of all commands sent between NI-VISA and your device.The manufacturer of your device may provide a LabVIEW instrument driver. Check the Instrument Driver Network (IDNet), or refer to the manufacturer’s website. If you installed a third-party instrument driver, follow the steps in After Installing 3rd Party VISA Software NI VISA No Longer Works to make sure NI-VISA is the primary implementation of VISA on your system.


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有