Why visa read reads most bytes sent

Hello
I use visa read and write to communicate with the device via RS232. I sent several string commands.i just use serial communication of basic to read and write the commands.my total length of string is about 6626. I also used the size of buffer of about 7000. When I send the string to write Visa, I'll get a number (byte) output 6626 sometimes and sometimes less than that. I also used the property node for the bytes to port I used the number of bytes to read visa. But as number of output here, I get a lot more like over 6670 and sometimes less than 4000and 6620 and sometimes only some and 5000 and some.it doesnot remains constant. How can I solve this problem? why I get more bytes that I sent as exit visa read? and sometimes less? And sometimes more visa write number of output?
waiting for help.thank you.

Tadhika,


Tags: NI Software

Similar Questions

  • Why the reader most recent Flash for Windows so plant them?

    Why the reader most recent Flash for Windows so plant them?

    I use the latest update of Flash player that has developed on this computer.  It's Flash player version 11.1.102.62 on a Windows 7 computer.  I have experienced excessive crashes Flash player in Firefox and Internet Explorer.  Since the two latest updates of Flash player who, it seems to come from Adobe it is a big problem with Flash player crashes.

    Previously, there was no problem... then there was the update yesterday and problems began.  I was hoping the last update would have fixed this problem, but now it's worse.

    Is it possible to return three updates and install older Flash Player?

    Adobe will never get this fixed number?

    Thank you

    Digi

    reproduce crashers regularly contributes to refine specific problems.  the random thugs are difficult to follow and difficult otherwise.

    the latest version of Flash Player, 11,2,202,228, were announced last week.  It would make 11,1,102,62 version two behind.  Would you mind upgrade to the latest version of the player?  There are a few crash fixes in our last offer.  You can go here to update: http://get.adobe.com/flashplayer/

    It is possible to downgrade, but it is not desirable that the old version will be always up-to-date with patches secuirity.  If you option for this, you can retrieve older versions here: http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html#main_Archived_v ersions

    Note: Make sure you completely uninstall the existing version.

    Thank you...

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

  • 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

  • VISA read where you don't know the number of bytes?

    I work with a VISA resource via the USB port that reads in the results of printf (% lu % TSP %d)) of a microcontroller. These results are as ASCII numbers, their length in bytes is unknown. Numbers * should * be not more than 3 digits, but I can't know that for sure. Reading VISA won't let me the number of bytes unwired, so should I join just a high constant let him? Or is there a better way?

    1. do you have the microcontroller send a character to end of line (0xA on the ASCII table) at the end of the printf.

    2. turn the stop of the session VISA character and the value it is 0xA.  You may need to perform this task via the VISA property node.

    3. playback VISA to read more bytes than you tell never expect to get.  VISA playback will stop reading when it detects the termination character (End Of Line).

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

  • 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

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

  • Don't know how to read the results of netstat EI s list? If I received 860592506 bytes sent from 43421482 how to convert MB? And does this mean byte received?

    Don't know how to read the results of netstat EI s list? If I received 860592506 bytes sent from 43421482 how to convert MB? And does this mean byte received?

    Hello

    This shows the total number of bytes transmitted and received via the Ethernet card. This is the total of the amount of use up to this day.

    This includes all the Web sites you have visited and emails you sent, etc..

    You can calculate using one of the following methods:

    Method 1:

    860592506 / 1048576 = 820,72 MB

    Method 2:

    Multiply 860592506 with 9.53674316 * 10 ^-7 that will give us the result in mega bytes.

    860592506 bytes = 820 MB 9MB not, accept my apology for the miscalculation.
    Similarly 43421482 acroos = 40MB

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


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

  • Leak memory in real time caused by VISA Read and timed loop of data nodes? Is not supposed.

    In collaboration with LV 8.2.1 in real time to develop applications that monitor or emulate computers on bus RS-422.   The following screenshots have been taken an application that monitors a transmission of 200 Hz.  After a few hours, the PXI station would break a range impressive messages angry... most involving something about memory loss.  After much hair pulling and passing money, my partner has discovered while looking at the available memory on the controller of loss of memory occurred at each loop containing a VISA read and propagation of error using the data nodes (see Leak.jpg of memory).  He concluded that if he went to the propagation of the error to the regular old shift registers, then the available memory was rock-solid.  (has the Leak.jpg of No memory)

    Any ideas of what could be the cause?  Do you see not any problem with the way that we code these kinds of loops?  We always strive to optimize the way in which we use the memory on our urgent requests and VISA readings and DAQmx bed give us the heartache more than ever, we are able to allocate memory for these screws some tips?

    Dan Marlow

    GDLS

    Hi thisisnotadream,

    This problem has been reported, and you seem to be exactly reproduce the conditions required to see this problem. This was reported to R & D (# 134314) for further investigations. There are several possible solutions, of which one is the one you have already found the wiring error directly in the loop. Other situations which give rise to no memory leak are:

    1 if the bytes of the property node port is not there and has read lies in each iteration and time-outs resulting are ignored.

    2. If the structure of the deal is gone and just blindly check the bytes to the port and read each iteration.

    3. If the timed loop is transformed into a while loop.

    Thanks for the comments!

    Kind regards

    Stephen S.

  • 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