Telnet read problem

While doing telnet read, if the operation times out, I don't get an error.
I am using telnet read in line mode. My line separator is my prompt char
"cli>". Timeout is set to 10seconds. If I turn of power to my device after I
logged in successfully, my telnet read operation should fail, but telnet
read return OK.
vishi

I just checked the version of the Internet Toolkit that I have just to check, and that is apparently the intended behaviour. For some reason, NI tends to not see timeouts as an error.
The thing to do is open up the read icon and follow the error clusters through. In the version I have, there are several places where there is a small icon labled "NO TO" on the error cluster that (you guessed it) filters out any timeout errors that occur.
The simple fix is to rename the read VI and then go through it and remove all the timeout filters--which really shouldn't be there in the first place.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • 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

  • Adobe Reader, Telnet Hyperlink Problem

    Hi, I met a telnet Hyperlink Problem in Adobe Reader.
    When click the Hyperlink (like telnet://a.b.c.d), Adobe reader gives me a Alert:
    Acrobat does not allow connection to: telnet://a.b.c.d
    And I also need to open this telnet hyperlink in web browser with Adobe reader plugin.
    Would you please give me some help?

    Acrobat and Adobe Reader recently closed off access to custom protocols. Telnet is a standard protocol, but I can't see Adobe leaving it working.

  • Error 56 in Telnet Read

    Hi!
    Does anybody know why I get error 56 with Telnet Read function even
    connection is workin fine and I can receive messages trough Telnet? I
    have tryed to use Line read and normal mode. With normal mode i have
    use bytes to read values, which are same as send data or even smaller
    than sended data, but always I get error 56. After error 56 apperars,
    sended message from Telnet Read buffer is read to my VI and everything
    works correctly. Problem in this is that I would like to error handler
    to tell user when connection realy doesn't work, but now error 56 comes
    even everything works fine.
    Thanks for all help I can get.

    Using Labview 8.5, XP, Telnet Line Client, I get the following error 56, TCP Read in Telnet Buffered Read.vi->Telnet Read.vi:3->Telnet Line Client.vi.
    I looked up this error which looks to be a Networking error:  56 The network operation exceeded the user-specified or system time limit. 
    The data does seem to return properly but this has been an ongoing issue with previous Telnet clients we are using.

  • Two Telnet read VI's running at the same time interfere with each other

    I have a situation where multiple tests must test multiple UUT’s on the same computer. To send commands to and get responses from the UUT's I use a telnet session. The telnet read VI uses a semaphore. Therefore when two separate top level VI's are running, each calling the Telnet read VI, if one Top Level VI is using the Telnet Read VI the other Top Level VI waits for the first one to complete before it can use the Telnet Read VI. This VI is setup for reentrant execution but because of the semaphore it cannot truly be used as a reentrant function. This causes severe problems when trying to communicate with two different telnet sessions simultaneously.
    In the past I have avoided this problem by compiling everything into an executable. Then each Top Level program runs completely independently with no interdependences. However, now I am implementing Teststand and I need to call the same Top Level VI's. I need to be able to get information into them and back out of them from Teststand. This means that I can no longer compile them into stand alone executables. I did compile each top level VI into its own Share DLL thinking that then each top level program would have its own library to call upon. This did not work. Even though both top level programs are compiled into their own DLL there is still interdependency when calling the telnet read VI. One program waits for the other to finish reading from its telnet connection before it can read from its own telnet connection. Since I have to continuously read from the telnet connection, sometimes for up to half and hour, the tests do not function simultaneously. How can I get around this? Is there a solution?
    Josh
    PS The Telnet Read VI I am refering to came with the Internet Toolset package. Attached is a copy of the VI I use to communicat with the UUT's.
    Attachments:
    GUI_Telnet_W-R_Auto.vi ‏64 KB

    Sorry about the confusion.
    The file I attached is in the hierarchy of two separate top-level VI's. The telnet connect is opened once and closed once in each top-level program. The ref number is then passed into and out of the VI that I attached. I use this VI to repeatedly send commands via telnet and wait for the appropriate responses. The telnet read VI is given a read line separator and reads from the telnet connection until it matches the read line separator with a text string read back from the telnet connection. If not match is found it times out and creates an error.
    I am not sure how to provide an example of the overall scheme since the problem occurs when both top level VI's are compiled each into their own shared DLLs. Those DLLs are then call from Teststand and at some points they are both running at the same time on the same computer connected to two different UUT's.
    The question I have is why does one DLL share functions with the other? When one DLL is using the telnet read VI the other DLL waits for the first one to finish with it before it can it use the telnet read VI. If they were both compiled separately each into their own DLL shouldn't they each have their own set of functions to call upon instead of having to share? I know that if the two top-level VI's are not compiled they cannot both execute the same sub-VI at the same time. The only way to get around this is to set the execution property on the sub-VI to reentrant.
    I actually fixed the problem by setting the VI I attached and the Telnet Buffered Read.VI (called by Telnet Read.vi) execution properties to reentrant. However, I am still concerned about two separate DLLs sharing sub-VIs. Why does it do this?
    Joshua

  • Query works in Tera Term but not in Telnet Read.vi

    I am using Telnet Write.vi to execute a command such as GET_VERSION
    Then using Telnet Read.vi, I am expecting several lines to be returned.
    This works if I manually do this with Tera Term.
    But with LabVIEW, the Telnet Read.vi simply returns the command from the Telnet Write.vi
    What do I have to configure to change this behavior?

    Edit:
    Needed to add carriage return +  newline 
    DUH.

  • Endless Telnet Read Loop

    Hi
    My goal is to constantly archive data to a local machine thru a Telnet connection.  I receive a small amount of streaming data (25 bytes/second) thru a static IP address.  The code that is attached is my attempt to
    1) initiate a Telnet connection to a static IP address
    2) read the streaming data, write to binary file on local machine
    3) send some pertinent info to the screen for the user
    since I always want to have the VI reconnect if the Telnet connection is dropped (or times out), I attempt an "endless" loop that will
    4) close the Telnet connection
    5) reopen the Telnet connection
    6) recommence writing data to binary file on local machine
    My questions are:
    Q1) Did I write this correctly?  Behavior is erratic.  Sometimes works perfectly, sometimes doesn't work.  I am unclear if I need to use a sequence of events within the outer loop to properly reconnect whenever a telnet connection is lost (sequence1: open Telnet, 2: write data. 3: close session, loop back to 1).
    Q2) Often, when there appears to be no successful Telnet connection (by this, I mean no data streams to the screen which indicates the data feed will not be written to a binary file on the local machine), the numbers in the "File Size (bytes)"  continue to increase.  When I open the binary file to see what is being written I find the same character repeated instead of the data I wish to collect.  I think perhaps that the Telnet Read is reading something, but I don't know what it is, or how to control it.  Any ideas?
    Thanks!
    Attachments:
    MBB06RawTelemetry.vi ‏27 KB

    I said stop the inner loop either when the
    button is pressed (as you still have) OR there is an error.  So look at
    the status of the error wire and OR it with the stop button before
    wiring into the inner loops stop terminal.
    Ok. Clear now.
    I'm not sure
    why you'd be getting a stop/continue dialog for error 56 because I
    can't see anywhere in the code that would cause the dialog to pop up. 
    Drop some more indicators on your error wires, or probes.  Run with
    highlight execution turned on.  Do any or all of these things until you
    can figure out where the error is occurring.
    Ok.  I can do this.  More later if necessary.  
    I don't know
    where ^@ would be getting generated from unless somehow the telnet
    protocol is doing it.  What you could do is put a case structue or
    select statement in the middle of the string so that if there is no
    error, the string value goes from the read to the file.  If there is an
    error, an empty string goes to the file.
    What do you mean by "in the middle"?
    Q3: Is it possible that having multiple Telnet sessions open at one time would create issues like this?  The final goal is to archive the telemetered data from 6 stations at once through the telnet port of one machine.
    Go Beavers.

  • Image reading problem in servlet

    Image reading problem in servlet
    I am reading an image in servlet and writing it to ServletOutputStream
    The following code works fine unless I change the size of the byte array (for increasing download speed) from 8 to something like 128 or any other higher value
    If I change the value of byte array size the image does not get downloaded properly, I mean the quality of the image changes, it does not looks like the original imageURL url = new URL("http://www.mysite.com/images/img1.jpg");
    URLConnection con = url.openConnection();
    con.setUseCaches(false);
    BufferedInputStream in = new BufferedInputStream(con.getInputStream());
    BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
    byte b[] = new byte[8];
    while(in.read(b) != -1)
         out.write(b);
         out.flush();               
    out.close();
    in.close();what do I change
    byte array size
    or use the constructor of BufferedInputStream with 2 parameter
    or use the constructor of BufferedOutputStream with 2 parameter
    or use flush outside while loop or what else

    Change your while loop to:
    int count;
    while((count = in.read(b)) != -1)
         out.write(b, 0, count);
         out.flush();               
    }The penultimate time read is called, it may not fill the entire byte array. You only want to write out however much was read into the array.
    For better performance, you should move the flush() outside of the loop too. BufferedOutputStream will flush automatically when its internal buffer is full.

  • Telnet Read VI and variable length response

    I am trying out Internet Toolkit's Telnet VIs.
    It seems that the Telnet Read VI defaults to 60 bytes.
    I am not sure what is the best way to deal with the situation of a variable length response.
    Some responses are 3 lines; others can be 50 lines.

    the line seperator is explicitedly <CR><LF> or carriage return and line feed. No other line seperator is automatically supported.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • T 420s cooling air coming out is very hot, finger print reader problem

    I am living in ruwais, abudhabi.i bought T 420s in last June from LENOVO  authorized distributor. Model number is 4174-KK4 and the sr no ***.
    Sometime the cooling air coming out is very hot, unable to keep the laptop on the lap.
    The cooling fan also replaced still the temperature is high.
    After replacing the fan I noticed that I noticed one of the screws was not fixed, I asked them to fix it, then they fixed it.
    I traveled back to my home 240 KM from the  authorized distributor service  center. when I started the laptop, the fingerprint reader was not working . Then I traveled back 240 KM to the  authorized distributor service  center to fix the issue. They fixed the fingerprint reader problem.
    Then now the SD card reader is not working. I was asked to bring the laptop to the  authorized distributor service centre.
    Can any one experience the same type of problems  with T 420s the cooling air coming out is very hot, finger print reader problem, card reader not working?
    The authorized distributor says for the service they can only cover 50 KM form the  authorized distributor service  center to the customer point, what is the conditions for the On site warranty ?. I am living 240 KM away from the authorized distributor service center from whom I bought the laptop.
    Moderator comment: Serial number(s) removed to protect member from mischief.

    Well clearly after the first incident. You need to check and us it verifying everything is working before leaving the service center or town its in. Go to a coffee shop and spend time using it and test each option is working.
    When the notebook its opened the finger print reader, card reader etc may not be connect properly or connectors not snap fully and disconnect. Mouse ultranav I have heard may also. But clearly you assume too much and you need to spend the time testing its working before leaving.
    These service center are only paid a fixed amount so they won't spend anymore time then they have to and address one problem you brought it in for.
    As for heat out put and over heating. There are many threads on these systems you can find and read about.
    Advice:
    - install Core Temp, this will monitor and display on the task bar you CPU core temp and you can see CPU load & Temperature at a glance if it approaching or staying near the max levels which will kill the CPU and/or motherboard due to cooking it. Its free just be sure to deselect any additional software from installing during the process. I use it on my notebooks. If the system is running high core Temp all the time you need to have it resolved or it will die and most likely out of warranty and/or your data will be lost if you don't have a backup as well. http://www.alcpu.com/CoreTemp/
    - use a laptop cooler. Its a flat pad you sit the laptop on you lap or table with usually two cooling fans that plug into the USB port for power. It will help cool the base of the laptop and other components inside will not be as hot. This will do nothing for the CPU temperature though.
    T520 Model 4239 Intel(R) Core(TM) i7-2860QM CPU @ 2.50GHz
    Intel Sandy Bridge & Nvidia NVS 4200M graphics Intel N 6300 Wi-Fi adapter
    Windows 7 Home Prem - 64bit w/8GB DDR3

  • I am unable to print documents.  States Adobe reader problem

    I cannot print documents as it says Adobe reader problem or error

    Windows 7; HP 2009m; printer is Lexmark S415;
    Message says
    Acro RD32.exe
    Adobe PDF document
    (There is a problem with Adobe Adrobat/Reader.  If it is running, please
    exit and try again. (15:3)

  • DataSocket Read problem

    Hi all,
    When I use the new condensed "DataSocket Read" vi in Labview 6i (which is
    unfortunately not editable and is supposed to replace old vi's like "open
    connection", "update", "close" and so on) a single time to read automat
    words through an OPC server, the vi returns "zeros" all the way. The only
    solution I found to read the right datas is to place the "DataSocket Read"
    in a "While Loop" which loops until datas are different from zeros, which
    is very inconvenient and time consuming. I tried diffferent settings with
    "DataSocket Read" (wait for update, timeout) but the problem remains.
    Have you also faced the same problem ? Is there a solution ? Thanks for your
    assistance.
    Gaël RENEVIER
    Responsable Maintenance & Développement
    Tél : 04 74 82 20 08
    Fax : 04 74 82 24 92
    e-mail : [email protected]

    This is a problem with the 6i data socket routines ... use the old routines
    from the data socket examples (with the open,update, close drivers), and it
    works fine.
    Dave Gianetto
    http://www.gianetto.org
    > From: [email protected]
    > Organization: UUNET
    > Newsgroups: comp.lang.labview
    > Date: Tue, 21 Nov 2000 16:05:38 +0100
    > Subject: DataSocket Read problem
    >
    > Hi all,
    >
    > When I use the new condensed "DataSocket Read" vi in Labview 6i (which is
    > unfortunately not editable and is supposed to replace old vi's like "open
    > connection", "update", "close" and so on) a single time to read automat
    > words through an OPC server, the vi returns "zeros" all the way. The only
    > solution I found to read the right datas is to place the "DataSocket Read"
    > in a "W
    hile Loop" which loops until datas are different from zeros, which
    > is very inconvenient and time consuming. I tried diffferent settings with
    > "DataSocket Read" (wait for update, timeout) but the problem remains.
    >
    > Have you also faced the same problem ? Is there a solution ? Thanks for your
    > assistance.
    >
    >
    > Gaël RENEVIER
    > Responsable Maintenance & Développement
    > Tél : 04 74 82 20 08
    > Fax : 04 74 82 24 92
    > e-mail : [email protected]
    >
    >

  • Card Reader problem with MSI K8T Neo

    Hi,
    I have the K8T Neo motherboard, and every once and a while my Atech Flash 9 in 1 card reader  (http://www.newegg.com/app/ViewProductDesc.asp?description=20-176-003&depa=0) doesn't power up, thus I can't use it.
    What's odd is that all my other USB devices work flawlessly.
    The only way I'm able to use the card reader again is to power down my computer and then flip the power switch on the psu, then turn it back on, or unplug the reader from the usb header on the motherboard and plug it back in.
    I've noticed other people have had similar issues...
    Any ideas what causes this, or any ideas on how to fix this?
    Bio Haz

    Yes, I had the same hanging problems as well with older BIOS versions then 1.7.
    But that isn't the problem I'm talking about, the computer always starts up, it's just a matter if the usb reader will work or not.
    Maybe MSI has yet to make a BIOS that is compatible with all card readers.
    BioHaz
    Quote
    Originally posted by me_AMD
    ...yes, I had USB card reader problems but it caused the computer to hang during POST, and that was fixed with BIOS v1.7...
    ...I've had what you describe happen on another machine with a Mitsumi card reader/floppy drive combo...not sure what caused it...had to disconnect it and then plug it back in...???...

  • Telnet read isuue

    Hi all
    First of all thanks for taking time to help me with my problem. Let me explain
    I have developed a telnet connection program that connects to a switch and interacts with it. But unfortunately when i try to login to the switch after sending the password the switch does not reply.
    If i try and connect directly (without the use of my program) with the switch using telnet i can login without any problems.
    below is the flow
    1. readUntil the prompt "USERNAME>"
    2. send the username
    3. readUntil the propmt "PASSWORD>"
    4. send the password
    5. readUntil the prompt "WELCOME>"
    i can get to step 5 using the telnet utility. But im not getting the "WELCOME>" prompt when i use my program.
    the readUntil() method reads the input and returns what ever that is sent. It reads character by character
    While the send(String value) method writes the String value as a byte stream along with a Carriage Return.
    When using my program step 5 does not return anything. (The switch doesnt reply) But it provides the correct output when i use a telnet connection.
    I have checked Both the read and send methods and cannot find a flaw.
    what could be the reasons for this ?
      private StringBuffer readUntil(String pattern) {
        try {
          System.out.println(
          char lastChar = pattern.charAt(pattern.length() - 1);
          StringBuffer sb = new StringBuffer();
          //for timinging out purposes
          long startTime = System.currentTimeMillis();
          long currentTime = 0;
          char ch = ' ';
          while (true) {
            currentTime = System.currentTimeMillis();
            if ( (currentTime - startTime) > TIME_OUT) {
              return sb.append(TIME_OUT_STRING);
            if (ch == lastChar) {
              if (sb.toString().endsWith(pattern)) {
                System.out.println("");
                System.out.println(
                return sb;
            if (in.available() > 0) {
              ch = (char) in.read();
              sb.append(ch);
              System.out.print(ch);
              startTime = System.currentTimeMillis();
            else {
              Thread.sleep(1);
        catch (Exception e) {
          Debug.getInstance().printUsingDebug(e);
          logger.log(Level.SEVERE, "Problem in Reading from stream", e);
        return null;
      private int writeln(String value) {
        try {
          out.write(value.getBytes());
          out.write(13);
        catch (IOException ex) {
          Debug.getInstance().printUsingDebug(ex);
        return ConnectorError.SUCCESS;
    }Please note that this program works fine with the same type of switch on several other machines.

    currentTime = System.currentTimeMillis();
    if ( (currentTime - startTime) > TIME_OUT) Delete that and use Socket.setSoTimeout, and catch SocketTimeoutException below.
    if (in.available() > 0) {Delete this test.
    else {
    Thread.sleep(1);
    }Delete this 'else' block. Just let the read() block until data arrives or the timeout occurs.
    catch (Exception e) {Here you must distinguish between SocketTimeoutException and IOException. There's not much point in catching anything else.
    out.write(value.getBytes());
    out.write(13);
      out.write(value+"\r\n".getBytes();
      out.flush();

  • Message reader problems after Microsoft Apps insta...

    My previous thread was delete due to forum rules infringment.
    I describe here again my problem, hoping to have a solution and considering that the problem I faced was not my fault, but it happened after a Nokia official update downloaded via Ovi Suite.
    On 15th of April I've installed the Microsoft Apps and after my C6-01 reboot I found that the application "message reader" does not work anymore (tapping on the blue icon in the homescreen had no effect).
    The only way to use the message reader was going in the incoming SMS folder, select a message anoose "LISTEN" from the menu. In this way the reader works.
    Some days ago someone in this forum suggested me to remove the configured mailbox and try; in this way the reader came back to life and worked again, but if I add a mailbox the problem come back and the reader is malfunctioning again. So the only way to have this application working is removing any mailbox from my C6-01.
    Therefore, considering that this problem occurred after an official update from Nokia and not for an user's error, I would like that Nokia tell me how to solve this malfunction.
    Thanks for your attention and forgive my poor english.

    After the first time I installed Micro$oft App$ I did a deep reset pressing the four keys as described in a web site I've found. After this procedure my C6-01 rebooted without many applications, so I have connected it to Ovi Suite and restored the firmware. The result was a "brand new" and perfect phone, until the new installation of M$ Apps on 11th of April :-(
    So we are three Nokia users with the same problem... and we will faithfully wait for a fix ;-)

Maybe you are looking for

  • Description of the ETL solution Oracle

    Hi, I would like to have answers for questions below : *2. Description of the ETL solution Oracle* => Software name: (i thinks it's Oracle Data Integrator) =>Version: =>Platforms: =>Products to be installed before the solution: =>Hints that may creat

  • Exchange rate differences between GR and IR

    Hi Gurus, i have a problem about a exchange rate differences beetween GR and IR. Customizing setting is done based on this logic (transaction OMRW, ERD setting = blank). For example: Goods Receipt amount is $100 and the posting is made with exchange

  • TS1541 Finder's misbehaving.

    Hello y'all.  I am unable to get into Finder.  I get an error message which says:  The application "Finder" unexpectedly quit while trying to restore its windows. Do you want to try to restore its windows again?"  The message box gives me the option

  • CS5 Extended. Dragging on Mag. Glass - Zooms Humongously

    Can't find the old posting. I reset my pref's in Photoshop CS5 Extended and now when I drag the magnifying glass... it zooms humongously instead of just what I wanted magnified. I clicked off what I thought would turn that off but it still is doing t

  • I need to know if it is possible to...

    I bought a new computer... and i am NOT creating a home network between the two... It is possible for me to have internet on both computers at the same time to accomplish the following objective, but the internet on my orignal computer will not be pe