Problem with string writing series

I'm using labview to send commands to a device using the serial port com1.  Using the example VI "Base series in reading and writing", I can communicate with my hardware very well, can write and can read.   the problem comes when I want to edit the VI by using my own string instead of the string provided in the example.  When I create a string constant with the exact text that was in the example string box, I can not write my material.

I don't understand why this wont work.  Is there something special about the example of the VI text 'string to write' box that I don't know?

Help, please


Thank you

I know what you mean and it does not work like that.  For some reason if I use a string with \r\n constant it still does not work.

Anyway, I solved the problem in a roundabout way.  The command I sent you is a word but both parties; first part, second part number.  I want to create a loop when the number changes.  I was able to do this by combining three channels, the first is a copy of the example string, the middle is my number converted to string, the third is a different copy of the string of examples.  Now it works and I can with my life

Tags: NI Software

Similar Questions

  • Problem with string to Int conversion

    Dear friends,

    Problem with string to Int conversion

    I'll have a column where most of the values is digital. Only 4 values are not numeric.

    I have replaced the non-numeric values to numeric in order to maintain the data type.

    Grade.Grade DEAL WHEN "E4" THEN "24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' Grade.Grade OTHER END"

    This is the result as inactive



























    -            -            -

    Now I want to convert this value in digital and do some math

    So I changed the formula as below

    Cast (CASE Grade.Grade WHEN "E4" THEN "24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' Grade.Grade END as an INT. ELSE")

    Now I get the following error
    View display error
    Driver Odbc _ returned an error (SQLExecDirectW). _
    Error details
    Error codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    _State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 17001] Oracle error code: 1722, message: ORA-01722: invalid number in the OIC calling OCIStmtFetch. [nQSError: 17012] In bulk fetch failed. _ (HY000)
    SQL issued: SELECT cast (CASE Grade.Grade WHEN "E4" THEN "24' WHEN 'E3' THEN '23' WHEN 'E2' THEN '22' WHEN 'E1' THEN '21' Grade.Grade END as an int. ELSE") seen'Human Capital' 0 - Costing Manpower WHERE LENGTH (Grade.Grade CASE WHEN 'E1' THEN '20' WHEN 'E2' THEN '21' WHEN 'E3' THEN '22' WHEN "E4" THEN "23 ' ELSE Grade.Grade END) > 0 ORDER BY saw_0_


    Could someone help me



    Published by: Musnet on June 29, 2010 05:42

    Published by: Musnet on June 29, 2010 06:48

    Are you sure you don't have another non-digital value in your column. I want to get this filter temporarily just to check if your plaster works or not. If it works, then you can remove this filter.

  • Problems with reading the series bytes


    I currently have a PIC18F microcontroller serial communication with LABview using the base read and series. The PEAK sends strings such as "V222! (V is the character of the header, and! being the end character). Then, I have a program to take each individual character read and concatenate them in a larger string for data extraction. The port has been configured to 38400 baud and be only a single byte of long.

    The captain sends this one byte at the time and the problem here is that LABview seems to be only reading V most of the time, and occasinally has 2. Since it doesn't seem to be never read the end character, the sequence of extracting data from my code is never executed.

    A few questions I have are:

    The captain may send one byte at a time, but also all other devices communicate through a serial port.  The definition of the serial port involves both a byte.  Actually it's really a LITTLE at a time.  But serial port parameters leads to the gathering of 7 or 8 bits to produce a byte.  The PEAK sends a follow-up byte to another byte, etc.  The time between shipments of the byte may be too small to read contiguously in your Labview program.

    At very slow speeds, it could really work.  At 300 baud (3mS / bit), there are 33 mS to send a byte (8-bit + stop bit, start bit).  So if your loop runs fast enough, you get every byte one at a time.  But there is the overhead of other code to store the bytes, etc..

    38000 baud to only 0.2 mS to send a byte.  LabVIEW is not fast enough to loop at this rate to capture all the bytes individually.

    But why bother?  Simply capture all the bytes and treat them as a complete message.

  • Problem with correlationID MQ Series with OSB

    I use Oracle Service Bus and create a proxy and a business service (.biz) to publish a MQ Series queue.
    I post the message on the queue, but correlationID MQ Series sent to MQ Seires queue (.biz) business is diferent, when I receive the correlationID property of the message in the queue from MQ Series.
    For example:
    I sent the follow-up correlation identifier.
    Correlation-Id: D76DF8E7AEFC000000000000000000000000000000000000 (hex)
    [[When I get the parameter correlationID MQ Series, the only other value correlation identifier: Xmocru:] x 5] ^ 5

    This a bug?

    What's wrong?

    OSB MQ Transport waiting for a base64 correlationID. In your example, you sent a hexadecimal correlationID.

    When you use the adapter MQ (SOA Suite), MQ adapter awaiting a hexadecimal correlationID.

    Tracking links can help you with more information with the hex and base64:

  • Problems with the VISA series connection (missed the ticks in the data)


    I designed a DAQ card with USB connection. The USB connection works in virtual Com Port mode.

    The main vi a while loop. The sampling time is defined by the user and the hand while loop iterates of this time of the sample (for example, 5ms, 10ms or...). Communication of the data is made in the present while loop using VISA read or write tools. Data are stored in global variables so the other could read or change.

    There are screws separate for each part of the DAQ card input analog, digital output and... Each vi has its own time while in a loop which iteration step may be different from the large loop.

    The program works correctly, but there are a lot of ticks of "rate" in the communication of data. I've attached a screenshot of input analog vi. A sine wave is produced with output analog vi and this output is connected to an analog input. As you can see the data transmission has problems.

    This caused several loops work simultaneously? Or communication VISA has problems?

    Thanks in advance.

    The main problem I see with your VI is that you use bytes to the Port which is the wrong thing to use about 99% of the time.  It seems that you are trying to break around 31 bytes and turn them into numbers.  Suppose that at the moment, you check the bytes, a port, you have received only 28 of these bytes.  Some of the variables will find 0 because you have all the data.  But on the next play, you will have the remaining 3 bytes so everything from the.  Now your data package is misaligned.

    I suggest that if you want 31 pieces of information, you just put a constant 31 reading VISA and get rid of bytes to node Port.

    Other advice.  Index table is EXPANDABLE!  You don't need to create 31 copies of the index table and wire a constant to each of them.  Remove a node, and expand the bottom border down that you need.  You don't even have to add all the constants, because by default it will give you index 0, index 1, index 2...

  • Problem with string comparison

    I have a web service that I use two compares two strings, one from the service web xml of my application.

    XML retrieves a string when I compare it like this

    If (xmlVersion == 'true') {}


    It never enter the if condition when I print the value I get from the service I think like this (real).

    So, what's the problem here?

    The way you wrote the comparison. you simply compare the addresses of the two strings.

    Try this instead:

    xmlVersion.equals ("true").

    In fact, you might want to consider getting these out to the back to avoid would be Null Pointer Exceptions, like this:

    If (true".equals (xmlVersion)) {" "}


  • Reading problem with string after - stabilizer

    I just imported 4 sequences of gopro black k in my calendar and practical cuts. I was sure to drag the images from the library to the timeline and match the settings of the sequence. The problem occurs after the addition of stabilizer of Warp. I made green bars, but reading the image is grainy and stutters. I read resolution full game and exports come out the same way in a variety of formats. VERY frustrated with this recurring problem. Help, please. Thank you.

    Just spoke with a technician. Only necessary to upgrade to version 2015.0.2

  • problem with String.replaceAll

    Everyone does not understand why "10,00".replaceAll (".") * ","0") == '00' and not '0'?"

    Looks like. * must match the whole string and replace it with '0 '.

    With the help of 1.6.0_17

    840419 wrote:
    Everyone does not understand why "10,00".replaceAll (".") * ","0") == '00' and not '0'?"

    Looks like. * must match the whole string and replace it with '0 '.

    He does.

        public static void main(String[] arg) {
            //System.out.println("10.00".replaceAll(".*", "0"));
            Pattern p = Pattern.compile(".*");
            Matcher m = p.matcher("10.00");
            while(m.find()) {
                // the first find() greedily matches everything
                // the second find() matches a 0(zero)-length charsequence at the end

    You want to

        public static void main(String[] arg) {
            //System.out.println("10.00".replaceAll(".+", "0"));
            Pattern p = Pattern.compile(".+");
            Matcher m = p.matcher("10.00");
            while(m.find()) {
  • Problem with string to Long in Blackberry JDE and Eclipse w / Blackberry plugin

    I'm trying to convery a string to a long use in a persistent store.  I'm following the doc of Blackberry on the process.  When I type the chain and right click on "Convert String to Long" is gray in Eclipse and the BB JDE.

      String key = new string ("applepie");
      String key = "applepie";

    those are the means I m try in both environments.

    What I am doing wrong?

    There must be something simple.

    I'm probably not see the forest because of the trees.

    You must select this channel.

    first select the channel using the mouse (as when we do to cut or copy)

    After that right-click on this channel.

  • Problem with TV show series purchased on iTunes

    Bought 8 episodes of TV shows on the iTunes Store and they have downloaded in the Section TV shows to iTunes on my Mac.   As it was a gift and I didn't not found immediately, I used the Options mode and temporarily transferred the episodes section of home movies where I knew that the recipient would not find them.

    Now I want your choice of television programming, but iTunes won't allow me to move as there is no menu drop-down available in home movies for me to pass the episodes.    Can someone tell me how to access the drop down to the Home Theater.    Thanks in advance.

    Bob Crawford

    You try to do that in the movies section of your Mac iTunes library home, or they are on your iPad (I assume you have an iPad you have posted in the iPad help forum) and you use iTunes on your Mac to try to update on this issue?

    For the television programs in the library iTunes on my Mac, if I move a Home cinema and then select/highlight it in movies at home and "get info" (command I), I get an Options tab on the popup that allows me to bring him back to TV Shows - you do not receive the Options tab, or not the kind of media?

  • Problem with Arabic writing in excel

    How can I write Arabic characters in an Excel using LV2010?
    I tried different ways even using "Report Generation for Microsoft Office Toolkit", but what I see in excel is not Arabic characters.

    There is only a few strange characters...
    Help, please. It is urgent

    I know it sounds a bit late!

    But I found the solution on windows setting language options

    By changing some settings such as the language, format, country and... in the Panel

    Thanks anyway

  • Problem with writing worksheet


    Guys can anbody help me with this thing, I have problem with the writing of the spreadsheet file. I'm uploading a picture of my program in LabVIEW.

    When I run program works as well and excel file is populated with the data that I've seen the size of the file how rising. But when I want to open the file to verify that I got this message in 'Note2 '.

    So can anbody help me what I need to do? Problem in my LabVIEW or?

    Thanks in advance.

    Hi dony,.

    simple answer: do not use the suffix "xlsx" to your spreadsheet file. Use instead - 'csv' because that's what you create!

  • FDK: Problem with line breaks / carriage returns


    I met a strange problem with strings when you use the FrameMaker API. We have a FAPI customer who translated documents FM reading in their content, by replacing their text by the new translated text and in return the change in writing.

    However, I found that some strings are starting with a \r (carriage return) character, when we read in and when we write their return, they begin with \r\n, which moves text to the bottom line, and can break things as references etc. I don't know exactly why this is happening, we are using Visual C++ and we do a lot of conversions between classes CString and StringT types so maybe this conversion process are to do.

    To be honest, I find the appearance of newlines and carriage returns in the frame channels somewhat odd frame API breaks up the text of a paragraph into fragments for you anyway, so I would have thought that the use of these characters is redundant. That's a big assumption however so correct me if I'm wrong.

    We have implemented a work around by which our program strips newlines off channels before writing their return

    but in reality, what we really need to undress returns to the main line of strings, before starts the printable text in a string.

    I wonder what others have to say about this WRT its security approach. Any advice would be appreciated, thanks



    I did a little greater experimentation, based on my previous comments (sorry, should have done that before I clicked on the Post before.)  When I programmatically add a \r one paragraph, I don't see no effect in page layout. This is consistent with my suspicions so far. I really think that, maybe, these characters are misleading and should be removed from the beginning.


  • Problem of string manipulation


    I have a problem with string manipulation. I need to compare the character with his next character.
    as an example consider the string as "fat".
    'b' must be compared with 'o'.
    "o" by 'l' and so on.
    I used below the code snippet.

    for (int i = 0; i < s.length (); i ++)
    int j = i + 1;
    If (s.charAt (i) == s.charAt (j))
    status = false;

    on the other
    status = true;

    But I get an error message. Help, please. Thanks in advance.

    Published by: Vinayjgeorge on June 1, 2011 12:26 AM

    Published by: Vinayjgeorge on June 1, 2011 12:39 AM

    (1) for the validation of code, use the code tags so that it will be readable:

    (2) "I get an error" means nothing. Do you think that there is only a single possible error that may appear in the Java code and the only possible thing that can? If this isn't the case - in other words, if you don't know that there are different errors and causes - so why you thought that simply say "I get an error" without any details would be sufficient to describe the error? You must copy and paste the exact, complete error message, if you want to communicate clearly what problem you encounter so that people can help you.

    Please put a little more thought in upcoming posts.

    That said, in this case, it is easy to see an error you will get. Loop tells you ' for each character in the string, compare this character with the next. " You can see why it does not work? When you get to the last character, the comparing it to that is not possible, because there is not a next. You say "for all characters except for the last, compare it to the following."

    Once correct you that, you always seem to have a logic error. You are just blindly setting status to each character, so when you're done, just status will contain everything that produced the last comparison. It might go back between true and false to each character, but the only one that will count will be the last.

    Edited by: jverd May 31, 2011 12:06

  • Problem writing series

    Hi, I have problems with writing the series. If I run in the debug (peak performance) mode it seems to write OK, but once out of debugging, it only works once in a while or if I send something to my VI for him to read first.

    No I don't think that's the right way. You try to read from the serial port and the same resourse you spend writing so if you don't have all the data to read you will get an error in the sequence of your serial port of Scripture will not work / by mistake. It must be checked if data are available on the serial port before reading.

    This is just an example, I enclose you who can do better.

    Good luck.

Maybe you are looking for

  • S5-1014 Desktop: compatibility Windows 10-How do fix my computer tested by HP?

    Using the HP Wizard, the action list includes getting my PC tested by HP for compatibility with Windows.  Whenever I click the red button to do this, I get a generic response, saying that the computers manufactured before August of 2013 are not compa

  • Toshiba 46TL938 connection + Galaxy S3 via DLNA

    Hello I have trouble these days connecting these two devices via DLNA.Unfortunately the manual was not enough to help find how it should be configured. How can I configure and share my content on my Galaxy S3 via DLNA Thank you.

  • Why is my computer sometimes crash with horizontal lines?

    my computer start good, and when for example open work program or do something in intenert at the moment is the rout of horizontal lines and never recovery only if I stop with the button start again, sometimes continuously work well and sometimes a s

  • E-mail sent to the "Spam" folder and this is not spam

    I'm sure this has already been answered, but I searched here and internet and maybe I'm not right worded research but most of them answer questions such as "undesirable" (and this isn't the case I'm talking about) and others have answers as envoys of

  • Forwarding SIP

    Is it possible to transfer a call via voip (sip). (ie. have the call in gsm and then passed on via sip programmatically)