Series read lack bytes


I need to read some telemetry equipment. Length of the telemetry is exactly 113 bytes. It does not have the bytes start and end, however the 2nd and the 3rd byte is always "DD" and the last two bytes is a mistake of the other 111 bytes CRC check.

For the moment, using the VI I send you attached, I can read the telemetry but with some problems. Sometimes it won't read the correct 1 byte, resulting in a misinterpretation of the telemetry. And there are moments that don't read all 113 bytes (read only between 86 ~ 109 bytes), which is also a big problem.

When these problems arise, it will often be read properly on read the following series. However, sometimes it takes a lot of time to read properly and I can not afford this.

These problems are all random. For an hour, it can have very few problems and then, in 10 minutes, it may have a lot of problems reading consecutive series. I have used other software to verify the telemetry and they do not have these problems. This means that I do not correctly use LabVIEW to read the serial number or there is something that I am missing.

Topic VI, I just want to read correctly the 113 bytes and use a queue to send data to another while loop. When he's not reading the 113 bytes or when the 2nd and 3rd bytes are not 'DD' or there is a problem on the series, I have "reset" the communication by close it and open it again.

Could someone send suggestions and recommendations about my problem and my VI so I can hopefully resolve this situation? Any help would be appreciated.

Thank you very much. Best regards

William Kiyoji Ariyoshi (LabVIEW8.5)

Disable the stop character.  'S done it with the configure Serial Port VI (there is a Boolean value on top of the VI who needs a forgery connected to it).  By default, the character of endpoint is 0xA.  So if you have this character anywhere in your data flow, VISA playback stop here.

I also recommend moving the installation and closing the serial port on the outside of your loops.  You should only install and close once.  You must also add a way to stop the outer While loop (abandonment of the VI is not a good idea, especially since you use the communication bus).

Tags: NI Software

