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.

Tags: NI Software

Similar Questions

  • VISA READ stops the playback to the 'zero' - tank

    I read a message to binairy, from a RFID tag that looks like this:

    spell [01 09 0C 6th B9 53 0 to 00 00 00 00 8B]

    The bytes to Port-property shows me the full message (12 bytes) is present in the port.

    I do a Visa_read with the 12 bytes as input, playback always returns with 7 bytes read.

    If the Visa_read stops to ZERO characters...  In a subsequent read I take the other 5 bytes.

    Why the VISA_READ stops at zero?  (I use XON/XOFF and the stop character is defined as 15, not zero!)

    Check the code below

    Thanks for the help in advance!

    In fact, I bet she's reading the 0x0A and you put in place of the port with the following default properties:

    • The end of the reading mode = TermChar
    • Char end = 0x0A
    • Char term remove for readings = True

    If you check the cluster of error of the warning message will tell you that the tank of the term has been seen, there could be more data available...

    Enable the implementation of the port with a F wired to the character of the period.

    EDIT: Oh the jpg clearly shows that I was right make T a F

  • How to stop the series 'VISA read' the sends packets instead of bytes available.

    Dear Labvillians,

    Highlights:

    How can I stop series "VISA read" send me packages rather bytes?

    Background:

    I have a system which publishes series of 14 bytes on a semi-regular interval packets.

    At busy times, the producer of these these queues of data packets, effectively producing Super-paquets multiple of 14 times larger than 8 packages (112 bytes) bytes.

    My protocol handler is designed to process bytes, packets, or packets Super.

    Now, my request has multiple devices and the order of message processing is essential to the proper functioning.

    My observation is that read VISA waits until the end of a package / super package before moving the data to the application code. (See chart below)

    My expectation is that VISA read should give me bytes available, get too smart for itself and not wait for a package.

    .

    I noticed this on PXI, PC shipped, PSC and, more recently, cRIO

    I've experimented with Scan interface the cRIO rate, which helps to reduce the backlog of packages but don't decide to package under read byte.

    I understand that a solution is FPGA code write to handle and pass the bytes by R/T-FIFO, and there are some great examples on this site.

    Unfortunately, it does not help with FPGA devices not.

    I have also dabbled in the event based sequential reads, but he is evil on vxWorks devices.

    Any help is appreciated

    It is helpful to sometimes talk to yourself.

    I hope that is useful for someone sprinkle in the future

  • 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 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.

  • 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).

  • 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?


  • No VISA Read reading all the bytes available and ordered

    Hi all

    I use Write.vi VISA and VISA Read.vi to send and receive packets of bytes to and from a processor.  Generally, everything works fine.  I put a loop repeats until he sees at least 20 bytes to the port, then I VISA Read to read 20 bytes.   However, when I receive some packets of bytes, my property node indicates 20 bytes to the port, I ask VISA Read to read 20 bytes, but it reads 13 bytes and leaves seven bytes to the port.  If I run the read operation again, it will read their remaining 13 bytes.

    Any ideas on what might materialize this project?

    Thank you

    Forbes

    OK, I thought about it.  I put 'Stop character activate' in 'VISA configure Serial Port' to 'False', and all my problems disappeared.

    It's fun to talk to myself.

    See you soon,.

    Forbes

  • want to use visa read only when the pieces is in port

    Hi all

    I do a lot of serial data communications and visa read doesn't have an undo feature.  Heres so the question.  If I'm in the middle of the read visa, set up the picture picture and block, and I press the stop button, I have to wait for the visa reading for timeout, in this case 2 seconds, before I can move to the next step in the shutdown sequence.  Now, I know, there is a way to use the events of specefic bus, but I have yet to find a good example.  Any help or advice for a workarond for that matter?

    Thank you

    Matt


  • Visa read byte at the port

    My visa to read, I feed in the bytes in the property node port as input for the number of bytes to read (it's 4 bytes).  However, the output of the read visa give only 2 bytes.  It seems that a few bytes have been lost during the read operation?  Why is this?  It is an easy to see what is in the buffer of the serial port?  Thank you!

    Yik

    You likely the session VISA set to end readings when he sees a stop character and VISA reading is to see the stop character, and ending the reading, regardless of the number of bytes you told to read. If you want that it explicitly read that much then you must disable the option "Activate the stop character" in VISA set up a Serial Port.

  • 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.

  • Possible timeout in VISA read/write in While loop

    As the title says, I have a while loop that is constantly written followed by reading using VISA read/write.  I'm waiting for buffer correspond to a certain one, which the true value would end the loop.  In this loop, I have an indicator showing how many times he runs. All of this is repeated in another while loop.

    My problem comes the counter arrives at 10, then stops at the "write" command.  Do not know why.  I tried to increase the time-out of the instruments, but nothing has changed.  I added a delay of 10ms in loop, which also has not changed anything.

    For reference, I use a tektronix scope series 3000 of the MDGS and checking its state of relaxation.

    You said chill to read earlier!

    But it is not supposed to have to write it either.  Experimentally, access all VISA nodes, right-click and choose the Mode of synchronous i/o.  Make it synchronous instead of asynchronous.  The watch symbol will disappear from the top right corner.  See if that changes anything.

    What kind of serial port are you using?  What is an integrated in the PC?  A USB to serial port adapter?  Makes the chips on that, Prolific and FTDI?  You can try with a different serial port or a brand of adapter?  A lot of people have had problems with prolific chips.  And I have also heard of people having problems using adapters who had fake chips in them.

  • How do I know what programs are safe stop execution or remove it from the startup of Windows 7?

    How do I know what programs are safe stop execution or remove it from the startup of Windows 7?

    original title: start up programs?

    Hello

    You can use these to control which startup programs. Many others settle
    start-up haven't really needed to be there. Such as Acrobat Reader (Adobe), WinAmp
    Agent and many others who are responsible for pieces of themselves to get started more quickly (not a problem
    on the machines of today ' hui) and of course they can control the files they support (to be
    course you continue to use only). Those who are only common examples and didn't want to not say
    as a slam on these programs very well.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or Windows 7
    http://support.Microsoft.com/kb/929135

    How to change, add or remove startup programs in Windows 7
    http://www.SevenForums.com/tutorials/1401-startup-programs-change.html

    Autoruns - free - see what programs are configured so that it starts automatically when your
    system boots and you log in. Autoruns is also the full list of registry and files
    locations where applications can configure start automatic settings.
    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx

    -------------------------------------------------------------------------

    Performance and maintenance tips
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-performance/welcome-to-the-performance-and-maintenance-Forum/19e5d6c3-BF07-49ac-a2fa-6718c988f125

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • 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.

Maybe you are looking for

  • Stylus and touchscreen in vaio made 13 missing

    Previously, I can use my pen and touch the screen of my laptop for some reason, I was advised that I is not able to use the touch screen, and while they inspected the info from the PC, I was surprised to see that no. Pen or the Enter key is available

  • y at - it a free version of foe available OS 10.7.5 pages?

    I use an IMac 2006 is no longer supported by Word 2008. I am looking for a free version of Apple Pages that I can use with OS 10.7.5

  • Run startup.rtexe in linux terminal

    Hello I am under some programs on a cRIO 9030. This rio is on Linux and it has a DisplayPort to monitor applications. My question is: How do I manually start the LabVIEW application from the terminal window? I tried '.» "/ startup.rtexe" but I only g

  • item (s) unknown in Netstat

    When I started Netstat - good to start my computer, the following wre appears: TCP 192.168.1.64:1035 windows\system32\WS2_32.dll component (s) unknown [svchost.exe] TCP 192.168.1.64:1036 windows\system32\WINHTTP.dll [svchost.exe] What is "unknown or

  • HDMI to DVI will work on hp2207?

    Hello. Just got a new MacBook Pro retina 15 "from Apple. They could not would not fix my old computer so I had to take another to place it. Good luck me, Yes, but I have a lot of peripheral issues. I have successfully used a DVI adapter to Thunderbol