VISA read returns still a Virgin

Please see the code attached screenshot. Its a VISA session trying to communicate with a BOX to BlueTooth converter. In the box marked red, I don't read any data at all. This despite the fact the property node "Bytes to the Port" read a value of 27! So where the bytes are? And isn't that all readings are like that. -in the previous state, I have a question for the Version not as "V"."for which read VISA's 'CANgine BT Version xxxx'. I don't know why its t read the only statements always white. ?? I tried the while loop with delays of 10 to 200 ms and nothing wrong with the orders - they work as intended on the Hyper Terminal.  And even in this code, I am able to read the number of bytes that 27. So whay aren't? LV2012 has a new data type: INVISIBLE?


Tags: NI Software

Similar Questions

  • Visa reading reads all bytes to the port

    I have a camera that I communicate via the Serial Port. I have a standard communications protocol. For a particular command, I know that the exact number of bytes expected in return. I send my order. I see the correct number and exepcted to bytes in the port. I then read the number of bytes in the port. However, the VISA read returns only the first two bytes.

    I contacted success with this camera and this Protocol for more than 130 commands unique and different. There are only about 6 orders in which the read visa does not read all the bytes in the port. Anyone know why that would happen?  I expect to see 6 bytes. I see 6 bytes. I have visa read the command with 6 bytes. The visa read returns only the first 2 bytes. It's very very frustrating. I can do this exact process even with a different command. I expect 45 bytes of this command. I see 45 bytes with this command and I read 45 bytes with this command.

    I don't think that it is device connected as I can converse with success with the same camera on the same computer with the same cable of connector using non-LabView. It seems to be a problem strictly related to labview and VISA read the order. If someone could help that would be greatly apprecicated.

    Thank you.

    What is the exact byte stream that await you in return with this command?

    Instead of opening VISA, use the configuration Serial Port VI.  In this way, you can override the default values.  It looks that your instrument using all the defaults VISA of speed in baud rate, start and stop bits, etc.  However, in the VISA software, there is a failure to use a termination character, and this character is 10 (0x0A).  If you use the configure Serial Port, you can tell the pilot VISA do not use the stop character.

  • USB-to-serial VISA read problems

    Hello

    I'm trying to control several mass flow controllers attached to a hub series Alicat BB9. The hub is then connected to the computer via RS-232 series. The computer on that what is done is not a serial port, so an adapter series / usb is used. When it is plugged in, the computer (XP) recognizes the series / usb and requires a driver. I installed a driver from the manufacturer of the adapter, downloaded from the internet. The same driver is used on another computer (Vista) without any problem.

    I am able to verify that the device is installed and operating correctly via the Device Manager. I am also able to see what the device COM port is turned on. Opening OR measurement and Automation Explorer (MAX), I am able to see the COM port listed under serial devices. I am able to validate the port settings and open a VISA session with the device. However, any time I try to read from the device, what happens to expired. I get the error xBFFF0015. I have for the parameter timeout at 5000 and 10,000 without change.

    When you run a VI that is used in the laboratory to control the same configuration, I can trace the error to a VISA read Subvi. The returned 'buffer' is not a value and will raise an error. I can plug the USB key into a laptop that has the same VI and it will run without problem. The Subvi "VISA read" return a value when running on the laptop.

    I'm under LabView 8.5 and 4.4 of VISA.

    If anyone has a suggestion that could get this to work I would appreciate it a lot. Also, I am a graduate. student who is working on this issue and my understanding of LabView is not terribly large, so dumbed-down responses would be nice

    Thank you for your help.

    Connor

    Thank you for the follow-up. However, I was able to solve the problem already... It was simply a driver update that solved my problem. The driver being used is "Prolific usb-to-serial" and version 1.. I upgraded 2.0.2.1 and it works fine now. I thought I had updated to the most recent before and apparently I had not... kind of delay. But thanks anyway!

  • VISA Read (error BFF0015)

    Hi all

    I use COM VISA library and c# communication with my instrument via TCP/IP.

    I add the reference "VISA COM 3.0 Type Library ' to my c# project and try to establish communication using the following codes:

    *********************************

    Ivi.Visa.Interop.ResourceManager ResMsg = new Ivi.Visa.Interop.ResourceManager ();
    Ivi.Visa.Interop.FormattedIO488Class ioClass = new Ivi.Visa.Interop.FormattedIO488Class ();

    Imsg = Ivi.Visa.Interop.IMessage (ResMsg.Open ("TCPIP0::192.168.0.170::10001:OCKET", Ivi.Visa.Interop.AccessMode.NO_LOCK, 8000, "") as IMessage);
    ioClass.IO = Imsg;

    ioClass.WriteString ("* RST", true);

    ioClass.WriteString ("* IDN?", true);

    String ret = ioClass.ReadString ();

    Console.WriteLine ("ID:" + ret);

    **********************************

    I could write "* RST ' command to the device without errors. And I could see that the device really do a reset of the command.

    But when I send "* IDN?" and read the answer, I still get a TIME_OUT error. Even if I add "\r\n" at the end of the command and increase the value of the time-out period, can I still the same error. Not only "* IDN?" but also another order of reading as "* STB? ', they all can the same timeout error.

    But when I use the VISA-ReadSTB function, it returns the correct data.

    I also tried to use Labview VISA-open, entry VISA, VISA-read for the same test. I also have an error (BFF0015) after VISA-read.

    I also use a programm IO monitor to view the data. I find that I have seen the answer, but I still have a time-out error. Currently, I could only read the answer by Agilent IO control successfully.

    I'm using c# 2008, Labview 8.2.1, VISA 5.0.3

    Any notice will be really appreciated!

    Kind regards

    Please take a look at this KB. Maybe this can help you solve your problem.

    Why should I receive Timeout error-1073807339 on VISA Read or Write?

    http://digital.NI.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0?OpenDocument

    See you soon

  • VISA reading significantly slows down to 20 Hz (Labview, Arduino + Xbee project)

    Hello

    I am quite new to Labview and Arduino, so I apologize if I use the incorrect terms. I'm having some trouble with the next project, I hope that you guys can give me some advice!
    I have 16 sensors connected to the 16 analog pins on an Arduino mega Board. This Council has a shield mounted upon him, with a Xbee module wireless. I have another Xbee module that communicates with him and it is mounted on a USB dongle that plugs into a PC with Labview 2015.

    The A/D analog Arduino pin output is read and sent every 50ms to the Xbee module connected to the PC. So every 50ms (that is, a frequency of 20 Hz), a new line of analog readings by commas is sent, using AnalogRead and Serialprint in the Arduino. These data are fed to a Labview code with architecture of producer-consumer. Copy the following code configures a serial port of VISA, reads the data, it converts a voltage value and writes the data to a text file (see block_diagram.jpg).

    The problem is that at a frequency of 20 Hz (with the configuration of the attached jpg) when you reach 400 treatment iterations the code slows down considerably and values are not parsed correctly. It behaves as if the queue is full (but the queue of elements indicators show 0) or memory or the buffers were full. It seems quite surprising to me given that the sampling rate is so slow. I tried a few configurations setting the buffer size, empty the buffer by using the queue time, but nothing seemed to work. Is it because the processor loop takes too much time to iterate? I tried to disable data analysis, conversion of voltage and the generation of text file, just keep reading and still have the same behavior.

    This may be the cause? Suggestions to change the block diagram are welcome! Is there a better way to do this than with VISA or queues...?

    I use Labview 2015 on Windows 7.

    Thank you!!

    sminanog wrote:

    It behaves as if the queue is full (but the queue of elements indicators show 0) or memory or the buffers were full.

    You think along the good things. But the big problem I see here is that you have a table growing up to stop the program.  You must move the file writing to be inside the loop of your consumption.  This will eliminate the need to constantly develop your table in the shift register, with tons of memory and causing copies of memory (which is very expensive).

    The other concern I have is the speed at which data is available.  If you have a baud rate 9600, then in the 50ms debit you can pass 48 bytes.  This leaves 3 bytes per sample, including the comma.  If you have a debit 115 200 baud baudrate, it turns into 576 bytes, you can send the 50ms.  So the lesson here is to make sure that you use a transmission speed which is fast enough to handle the data that you want to send.

  • VISA read lose characters beyond the end of the output string

    Hello

    I wrote a VI to take a string of output data of an ardunio Uno and analysand. I use the vi read Visa to enter the output channel of the unit. In the end I will connect a device that actually gives the value in this type of format string: (#80212164,2289,2292,2296,2300,2328,2289,2297,2290,2300,2308,2292,2295,2298,2289,22,24,0 *).

    So after a large number of loops, the program starts to drop the last characters of the string that it generates. If the string of Visa Read output reads something like (#80212164,2289,2292,2296,2300,2328,2289,2297,2290,2300,2308,2292,2295,2298,2289,22,24,). The only way to solve this problem, once it has occurred must completely close labview (completely). Once I open again and start the program running, all is well in the world.

    Has anyone had this problem? I tried to debug it in different ways and the only weird symptom I have other Visa Read function lose a few characters of the string is the fact that by looking at the bytes to the Port after I read visa, is that she starts showing five bytes instead of zero.

    my last attempt at resolving this issue is attached.

    Note: The Ardunio outputs a string of this format every 2 seconds with the values being incrimental on a specified range. (80212164,2289,2292,2296,2300,2328,2289,2297,2290,2300,2308,2292,2295,2298,2289,22,24,0 # *)

    You can configure the * your character of termination if your Arduino does not send the carriage return or line feed.  Use the configure a Serial Port to ensure that your settings are correct.  You can also use this VI to increase your timeout so that you no longer need your waiting.

  • VISA read timeout

    I don't know why the function of reading im getting an error of timeout to the VISA (error that says "timeout expired before the operation is over"). I made sure the serial port of Labview and my cameras are serial port configured exactly the same. I even tested hyperterminal with the same port as in labview settings and it works perfectly, but my labview program gives me an error. My device ends each order he sent with a carriage return, then I mounted VISA READ to stop playback of data when he meets the CR character. I also made sure the carriage return was infact sent by my camera. Any thoughts?


  • The value read by visa read that VI is not correct!

    I design a labview program to control the Agilent E5072C Network Analyzer. When I want to get the value of this instrument, I use VI "VISA read" listed in the plate. However, the value read from this VI's latest measurement of time value. For example, the last time that the read value is 1.0 db, and this time the measurement value is 1.2 db. But when I use 'VISA read' VI to extract the value is 1.0 db.

    Agilent also provide a VI for this device to read the measurement value and she was always correct value. If someone could tell me why? need to do any action before the value read from this instrument if I want to use VI "VISA reading" instead of Agilent VI?

    You are probably reading too quickly.  Reading it in NOR-MAX, you do it by hand, it takes more time.  When you do that programmatically, it is "instant".  Try using the * OPC? command to activate your order in a query.  He returned then a '1' in the buffer.  Read the '1' and then create the command fetch.

    For Dennis:

    I've had bad experiences with the drivers provided by the manufacturer to the point where I don't even try to use more.  But Agilent is also anal about their drivers, because they are on their books, they should pose no problems.

  • Visa read stops execution

    Hi all

    I have a little problem with the control of my power supply E3631A Agilent via Labview:

    I downlaoded all drivers and with the help of you guys I even persuaded that it is running properly.

    At least that's what I thought.

    Turns out he didn't really. At some point the VI just stops.

    Using the execution mode of nail I knew where the problem was:

    The VISA read error query of the configure output has stopped working.

    I have no explanation for it. I get unpredictable and I have not yet managed to influence by changing the different settings.

    (And I tried it for a while now..)

    I built a very simple example VI to show you where the problem lies.

    Explanation:

    I'm basically feeding the output a voltage variable and at the same time measuring how long the vi fonctionnee already has...

    I thank you very much in advance,

    keksbold

    OK it looks like as the time to copy this section of the FAQ: (posted in a place not yet public ~ ~ ~ Hey Jordan? is still FAQ on the right way?)

    "

    In this topic, we will discuss some of the common problems that have been observed using devices with LabVIEW on Windows operating systems.  Many of these points apply also in other environments, but the examples will use the Windows 7 operating system.

    FAQ 1: USB device stops working unexpectedly.

    The first thing to look at is the OS power save options.  There is a global trend towards "Green" electronic development and energy the coast to stars become fairly common.  "If his is used not to turn it off" is not new.  Cave men learned how to Bank a fire in order to preserve the energy that would otherwise be wasted.  Similarly, the Windows operating system has an energy saving function to stop power to the USB hubs when no user activity is present.  In automated systems, this feature can cause problems since remove power USB hub will stop the USB device.   Solution: use Device Manager to change the Power Options USB hub.

    FAQ2: I put the power options and my device connection is still not reliable: Don't forget, the USB ports on the computer are often the least expensive that can be mounted on the chassis and system share the PC power supply USB-powered. Most of the uses of USB are temporary connections such as a USB key or a camera.  These connections don't require high reliability because there the user interacts with it.  Mounted sudden power and fault tolerance at worst cause the operator to retry the transfer of data.  Automated systems require a bit more robustness.  Solutions:

    1) ALWAYS use a free external powered hub. Perform your due diligence genius and to inspect devices specifications too - if you do not find them for this device which should clue pick you a product from a vendor who published their specifications.

    2) high noise environments require the use of ferrites on the USB cable- and do not buy the cheapest cable either! The good markets are poorly protected.

    3) PROTECT connections HUB-if you have a USB 2.0 device and Joe User plugs in a 1.0 device into an open slot, managed by the same hub-Bingo all ports on the rear hub can convert USB1.0.  WORSE, there are a lot of damaged or marginally engineered USB devices out there.  Joe User should cause power fluctuations when it is inserted or removed from the hub just don't let it happen!

    FAQ3: I test USB devices and the operating system can not find more.

    It is a Plug-and-Play feature that deserves exposure.  When you connect a device P - n - P BONE remembers his serial number in an entry in HKEY registry (hive-Key).  This is useful when (for example), you want a specific instrument, say a NOR-USB-6008, to appear as a device DAQmx with VISA Alias "MyDAQ1" whenever it is plugged.  On the other hand, if you want to test a range of USB-serial converters that can be problematic because the pilot of P-n-P will mount the first serial number like "COM3" and the other as "COM4" Add infinitum until the controller of the enumerator in the registry and the VISA recognized alias adjust upward.  Solution: use the Windows registry API and the API of hardware in LabVIEW to clear unused VISA alias and HKEY entered.   Speak with your professional COMPUTING staff structure HKEY and possible side effects before developing a plan to modify registry entries.

  • Visa read, unwanted extra characters

    Experts of Goodmorning to labview,

    I am trying to connect labview to a port RS 232 belonging to a tour. I am trying to receive and read in labview a string that the tour should send me. I mainly use the visa read programm OR examples.

    The trick is to send me the STARTING chain, the labview bed program the string but befor the S to START the program shows a strange character, a sort of capiatl i with two short segment perpendicular to the top and the bottom of the letter. Sometimes it shows after the T as the paragraph sign, some other times it shows the same symbol, but on a different line and sometimes there is no sign of paragraph.

    I tried two end characters more common, no end and character different values of waiting for the loop, but the problem is still there and now I don't really know what to do.

    Thanks in advance for your help.

    Kind regards

    Lorenzo

    the term tank is 0 x 14 (ASCii Shift Out) th 0 x 12 is a start of message character (actually a break form ASCii) why they chose those who is unknowable.  But a Whitesace Trim will get rid of them for you.

  • The VISA read function is not read the bytes specified in the buffer zone

    I created a program that continuously acquire data of the inverter. But, the "Reading of VISA" function is not rreading all bytes of the buffer, which is a big problem because the way my work programme is it will extract the specific buffer bytes and convert these values in voltage and current values.

    I specified the number of bytes that I want to read the buffer as for example I want to read 21 bytes. But, even if there are 21 bytes in the buffer, the read function VISA read only 9 bytes. Im not using any character of endpoints so this is weird. I'm using LabVIEW 2011.

    Is attached a photo of my program and the results.

    You still have the active stop character.  You must connect up to a FAKE at the entrance of termination character activate on the Serial Port to set it up.

  • incompatible visa read

    Hey I am using an Arduino Uno and I have 4 connected thermocouples. The code I have seems to work well, but every ~ 15 readings, at random intervals, the program returns 0 for two or three thermocouples. I added a delay to this program because it did not work without it, but it could also be the source of the problem? I have a 3 second delay programmed to the Arduino and a delay of 1 second to LabView code.

    Thank you!

    Arduino 1.0.5 code:

    #include "Adafruit_MAX31855.h".

    int thermoDO = 3;
    int thermoCS1 = 4;
    int thermoCS2 = 4;
    int thermoCS3 = 4;
    int thermoCS4 = 4;
    int thermoCLK = 5;

    Adafruit_MAX31855 thermocouple (thermoCLK, thermoCS, thermoDO);
    Adafruit_MAX31855 thermocouple1 (thermoCLK, thermoCS1, thermoDO);
    Adafruit_MAX31855 thermocouple2 (thermoCLK, thermoCS2, thermoDO);
    Adafruit_MAX31855 thermocouple3 (thermoCLK, thermoCS3, thermoDO);
    Adafruit_MAX31855 thermocouple4 (thermoCLK, thermoCS4, thermoDO);
    Adafruit + MAX31855 thermocouple5 (thermoCLK, thermoCS5, thermoDO);
    void setup() {}
    Serial.begin(9600) (9600);

    Serial.println ("MAX31855 test");
    Wait for the MAX chip stabilize
    Delay (500);
    }

    void loop() {}
    reading trial basis, just print out the current temperature
    Serial.Print ("internal Temp =");
    Serial.println (thermocouple.readInternal ());

    Double c1 = thermocouple1.readCelsius ();
    Double c2 = thermocouple2.readCelsius ();
    Double c3 = thermocouple3.readCelsius ();
    Double c4 = thermocouple4.readCelsius ();

    If (isnan (c1)) {}
    Serial.println ("something wrong with thermocouple!");
    } else {}
    Serial.println (C1);
    Serial.println (C2);
    Serial.println (C3);
    Serial.println (C4);

    }

    Delay (3000);
    }

    I advise to use the stop for VISA reading character.  This way you will not need the byte to Port function.  Just put the bytes to read something rediculously high.  You'll need to have your Arduino out a supply at the end of each transmission line.  Which tends to clear up many of the communication problems.

  • What does Visa Read.vi? with a number of zero bytes

    If I use the bytes to property node Port to entry VISA Read.vi number of bytes, and the value is zero, what happens?

    VISA will Read.vi return immediately with zero byte?

    VISA Read.vi returns immediately with however the number of bytes may have shown in the buffer in the meantime?

    VISA Read.vi expects bytes or characters of termination?

    VISA is Read.vi waiting for timeout?

    The documentation does not say, and I need to know.

    Thank you.

    WARNING 1073676294 was held at VISA Read in Untitled 1

    Possible reasons:

    VISA: (Hex 0x3FFF0006) the number of bytes transferred is equal to the number of entries requested. More data may be available.

  • VISA Read blocks. Download dialogue VI reset on abandonment.

    Windows 7 SP1 64 bit

    LabVIEW version 2011 SP1 32-bit

    Version 5.1 of the VISA

    NOR-488. 2 version 2.80

    When you try to communicate with a GPIB instrument (currently a Keithley 2400 source counter), sometimes the VISA Read VI will hang and never come back.  (Timeout value is set to 10 seconds).  Once this happens the VI THAT VISA read call ignores the button cancel in the toolbar.  Close the front panel of this VI will VI resetting: dialogue of the "appeal of VI name.

    Does anyone know what causes this or how to avoid it?


  • VISA read very slow communication

    Hello

    IM using serial communications VISA in my project and I noticed that the reading block works very slowly.
    I have the microcontroller that connected to my laptop through XBee modules.
    Baud rate is 9600 due as a change factor in each component in the line won't make a difference at all.
    Also, I checked that it work with terminal XCTU and its working fine (very fast). so his can not be something else except read VISA.
    Please see VI attached file.

    Thanks for any help,

    If you do not use a stop character, then the read VISA will sit and wait that 100 characters have been received by the COM port or the timeout elapsed (which is probably something like 5-10 seconds long). You can change the time-out period (using a property node) or reduce the number of characters you read each time that the loop runs.

    Without a termination character, you will need to build your own string using a shift register buffer - whenever you make a VISA read, add it to the chain on the shift register and then do some analysis to take control of your microcontroller (e.g. alarm, coordinated) and remove all the foregoing orders of the string buffer (for example if you have started the VI in the middle of a command) ", then you don't want to throw these data).

Maybe you are looking for