Example VI BasicWriteandRead.vi reads back junk.

Hello All,
I am new to LabView, and I am currently trying to talk to a device connected through a serial port. (I am also new to working with serial ports…) When I use the BasicSerialWriteandRead.vi provided as an example, the data I read back is always a bunch of junk. The number of bytes read that is reported always matches the number of characters I entered, but the data read back does not match. Here is an example:
--> string to write: hello
-->read string: nunoo
(hit run again, and next string read is: nenno; next time it reads: oenno)
This connection uses the RS232 standard. When I use the example .vi mentioned above with another COM port listed, the input is echoed correctly, so I guess the problem has something to do with the specific device I’m talking to—maybe I don’t have the settings correct or something like that?
Any suggestions?
Thanks

Get the correct communication specs for your device, if needed, contact the manufacturer.
Try communicating in Hyperterminal 1st before trying LV code, this way you know you have the correct baud, stop bits, parity, flow control.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~

Similar Messages

  • How to read back a xml file

    hi all
    I have a problem reading back an xml file.
    What I want to do is to store sensors and some vi parmaters.
    To do it, I put the parmaters in a cluster, flaten it to xml and then write the xml file.
    till here, no problem.
    When I want to read back the xml file, it doesn't work with the way I do (I use unflaten and read xml file)
    The datas i read back are not those I want to take back from my xml file.
    Can somebody help me with this point?
    The 7 datas filed are :
    string
    string
    string
    string
    U16
    I32
    I32
    Please help me with this, I cant do anything till this problem is solved.
    Thanks in advance for your help.
    ps : hereafter, the xml file i have written with labview. (I have put it in .txt to be sure the upload works.)
    put it back in test.xml to wok whith it.
    Attachments:
    test.txt ‏1 KB

    Hi,
    there are two examples in Help >> Example Finder >> Fundamentals >> File Input and Output. One is Write Data to XML File and the other is Red Data from XML File. The first will write it and the second will read it back.
    I expanded th example with the String data and the value provided in your post and it work even with the '/' in the data.Message Edited by waldemar.hersacher on 04-06-2005 11:23 PM
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Telnet read problem -- Telnet read back

    I am trying to use telnet to send TL1 command to my UUT and expect to read back measurement data.  I was able to read proper data once in a while but most of the time I read back the TL1 command that I sent.  I tried different read mode and timeout period but nothing seem to matter.  My vi was written in Labview 8.2.1 with Internet toolkit.  I read in the forum about some limitation of the telnet read problem of the vi from the internet toolkit,  Is there any better read driver around?
    Thanks,
    Patrick 

    Hey!  I have a few questions for you that should help us solve this problem.  First, have you tried out the telnet shipping example "Telnet Line Client.vi".  This will help us minimize programming errors, etc.  Also, what type of device are you trying to communicate with?  Are there other forms of communication available?  For example, does the device also have a serial port, GPIB Port, etc.?  Also, is it possible to write to the device using TCP/IP (This is what telnet is based on)?  Let me know the answers to these questions and I will be better equipped to help you out!!
    Thanks!
    Dan
    Daniel Eaton
    National Instruments
    Systems Engineering
    Embedded and Industrial Control

  • Error when reading back a binary file

    Hello,
    I am writing out a binary file consisting of U32 arrays, packed strings, and clusters. I get error 116 when reading back. As long as I am synchronized on the correct data position why should LV care what I write to the file? In the example I write a simple 16 element array and a time stamp cluster. When reading back the array I get the error. What is the correct way to do mixed structures? Thanks.
    Attachments:
    file write.PNG ‏44 KB

    David,
    You can solve the problem in various ways. The easiest might be to modify the writer VI by wiring a True constant into the "header (F)" input of your first Write File node. That forces LabVIEW to include a four-byte header that specifies the length of the array you are writing.
    When you wire up the reader code the way you did, the length of the array you wire to the "byte stream type " input is irrelevant; by wiring nothing into the "count" input, you are implicitly telling LabVIEW to look for a header to determine the length of the array you are asking it to read. Because you didn't write any header, LabVIEW is interpreting the first four bytes of the array itself as a length. That length doesn't match the actual amount of data present in the datafile, so LabVIEW generates your error.
    An alternative solution would be to leave the writer unchanged and modify the reader VI: wire an I32 constant into "byte stream type" and wire a 16 into "count". The choice depends on what you prefer and whether or not these binary files need to be compatible with some other program or not.
    Another aside: you can dispense with your case that checks whether the datafile already exists. Just change the function input of the Open/Create/Replace to "create or replace" and wire a False constant into its "advisory dialog" input.
    Hope that's clear,
    John

  • Looking For Scan and Read Back Applications on the App Store for blind individuals?

    Hi There,
    Are there anything applications on the app store which for example if you were to scan a document and the user wanted it to be read back to them in text form or what ever the e.g picture had text on them can it be done or is there any application looking for asap?!!

    Apps don't go in Passbook, but passes do.  You can get passes via both the Starbucks and Apple Store apps.  If you sign up for an account in the Starbucks app, you can create a pass and add value to it (or enter an existing Starbucks gift card number).  The Apple Store app allows you to send gift cards to people, which can then be added to Passbook.
    Check out http://support.apple.com/kb/HT5483 for more info.

  • Loading PID Parameter and Reading Back

    Hello,
    Currently,  I'm developing NI-Motion Driver for 7358 motion control card. My environment is QNX 6.5 realtime OS.
    According to NI Motion Driver Developer's Kit document basically i'm sending packages to board to set values, to start motion etc.
    Now, i'm can drive brushed motor with given velocity and acceleration parameters. I want to ask you that is it possible to read back
    values that written to board.
    For example,
    To load PID parameters i'm using command 32 as given in DDK with axis information, pid parameters and input vector (0xFF). It should
    work same like flex_load_pid_parameters function given in FlexMotion Software Reference Manual.
    I want to check that PID values has been set correctly with my own function. But i could not find any way to do this. There is no command
    as i see to read back these values from board. The thing i learnt from DDK is if command package is wrong board gives package error in
    csr. If something goes wrong during run time, board gives modal error. So, i want to check if there is direct way to read parameters i set?
    Best regards.

    Hey Erhan,
    There isn't a way you can check the values corresponding to the PID effect because this is done in FPGA and cannot be accessed. 
    Regards,
    A. Zaatari
    National Instruments
    Applications Engineer

  • Read back the S/N from PCI-GPIB in WIN2000

    I have download the example serial_num.vi to
    retrieve the S/N from the PCI-GPIB board and
    If,I am using in WIN98se,It looks works fine,
    but,If Iuse this example in WIN2000 then it can
    not read back the S/N of board,
    Can you advise me the solution?

    What kind of behavior is it exhibiting? Is it giving you the incorrect serial number or no number at all?
    J.R. Allen

  • Will an iphone 4S voice read back to me a response to a text message?

    I can send a text with voice control but can the 4S read to me the response on the phone.  Phone is being used by a blind person and SIRI will be very helpful but someone told me that SIRI will not read a text response.

    Go to Settings, General, Accessibility and go under Vision. Turn on Speak Selection. I believe that requires a bit of sight to be able to select the text area.
    To get Siri to read back a text message, I believe you have to turn on Preview, and after that when a text message comes in, you can active Siri to "read last text message". I believe that is the only setting you need for Siri.

  • Is it possible to have the calendar "read back" the event created?

    You can add an event to your calendar by recording or type in.  I want the event to "speak back" 
    "read back" to me what it is at the time chosen on calendar.
    This would be great for the blind also.
    I have the alarm app that speaks back the time back to me at work, which is great.
    Now I need the calendar to "announce"  events to me
    There should be a button to pick if you want that certain event to "speak out loud"  ,  a choice , like the color tabs, reminder tabs, etc.
    If we can speak to the phone, why can't we make it speak back at a certain time and day.  
    help? 
    I wrote to the google webmaster to see if they can create such a response for their calendar.  I don't need another calendar app.  Just make this phone and calendar better. 

    This is not something that Verizon would handle or be able to change.  It would be something that Google would have to change in the Android source code, or the OEMs in their device specific versions.  Or you could just look for another app.

  • You have created a link to another part of your book but how do you get the reader back to the original page?

    Using iBooks Author to make a book you have created a link to another part of your book but how do you get the reader back to the original page?

    Asking me to be verbore is a dangerous thing  :-)
    When you eneter information into iTunes Producer for uploading, the info must match what is in the internal metadata. In this case, the book is called Mississippi, but in  iTunes Producer it is spelled Misssissippi. There is an extra "s". This will cause an error.
    - Fabe

  • Why won't siri read back my messages before asking me to send?

    Why won't siri read back my messages before asking me to send?

    go to settings>general>siri >toggle it off and then on
    then try
    if problem continues
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears. DONT CONNECT YOUR DEVICE TO A COMPUTER.

  • Custom Values not read back from Active area

    Hello All,
    Need help/ directions.
    We have custom fields in UI, which are saved in Custom tables in ECC for reporting purpose. On activation of CR we could save these
    values in Ztables, but when use open the Material for Mark for Deletion we are getting SMT Mapping error (Data could not read back to CR).
    Don’t see any errors while activating CR , SMT in mapping and also API code program
    Best Regards, Srihari Mandapati

    Are these custom fields specific to Material or to the Change Request? If for the Change Request, then you don't need any SMT mapping. Please refer to this document for how you can enhance the MDG header: Enhancement of the User Interface Building Block for Change Requests.

  • DVD+R not reading back on some DVD-ROM drives

    The recording device is the built-in SuperDrive on my iBook G4 1.42. I've been archiving copies of my photos to recordable DVD. It's usually 2 copies of each set - one in DVD+R and one in DVD-R. I store each set in a different place.
    My preferred media is (Made in Japan) Taiyo-Yuden media sold under the FujiFilm and Sony label. So far, the spindles I've opened and used are the FujiFilm (8x-listed) DVD+R (regular silver label) and DVD-R (from the "Color Tower" package).
    The DVD-R recordings seem to read back fine in most DVD-ROM drives I've tried. I have a circa 2001 PC with a DVD-ROM drive, and it doesn't read back the DVD+R copies. It'll just whirr for about 20 seconds and then just stop without the disc mounting. All DVD recordings seem to read back just fine on my iBook G3 600.
    Are there any known problems with readback of DVD+R recorded from OS X on some DVD-ROM drives? I figure I'm eventually going to get an external drive that also records DVD+R (I'm thinking that would present the fewest compatibility problems) or a new machine (it's about time after five years).
    14 iBook G4 1.42 1.5GB (10.4.3), 12 iBook G3 600 640MB (10.3.9)    

    Just a note of interest. If your machine is 2001
    vintage, my guess it doesn't like + media at all.
    There are some reports that in some cases that these
    older drives can read them sporaticlly at best, this
    is normally caused by the poor quality of some
    manufactures.
    It's a Sony VAIO desktop with a Pioneer DVD-ROM drive. I don't know about "quality" per se, but it probably finicky.
    I find that using the best quality media eliminates
    many problems. And I realise that it is more
    expensive to use this media but in the long run it's
    worth the extra money.
    Have a look at the Media Guide below.
    http://www.digitalfaq.com/media/dvdmedia.htm
    Cheers Don
    Like I said - Taiyo Yuden all the way unless it's maybe sometime like video storage where it's no big deal. I just got three spindles of MIJ (had to look carefully for that) Sony 16x DVD-R for $12.99 each at CompUSA. They didn't have it on sale, but they price-matched the $12.99 price at Best Buy (my local store only had made in Taiwan stock). I was next to the manager at the customer service area, and she said I could have as many as I wanted at that price. If it were some expensive item, I think I would have been limited to one or two.

  • Give me some examples for functions for read POST, write POST, modify POST

    Give me some examples for functions for read POST, write POST, modify POST, create and delete theme in forum. This functions have to be make like Remote Methods

    Give me some examples for functions for read POST, write POST, modify POST, create and delete theme in forum. This functions have to be make like Remote Methods

  • I can't read back what I wrote (to a file)

    I wrote a very large file (over several hundred hours) in textual form; each line is a long, output using toHexString() like this:
    2092cc0ca723ec80
    2092cc0ce463ec80
    2092cc0d14a3ec80
    2092cc0d14e3ec00
    2092cc0d1523ec80
    2092cc0d1563ec80
    2092cc0d15a3ec80
    2092cc0d15a3ed00
    2092cc0d16e3ec80
    ... etc ...
    I then tried to read the numbers back into another Java program using Long.parseLong(str, 16), but I get a NumberFormatException when I get about 1million lines in. This is where the lines begin with an _8_ (in hex):
    8219250d16e3ec80
    8219250d16e3ed00
    8219250d56a3ec80
    8219250d56e3ec80
    8219250d56e3ed00
    ...etc...
    Is there another way for me to use Java to read back in what I wrote using Java?

    ozweepay wrote:
    >
    You're absolutely right. I think this is the reason that Java will never become widely used, ...
    Did you actually just claim that Java's popularity implies that it cannot contain design flaws?Sure, why not. I mean we all know that Java is perfect. God forbid, I've never seen anything wrong with Java in the past 10 years.
    Wow indeed! Why didn't they put it to the standard API. Businesses all around the world are parsing 64-bit hex values from files!!!
    Did you actually just insinuate that Java's principle purpose is to support business applications? I guess that's why the standard library doesn't support things like graphics, sound, networking, etc.And yet you're only reading hex Strings from a file. All those sweet graphics and sound classes for nothing...
    Do you spend a lot of your time insulting people who complain that the lack of unsigned longs makes it hard to parse network addresses? It's not like anyone ever does that on a computer, right?Do you spend a lot of your time rewriting things in C when a programming language fails you in the parsing department?

Maybe you are looking for

  • Storage location Data is not saving in table MARD using BAPI method.

    Hi Experts, TABLES: T001L, "Storage Locations         MARA,  "General Material Data         MAKT,  "Material Descriptions         MBEW,  "Material Valuation         MARC,  "Plant Data for Material         MARD.  "Storage Location Data for Mate DATA:

  • Can't download or update apps from App Store

    I'm using a MBP Retina Display with Mountain Lion. Whenever I attempt to update apps or download new ones, the sign in window pops down. I type in my log in information and the window goes back up, just to come back down again. It doesn't stop no mat

  • Error Message; Wheel won't spin

    When I try to open itunes on my computer, I get a message: "unknown error occurred (-50). I can't find any reference to this under support and have no idea what to do. To make matters worse, my spin wheel won't spin!!

  • HELP__How to put my limewire song on my Ipod

    I have just downloaded limewire to my computer and now I am trying to put the songs on my ipod and I have no idea what O am doing can someone please help me.

  • Viewing tables in sql plus

    hai friends., i created a java database pgm using jdbc:odbc connectivity, that creates a table in the database and i inserted some records in that table. how can i view those table and records in the sql plus. what commands are used to view those tab