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.

Tags: NI Software

Similar Questions

  • Visa read write on port series independently and at the same time!

    Hi all!

    I need to read and write data to and from a serial port (rs232) independently and simultaneously .

    I'm sorry that I can not put a picture of that, but it's very simple:

    I used "set up the serial port" and forwarded to two while loops, the resource reference.

    a loop is reading data and the other loop is writing data to the port.

    the problem is when the playback loop (function serial reading) waiting for data - it blocks the other loop to run (writing of the serial function is blocked).

    I searched the forum and find this visa open function has 'duplicate session' option - that's what I need?

    If true, can someone explain exactly how to wire and use it in the right direction?

    Thank you very much.

    Guy.

    OK, I found an example that solved my problem: a VI called   serialduplicatesessions.

    The file is associated.

    Here is the link for all cases: http://zone.ni.com/devzone/cda/epd/p/id/1727

  • increase speed visa read write

    Hi guys,.

    I use the visa read and write the example, but I am facing a problem when using it in a software expansion, and I can receive only date when the vi has been slown down (using the bulb).

    The program really works on her own with the defined settings.

    So, do you have any ideas/suggestions on how to significantly increase the speed of this vi (joint)? In addition, it seems to create a problem with the playback of data

    Thank you very much

    Kentmey

    Roll bytes to the port and the delay.

    Rely on the chariot of the termination

    Use a number larger than the bytes expected.

  • void / vi... read vi inside while loop

    Hello

    I'm new to Labview... My main Vi keep reading data from serial port and parks (in words) in a table (put all in a while loop)...

    The table is also inner while loop... Now I still want to analyze this (element by elemnt) table and create an another VI who takes this array running as input... so the new VI should simply have this table entry... but the problem is that I can't see the data running in new vi... .any suggestions... ??

    ebuckbuck wrote:

    Thanks Apok...

    I'm not sure hoiw reference books here as when I create refernce of table VI main (24 sep... (VI)... it does not produce yet of any substance in following VI (who called)... Attached are my two files... .and I just want my main VI as for the output as array2 Terminal...

    Thank you very much

    ebuckbuck

    in this example, we want to move an indicator (main.vi) digital of the second loop (sub.vi)...

  • Error timeout on VISA read during program execution

    In my application, I need to read an instrument via a USB serial COM (a Heidenhain ND 280).

    When I run a single VI that comes write and read the data it works very well (see attachment). But when the main Vi runs and this runsin a Subvi, it always gives error timeout on read VISA after awhile. I do not understand what can cause that.

    EDIT: in fact even alone, it give a time-out error after awhile. I just let it run for 30 minutes and he gave one. Just more time in appen, it seems that when the program runs.

    Thank you


  • VISA READ timeout error - several GPIB resources

    Hello

    I'm working on a network 3 GPIB instruments (Optical Attenuator, amplifier in fiber, spectrum analyser), controlled using VISA sessions in Labview. When it is run separately, the three corresponding screws (which are located in three different Labview projects) works as expected. However, when they ran at the same time, one gives them timeout-1073807339 VISA READ errors. These errors seem to occur when another instrument is sending / receiving data / instructions at the same time that she is.

    The exact context of the error is either:

    -an another VI is running, which includes sending several requests and responses every 100 ms, reading

    -by failing VI starts, I get an error of waiting time among the first Subvi containing a VISA READ operation to perform (sometimes initialize.vi (in situation 1), sometimes one of the subVIs connected the rest State (State 0) on the time-out of the structure of the event).

    or:

    -the default VI is running,

    -by starting another VI, which includes repeatedly sending requests and reading the responses, the failing VI up a mistake among the first Subvi containing a VISA READ operation to run (one of the subVIs linked the State of rest (0) on the time-out of the structure of the event).

    What I tried:

    -gradually increasing the delay between the VISA WRITE and READ operations to the relevant instrument (from 10 ms to 10 s), without success. More surprising are my observations which, by operating this single VI, increasing WRITE it / READ delay results in the same timeout errors. I have found no mention of such behavior through research google and forum. I hope that this may point to a solution to the main issue,

    -switching between synchronous and asynchronous VISA WRITE / READ operations.

    -reorganization of the network GPIB to a star to a linear topology topology (three instruments have different GPIB addresses in case anyone is wondering).

    My thoughts:

    It seems to me that the error is related to a delay introduced between a VISA request and its read operation by the transmission of another query associated another instrument in the same network GPIB. But I have no idea why pass a query to another instrument would introduce such a delay, or why this delay would result in a timeout error (and only an instrument, while writing / reading in each pilot screws are basically the same). Hopefully a more experienced Labview-er will be able to shed some light on my problem.

    Included is the project that contains the default VI (main.vi) and the driver custom made use of.

    There are a number of ways. If you want to keep separate projects for instruments, you can use semaphores often slandered around calls for screws in each project. Locking is not expected or predictable, but it would give controlled access to the GPIB resource.

  • How I WRITE VISA to 2 devices of a while loop?

    Hello

    I have developed a fairly complex vi that reads data from two sensors and controls SERIES written to two engine controllers.  The idea is to send the engine controls more or less "simultaneously", and they are generally not the same commands.  The two motor controls are determined by the sensor input with each iteration of the WHILE loop and subsequently sent to the VISA WRITE motor controller.  I was getting an errors and failures with the vi, then, we decided to break up and test the components individually.  In the original vi, I had two sets of VISA OPEN, WRITE, NEAR wired inside the WHILE loop and he sent two orders for both engines successfully.

    The test code I have attached here, "simple VISA speed controller rev1.vi" has the VISA sequence configured around the loop according to the advice of OR.  He suggested that the VISA OPEN and CLOSE while loop and wiring outside the VISA two WRITE such as shown.  However, in this configuration, only the command of the CHANNEL 3 runs.  The CHAIN 1 command does not run.  The string ' / 1V...» "engine controls 1, and" / 3V... " "engine controls 3.  So, by changing the 1 and 3, I order two this vi engines, but only, the chain is the first VISA WRITE running effectively, regardless of the engine is selected in the order of the string.  There is no malfunction of the motor or wiring, and I order the two motors separately using the software provided with the manufacturer of the motor controller, therefore, the hardware has been confirmed to work properly.  I use NI USB-RS232 to send the string on the motors controllers.  Motor controllers are connected in Garland, and each has a switch address so 1 engine knows how to respond to ' / 1V...» «and the engine with the value '3' address switch responds to ' / 3V...» "etc.

    The other code attached here, "simple VISA speed controller 2 motors.vi" sends the two commands at the same time.

    So, why the second VISA WRITE does not work the '... rev1.vi '?

    Thank you

    Dave

    Hello Dave,

    In accordance with our telephone conversation, that give a try.

    Joel C

    National Instruments

    Engineering applications

  • Error with VISA Read (-1073807346)

    Hello

    I use VISA read/write to control a glucometer and read files in memory. When I run the file memory for the first time, I get the error 1073807346 and the explanation is "VISA: (Hex 0xBFFF000E) the given reference of session or the object is not valid."

    However, when I run again immediately after (without doing anything except click Run), it works perfectly every time until I have log and restarts (while I get the same error, but it works each time after this).

    I checked my settings, they are correct and I also tried to run the command with Hyperterminal and it works. I don't know why this does not work the first time around.

    Any help you could give would be great. I have attached the file ("read Mem").

    Thank you.

    Hello

    You choose the resource monitor correct (I assume you are) before starting the program?

    Why do you have a picture of sequence around your code? The sequencing is already accomplished by the data cables. The last wait is relaxed.

    And most important: why do you have a feedback node in your visa session just before writing.

    Delete and press cleaning diagram.

  • What is READ the array returned by the DAQmx meter? How can I know the two functions DAQmx READ data stream in the same WHILE loop?

    I have a question about the order of execution.  In the WHILE loop, I have two things to measure, period and tension using the DAQmx READ functions for voltage and the meter.  In the end, I want to collect these data as points almost simultaneously as possible, as a pair and then send them together to another piece of code (not shown here) which them will result in some sort of command for an engine.  It would be run, and then I want to perceive the tension and the period at a time later and do the same thing.

    (1.) I'm a little confused on what the meter of the READ function is back because it's a table.  What is a picture of?  I thought that it was up to the value of the individual periods between rising edges.  The output of the counter 1 DBL d's a table. How many elements in this table, and what determines the size of this table?  Are the elements of the array the individual delays between the edges?  How many values are stored in the array by executing?   We take the AVERAGE of the last 15 items, but do not know if we are throwing some of the data or what.  How to understand the composition of this painting?  How can I change the composition of this painting?  Is it possible to measure only one period at a time, for example the time between TWO edges?

    2.) Will this WHILE loop execute as it gathers tension and a "period table ' (remains to be understood by me) by TIME running in a loop?  In particular, we want that the value of the tension associated with the value of the AVERAGE of the period "array", so we can use two data items to create orders of next control every time that the two values are reported.  The structure for the delivery of vi will be attached data in pairs like this?  I understand that one of the READING functions run not before the other function of READING in the WHILE loop.  I want that the period "means" and "strain (Volt) collected at the same pace. This vi will he?

    Thank you

    Dave

    Hi David,

    I suggest including the DAQmx Start Task function. If it does not start before the loop, it starts the loop and work very well, but it is not as fast and efficient. In the model of task status, task wiill go to run the checked each iteration of the loop and then back the time checked running when it restarts.

    The status of the task model: http://zone.ni.com/reference/en-XX/help/370466V-01/mxcncpts/taskstatemodel/

    Kind regards

    Jason D

    Technical sales engineer

    National Instruments

  • VISA, read and write checks are block after there is no more lines to read

    Hi all

    I am developing a communication continuum between a microcontroller Arduino Uno and LabView. The issue I'm having is to 'Write' and even 'Stop' controls are block once all the initial reading lines are read in. I'm pretty sure that this is because the reading line prevents the complete completetion of the while loop, suspending all the loop until it indicates something else. I tried a number of Boolean operations and I can't work around the problem. The code itself needs a way to detect has nothing to read and ignore the read statement and continue a loop until the user activates the "write" command and writes something. The read command would have would be to read and wait again for user input.

    Any suggestions and help would be great! Thank you!

    * Note that I was using labview for all of 2 weeks. I'm getting used to it but I'm not a pro for sure.

    Also, I would like to give credit to physicslight @ https://physicslight.wordpress.com/2014/07/14/arduino-labview-serial-write-read/ for provide an arduino auto detect sub vi for easy then to initialize the VISA controls

    Seems I solved my problem. Using the Instr:Bytes function of the Port, the reading error is fixed. Addition of a few cases to see entry written and that it is received and a delay just incase seems to have fixed my code! If anyone has a similar question see my attached code

  • VISA Read Timeout error when using stream protocol BUS

    Hello

    I currently use the BUS Flow for a MFC Protocol and I get a time-out error VISA Read:

    Error 1073807339 occurred at VISA read in Send Setpoint.VI-> test.vi

    Possible reasons:

    VISA: (Hex 0xBFFF0015) timeout expired before the operation is complete.

    I extracted the part of the code and it attached to this message. Basically, whenever I hit OK to send a VISA just read set value times out. I tried to use the sub VI who is responsible to send the set value and it was fine (when manually, I copied and pasted the ASCII codes) but when I run the global function it times out.

    Any help is appreciated

    Thank you

    If you have a command string or a constant you enter a \r\n in, you MUST have '-' Codes view turned on in order to enter the actual control characters. If you enable "\" Codes to display and see \\r\\n, then you have used Normal display to enter the characters.

  • VISA read timeout error - Keithley 2400

    I am using LabView 2010 to control a Keithley 2400 Sourcemeter on an RS-232 Interface. I want to set up a measure and take a reading (e.g. ground voltage / time)

    I took an example of "Keithley ReadOnly" library code, but the 1073807346 error to retrieve box "initialize". Then I looked in 'Initialize. VI"and found there is a VISA (timeout error?) reading error. I have attached two screenshots that shows errors. Can someone tell me how to solve the problem? Moreover, I am very new to labview, if someone could suggest a solution that is not too 'Advanced '? Thank you very much.


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


  • Several problems of reads/writes of Visa

    Hi all.

    I've been using labview VISA to communicate with an I/O device called a µChameleon.

    I need to monitor the status of mutiple pins by sending an entry VISA to query the PIN then use a read VISA to identify the State of the PIN.

    The problem I have is when I use several reads/writes VISA. When I run the present, only one VISA reading returns the corresponding pin State, but everything else show nothing. The funniest is when I use run highlight, they will return all the State of the PIN.

    The photo below shows the basic principle of what im doing by simply copying the base serial number read and write code. For example, I send the string 'State of pin 1' followed by a carriage return and if it works correctly it should return a string Read VISA saying ' pin 1 1 "(top) or" pin 1 0 "(low)." ""

    Can someone help me witht that. Is this a timing problem with the VISA of the readings?


  • Make the NTFS read/write permissions without possibility to create/delete folders

    Out to one of our sites, we have a server running Windows Server R2 of 2012 which took a file share accessible to our people on the spot. Our project managers have developed a very strict folder for this file share structure, and for the purposes of verification, they want to stick to the closer this structure as possible.

    Therefore, although the local people must have read/write access to create, edit, and delete files, they won't they are able to create or delete folders. They want to use the existing folders and not to store stuff in folders that nobody knows there is except for the person who created them.

    The closest way to you, I got to do is to uncheck the advanced permissions "create folders / adding data" and "Delete subfolders and files." This has some side effects, however, the most notable being the inability to add data to the files, some files (such as CAD drawings) can be changed by anyone except the person who created them.

    Is there a way using only the NTFS permissions to accomplish what the project leaders? And if not, are there any third-party utilities that will help us do this?

    Thanks in advance for any help.

    Try asking in the Windows Server forum:
    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

Maybe you are looking for