Similar Questions

  • Visa series read write


    I have no problem with reading series. I want to playback multiple visa series... Fist read I want to read the data of 5x8bit uC then if visa data read isnot "NOT" I'm going to send data to the CPU as the character ' end then read data from uC to new but is leght data 2x8bit data...

    Please, help me...

    This is the number of bytes you want to read. You already said you first want to read 5 bytes. If you use VISA set up the Serial Port and the stop character allow to true, you can set a number of high bytes and playback will end when the stop character is detected. The character of default endpoint is a line break. If you set it to false, you can use the bytes VISA to the Serial Port to determine the number of bytes in the buffer is and read this number. This makes the basic example.

    Did you do any debugging serial communication base? I suggest that you use a program like Hyperterminal/Procomm/Putty/.etc before trying to write your own program. It is also difficult to give detailed advice without knowing how you have set the serial communication of the microphone.

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

  • I use VISA 5.3 for reading my serial device... my standard equipment is WELL this device will send four messages for only one comand I need all four messages to display at the same time in VISA SERIES READ BUFFER

    I use VISA 5.3 for reading my serial device... my standard equipment is WELL this device will send four messages of single command given to this instrument... and I read messages through VISA series READ... during the race, the VI buffer displays the messages individually...  I need all four messages to display at the same time in VISA SERIES READ BUFFER, in order to find more than this block, I should add from the palette of function.

    Disable character of endpoint detection or make four readings where you concantanate simply the strings together.

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

  • Series read reads the available characters


    I am trying to contact a Magellan/Ion controller, using RS 485. I'm running an external monitor with shows me 7 bytes sent by the controller for labview, I use the writing basis of VISA then wait a few milliseconds and then VISA read so that the use of the property of bytes to the port say the VISA read the number of bytes to read. When I watch OR spy, I see that read VISA function is told to read 7 bytes of the right address COM, but only six bytes are read. I changed the delay before the time of reading from 0 to so long that it is not read anything and I still have the problem. By a number of bytes that reading VISA has internally that I'm running into timeout or maximum or is there some other solution to my problem?

    It is not at all strange. It is planned. If you do not read ASCII, clear the nature of the expression. VISA read ends as soon as the character is detected.

  • Series read byte command change


    I'm new to Labview and I'm reading the speed and torque of a couple of reference via RS232 transducer. I need to read the data as a frame of 6 bytes. I followed the Protocol provided by the manufacturer (3 bytes concatenated + some calculations give couple and 4 and 5th concatenated byte gives the speed and the last byte provides the power supply on the torque sensor).

    When I re - run my code, to change the order of the bytes. In the two screenshots, I have attached the correct order (with 128 in the first byte). But sometimes, when I run the code changes of the order, so instead of 0 1 2 3 4 5 go, it reads 3 4 5 0 1 2 (or else), that ruin my calculations.

    I tried switches ON and OFF the stop character and by changing the flow control settings, but it makes it worse or is not good. Forgive me for my lack of knowledge in Labview or basic serial communication.

    I would appreciate any information about this. Thank you!

    Kind regards



    1 fix the order of byte (expected)

    2 bad byte order

    3. my vi

    The probe is the streaming of data.  This means that it continues to stream without your vi have to ask all the data.  When you read data from the stream, you need to know where is the first byte of the frame.   You must be synchronized with the data structure.  Do you know how many times he transmits a data frame?

    Document you posted says the 7 Bit (MSB) of each byte is used to synchronize the image.  First byte has Bit7 = 1 and the rest of the bytes have bit7 = 0.  This means that the first byte will always be a value equal or greater than 128.  The other bytes will always be 127 or less.

  • Read a Particluar series read byte


    I'm relatively new to the use of labview and trying to create an application that reads and writes data in a counter via rs232. I use reading series VISA and VI to write to it. The problem I have is the message that I've read is 6bytes in length. Then, I need to read the second byte at the beginning and go read the other bytes received subsequently. What is the best way to do it? know store buffer and read the individual bytes as necessary.

    Also, what is the best way to set up an IF statement in labview.




    You can use the string to extract individual bytes of a multibyte string.

    Version of LV of the IF statement is a case statement.  See here

    Rate it!

  • Get integer values of visa series read


    I am having trouble getting the integer values correct of the reading series string that I get. For example if I send 0P3 I get 48,112,51 as elements of an array. I used the string to byte array function to convert the string I've read on the serial port. The values are the ascii equivalents. How can I get 0, p, 3 in the back? I need that the program does a length check and crc going wrong because 0 is now considered to be 48.



  • cDAQ-9181 with NI 9402: after the first cycle of meter reading lack certain counts in all subsequent cycles.


    I'm reading pulses TTL of a generator of service using a meter. I apply a 1 kHz signal to the meter. Each time counter reads the pulses correctly in the first cycle of measure, but it lacks some counts in all subsequent cycles.

    I use NEITHER 9181 cDAQ chassis and NI 9402 module with 2014 LabVIEW and NI Max 14.0.

    My computer has the Windows 8.1 operating system.

    Please find the VI joint and the front image after EXECUTION.

    I also used the same VI with chassis USB cDAQ-9171 . Results have been improved, but the same problem persists.

    What could be the reason for this, please guide.

    Thank you!

    B. Sharma

    1. the loop time is defined by software and therefore won't be compatible.

    2. you restart the meter patch between each iteration of loop - so that the task is restarted, it does not take samples.  The new start is faster on the USB device from the device ethernet due to the latency of the lower bus, so that explains why the behavior is improved on the 9171 compared to the 9181.

    Using method 2 meter would be a clever way (maybe too smart...) to implement which, according to me, you are looking:

    This will configure a second counter (ctr0 is paired with ctr1, ctr2 is paried with ctr3) to generate a signal of a period known (time measurement).  The meter is taken into account the number of external pulses during this period, and since we are because data in terms of 'Ticks', it will give you the number that occurred during the measurement time.  This measure is repeated for the specified number of Cycles without software-timing or latency between cycles.

    The appeal of reading will have a time-out value long enough to ensure that all cycles have completed (or you can query to see if the task is made first of all to give the user the option to cancel the measure).

    Best regards

  • Why visa read reads most bytes sent

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


  • 8753xx series read and properly calibrated chart

    Greetings from the Greece,

    I have a Hp 8753D Network Analyzer that I would like to order via GPIB with labview. In fact, I want to build an interface where the data of the instrument are displayed on my laptop and export them after.  example "series 8753xx read and graph", does exactly what I want, but requires a file name of State as well as a calibration file name. Calibration I am used to doing so far is that manually, so I don't know what type of file to be inserted in the specific field. In addition, I have nothing but the parser, not even the calibration kit. Is there a way to create a path where the code automatically extracted labview saved state and calibration saved in the memory live Analyzer?

    Thank you in advance,

    For automatic playback of the files, you can code obviously hard paths in your VI. What I have done, is to have paths in an ini file which is read at the beginning.

  • Series read is slow

    Hi people.

    I read information for a device that sends its information to start for the serial port. The attached VI reads and takes the relevant information from it. The only problem is that it is quiet, slow. It takes a few seconds for data display, about 5 seconds. It should be almost instant, as I've seen using hyperterminal. No idea why this may be?

    Thank you

    Select this option.

    The instrument uses a stop character?  If so, use it.  It will make your life a LOT easier.  Most instruments use a carriage return to end a message.  If you have activated, playback then VISA would stop when this character of endpoint is located.

    If, however, your instrument does not have a character of endpoint, then you need to know EXACTLY how much character is send out instrument for the message.  If you guess too few bytes, then you will get all the data.  If you guess too many bytes, then you will have to wait for the timeout to occur.

    So if the message isn't 150 bytes, you'll be sitting there waiting for 10 seconds.  If the instrument has the stop character, simply activate the use of it on the VISA to configure the Serial Port and your question could disappear.

  • Series read returns the string with excess-need information to extract data from the middle of the string

    I read data from a STI flow meter using the base series writing and reading which used the VISA.  The read string begins with 'OK' or an error code, then a carriage return, then the data follows streaming rate temp pressure flow rate comma comma comma comma Temp... and so on. The string ends with a CR LF.  I need to pull the flow, temperature and pressure data out of the string and write it to a file.  I have difficulties to find a function that will retrieve the data for the string.  Any suggestions?  Thank you.

    Try the subset of string in the palette of the chain.

    Or match the model if you want a more direct control.

    Also a good way is the string analysis, but you must be willing to read oexactly, what happens or an error, pass the entrance.

  • Series read, store queue and time-evenly continues treatment, but the data is mixed now

    Hello, all,.

    I send MCU APR data to the PC via a serial interface, 16bytes each time interval of 50 ms, if I donot use queue, the data read visa are the same as sent. But reading and in turn within a while loop is not time efficiently as the multiple loops with queue processing.

    I have a byte (0 x 55) as the first byte of the data transmission, with multiple with queue loops, but now the 0 x 55 position is changed all the time, and most probably present at the 8th byte data.

    Thanks for any help.


    Houde, dai wrote:

    The data received with VISA read are unstable even without connection to the other party, as the screenshot displayed. [...]

    With best wishes,



    What do you mean by 'unstable '? And I saw that in your simple loop VI, you are always empty the buffer after each reading, what you don't do in the loop number VI. Maybe it's the origin of the problem.

    However, IF the rinse, the root cause is not VI, but your connection (or the equivalent of your program). Since removes VISA Read already the amount of reading of data from the buffer, the data must be resent / captured again in the buffer...

    hope this helps,


Maybe you are looking for