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.

Tags: NI Software

Similar Questions

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

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

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

  • Problem with read (byte [], int int.) in BONE

    Is there a known issue with reading does not correctly in the latest versions of OS 5?

    I have an existing application that works perfectly on all devices 4.2.1 BB + OS... except for devices running the latest versions of OS 5.0.0 when I test on the Simulator for OS (generic), I get strange behaviors using the read() method on the InputStream created from InputConnection.openInputStream () of an HttpConnection.  The problem occurs only when connecting using deviceside = true.  It does not affect MDS.  What I see is:

    read (buffer, index, length) fills a 1024 bytes of the buffer with the http response data internally.

    then, it ignores the first 152 bytes and returns the rest of 872 in the buffer parameter.  The returned value for the number of bytes read int is correct.  that is, 872.

    Subsequent calls to read() to return the same 872 bytes. ... He never advances through the flow to return the rest of the data.

    Method available() at any point returns the length of the http response (in this case, 2685)

    In all previous versions of the operating system, using the same code, it returns all the 2685 bytes in a single call to read()... I'm puzzled.  Also has anyone seen this behavior?

    I had problems similar to the 8830, but with an o/s 4.2 or 4.5

    Finally I changed my read() to read a single byte at a time, rather than a buffer and that solved

    My question.

    If I remember correctly, in my case, I knew the total length and was reading in pieces,

    move my shift in the buffer, the amount of data returned by read(byte[],init,int)

  • Adobe Acrobat Reader wish to change my pdf when closing it. Why?


    I'm working on a generator of small and simple pdf (as stated in my previous question).

    When you open my pdf generated with Adobe Acrobat Reader, everything is OK.

    But when I close the popup of Adobe Reader a message asking if I want to save the changes.

    Why Adobe Reader want to change my pdf?

    Is there something wrong with it?

    Here is a really tiny little sample to a pdf from a blank page generated (everything is pure ASCII, because there is no compression, no data flow,... and it's a copy/paste in a text editor, so I've not translated typo in my post).

    I think I followed the specifications; but maybe I missed something?


    1 0 obj < < / Type/Catalog Pages 2 0 R > >


    2 0 obj < < / Type/pages /Kids [4 0 R] count 1 > >


    3 0 obj

    < <

    / Producer (PdfLib)

    /CreationDate (D:20130710152728 + 02'00 ')

    /ModDate (D:20130710152728 + 02'00 ')

    > >


    4 0 obj < < / Type/page there 2 0 R [0 0 595 841] /MediaBox /Resources <> <> /Contents 5 0 R > >


    5 0 obj

    < < / 0 length > >

    data flow




    1 ×

    0000000000 65535 f

    0000000009 00000 n

    0000000056 00000 n

    0000000111 00000 n

    0000000240 00000 n

    0000000341 00000 n

    trailer < < / size/root 6 1 0 R /Info 3 0 R > >



    %% EOF



    Looks like your XREF entries are 20 bytes long. Read the article

    on the format of the XREF in the specification PDF to see how you put in the form

    each entry.

    Karl Heinz Kremer

    PDF acrobatics without a net

    PDF, training software development and much more...

    [email protected]

  • read byte serial number

    Hi all

    I have a small application that consists of reading data from a serial port using the VISA READ function. The data source that I am trying to acquire the serial port is a microcontroller that sends a word or a byte (8bits). However, when you try to download the programming code in the microcontroller, the programming software backup code in the HEX file into the chip.

    It's all just an explanation into the problem.

    in oreder to get my application actually, I used the attached VI have not program but adds some functions for multiple purposes. The Vi works perfectly and everything works fine, but it seems that I had some misunderstanding here.

    what I'm trying to understand here is why a function (hexadecimal string to number) is used for as much that I have configured everything to read bytes (8bits)

    I am very confused

    any suggestion would be appreciated.

    Thank you

    Converted to 8.5 and attached.

    You can also use

    to perform the conversion.

  • I recently tried to open a new pdf file using an existing program Acrobat Reader and it changed the extensions of all programs and .pdf desktop icons, making them unusable.  I uninstalled Reader and extensions have been fixed.  But when I installed the dr

    I recently tried to open a new pdf file using an existing program Acrobat Reader and it changed the extensions of all programs and .pdf desktop icons, making them unusable.  I uninstalled Reader and extensions have been fixed.  But when I installed the drive again - the latest version (DC) it happened again.  How can I fix it?  I am on Windows 7

    Hi donaldm78047015,

    Try the solution mentioned in this KB doc.

    Kind regards


  • bugs? resolution of reading will not change?

    The resolution of reading will not change no matter what I choose? It can contribute to the distorted playback issue im having? also when I select a clip from the project Navigator or the media sequence starts automatically in arri editing mode? I move to the digital SLR, but playback worsens.

    Win 7


    Hey just launched cc2014 after re-installing win7 loooooooong history exahsting

    CC seems to have a good preview window and some offers quality now!

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

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

  • Problem: read bytes to serial port

    Hello, I need to communicate with an external device with serial port. I have to write a command to my device string, and then it should play with 64 bytes of data. I built a function of READING-WRITING and I use it in a loop (I have to read a lot of 64-byte block)

    Sometimes, I have the following problem:

    (1) I have send the command string, I wait with "Bytes to the serial port" whereas I have more then 60 bytes, then I read.

    (2) sometimes happen that the read function cannot read all 64 bytes, so the net for cycle, I have in the receiver buffer mor than 64 and the program to stop working. (does not work well)

    I need to be sure that after writing the command I have 64 bytes, so I red all the 64 bytes so the next loop for, I have the buffer of the empty receiver.

    I enclose my writing reading function. Please refer to the block diagram (there are a few notes).

    Thank you

    In no place in your program see the VISA configure the Serial Port. It's always a good idea to include this that even if you use the default settings. I suspect this is one of the default settings which is wrong with you. By default, playback is set to end when a character is considered. This means that if you have a 10 hex (ASCII LF) in your stream, playback stops until the specified number of bytes is read. Put in a VISA set up the Serial Port and connect a constant False to the stop character allow entry.

  • TCP read bytes to read

    Hello! I have a small question on ports TCP read palett in labview, im trying to send 1 bit from a server to a client. This works when I put 4 digital in the bytes to read TCP entry read client-side. But when I change the value to 1, as it should be efficiant, this work dosent. Any ideas?

    Your number of bytes value is a number of I32 (32 bits, or 4 bytes), so you send 4 bytes followed by 1 byte for the boolean itself.   You can convert the number of bytes in an I8 to make a byte (but I wouldn't bother because the IP header information is the number of bytes, which means 1 to 4 bytes means little).

  • Read byte with a value up to 127 lire byte with an ASCII value greater than 7F (127 dec)


    I have to read a byte with a value greater than 127, Labview turn 27.

    In help I saw that Labview provides a description of ASCII that pour values ranging up to ' 127.

    What do I need to do?

    LabVIEW 6.1

    Windows XP


    I want to read a byte with a maximum value of 127, but Labiew reurn arround 27 value

    How do I do?

    Rigid wrote:

    Thanks for your help. I'm not changing lyke I understand (my English is poor quiet...)

    I have another program that communicate with the instrument. I know byte (6) must be greater than 18 (greater than 7F actually).

    But with Labview, I'm only 18.

    While it might be higher than 18 x, an I8 is signed, and therefore it cannot be greater than x7F - it has a range of-128 to 127. A U8 is not signed, and it's why he has a range from 0 to xFF. However, x 18 is the same if you treat as signed or not signed. I don't see how LabVIEW can read a wrong value on the serial port. Are you sure you're looking at the correct byte? Your code shows that you split the chain twice. Are you sure that you do this properly?

    Given that you use on Windows you can recheck the chain received using PortMon. Allows you to see what is actually received by the driver for the serial port on Windows.

    P.S. I actually meant the whole byte function.

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



Maybe you are looking for

  • I have a G4 laptop.  I put a new hard drive in it?

    I have a G4 laptop in very good condition, but there is very little space on the hard disk.  Can I put a new one in it?

  • Unable to get Internet using modem internal dial on Equium A200-15i

    Using my new laptop EQuium A200-15i while a Wi-Fi by Netgear has been created, I could not get the internal modem to dial up to my ISP on PAYG (to serve as a backup in case of need).Device Manager indicates the modem is not working properly and the d

  • Need to file for "TOHSIBA Recovery Disc Creator" on Satellite A205-s5825

    Hello I've got Satellite A205-s5825Well, I'm 4,000 km of distance from my Toshiba Recovery DVD, comes with the box.No problem - I can use the recovery disk creator... so I thought. The laptop is less than a week in use, no partitions are changed, etc

  • System Restore does not

    When I use Ctrl alt del, I used to get options like programs running what memory they used and CPU utilization etc. now all I get are operational and the State? Ive tried restoring the system on several dates of restoration but get message system res

  • Satellite A660-18 bootmng is missing

    Hi, I have a satellite A660-18, I had a few problems before like gel but under warranty and always been corrected. I had no problem for months and now my warranty has run out and my computer but froze and I turned it on and it says "Bootmng is missin