Modes of failure in TCP WRITE?

I need help to diagnose a problem where TCP communication breaks down between my host (Windows) and a PXI (LabVIEW RT 2010).

The key issues are:

1... are there cases where to WRITE TCP, a string of say 10 characters, write more than zero and less than 10 characters for the connection? If so, what are those circumstances?

2... is it risky to use a 1ms timeout value?  A reflection seems to say that I won't get a timeout in uSec 1000 if we use a database of time 1-ms, but I don't know if this is true in PXI.

Background:

On the PXI system, I use a loop of PID-100 Hz, controlling an engine.  I measure the speed and torque and control the speed and the throttle.  Along the way, I am in a position 200 channels of various things (analog, CAN, instruments of TCP) at 10 Hz and sending masses of info to the host (200 chans * 8 = 1600 bytes every 0.1 sec)

The host sends commands, responds the PXI.

The message protocol is a type of variable to fixed header, payload: a message is a fixed 3-byte header, consisting of a U8 OpCode and a USEFUL of U16 load SIZE field. I flattened a chain structure, measuring its size and add the header and send it as a TCP WRITE.  I get two TCP reads: one for the header, then I have the heading unflatten, read the SIZE of the payload and then another read for that many more bytes.

The payload can be zero byte: a READING of TCP with a byte count of zero is legal and will succeed without error.

A test begins by establishing a connection, configuration tips, and then sampling. The stream of 10 Hz is shown on the home screen for 2 Hz as digital indicators, or maybe some channels in a chart.

At some point the user starts RECORDING, and 10 Hz data go into a queue for later write to a file. It is while the motor is powered through a cycle prescribed target speed/torque points.

The registration lasts for 20 or in some cases for 40 minutes (24000 samples) and then recording stops, but sampling does not.  Data are still coming and mapped. The user can then do some special operations, associated with audits of calibration and leaks, and these results are stored.  Finally, they hit the DONE button and the mess is written to a file.

This has worked well for several years, but that the system is growing (more devices, more channels, more code), a problem arose: the two ends are sometimes get out of sync.

The test itself and all the stuff before configuration, works perfectly. The measure immediately after the test is good.  At some point after that, he goes to the South.  The log shows the PXI, sending the results for operations that were not opposed. These outcome data are garbage; 1.92648920e - 299 and these numbers, resulting from the interpretation of random stuff like a DBL.

Because I wrote the file, the connection is broken, the next test he reestablished and all is well again.

By hunting all of this, I triple-checked all my shipments are MEASURES of the size of the payload before send it.  Two possibilities have been raised:

1... There is a message with a payload of 64 k.  If my sender was presented with a string of length 65537, it would only convert a value U16 1 and the receiver would expect 1 byte. The receiver would then expect another heading, but these data come instead, and we are off the rails.

I don't think what is happening. Most messages are less payload of 20 bytes, the data block is 1600 or so, I see no indication of such a thing to happen.

2... the PXI is a failure, in certain circumstances, to send the entire message given to WRITE of TCP.  If she sends a header promising more than 20 bytes, but only delivered 10, then the receiver see the header and wait more than 20. 10 would come immediately, but whatever the message FOLLOWING, it's header would be interpreted as part of the payload of the first message, and we are off the rails.

Unfortunately, I'm not checking the back of writing TCP error, because she's never not in my test here (I know, twenty lashes for me).

It occurs to me as I was him giving a value of timeout 1-mSec, since I am in a loop of 100 Hz. Maybe I should have separated the TCP stuff in a separate thread.  In any case, maybe I do not get a full 1000 uSec, due to problems of resolution clock.

This means that TCP WRITE failed to get the data written before the time-out expires, but he wrote the part of it.

I suspect, but newspapers do not prove, that the point of failure is when they hit the DONE button.  The General CPU on PXI is 2 to 5%, at that time there are 12 to 15 DAQ field managers to be close, so the instant the CPU load is high.  If this happens to coincide with an outgoing message, well, perhaps that the problem popped up.  It doesn't happen every time.

So I repeat two questions:

1... are there cases where to WRITE TCP, a string of say 10 characters, write more than zero and less than 10 characters for the connection? If so, what are those circumstances?

2... is it risky to use a 1ms timeout value?  A reflection seems to say that I won't get a timeout in uSec 1000 if we use a database of time 1-ms, but I don't know if this is true in PXI.

Thank you

If a TCP write operation times out, it is possible that some data did in fact get placed in the buffer, and it will be read by the other side. This is why there is an output bytes written on TCP Write function, to determine what was actually put in the buffer.

To account for this, you can proceed as follows:

1. do an another TCP write and send only the subset of the first package that does not get completely passed. Use bytes written to Get String subset for the remaining data.

2. start with greater delays.

3. in the case of a timeout, the close link and force a reconnection so that the data of the partially filled buffer not get transformed by the other side.

Tags: NI Software

Similar Questions

  • 12.0 Firefox freezes / crashes except Mode without failure (new installation, even!)

    For some reason any, whenever I started Firefox (v 11.x) it would freeze on and off... gel for 3 to 5 seconds, then release for a few seconds, then freezes more and more.

    So, I uninstalled Firefox (including all profile information), downloaded new v12.0 Firefox and installed from scratch. When I started it, it does the SAME THING! Without supplements, the profile by default, etc.

    However, when I start safe mode, this is not it at all - it works fine.

    I also tried starting Firefox where you tell everyone everything reset, restart, and it still behaves wrong. It works without hesitation when in Mode without failure.

    What's up with that?

    You can try to disable hardware acceleration in options > advanced > general

  • Displays the site Internet differently in IE, Chrome, Safari, Firefox 3 and Mode without failure of Firefox 7.0.1

    Hello
    The www.littleones.ie site is displayed incorrectly in Firefox 7.0.1.
    DIVs are shifted to the bottom of the page instead of appear side by side. It's OK in Firefox 3 and Safari, Chrome, IE and in Mode without failure of FireFox.
    After some tests, I find that I can correct the problem by disabling hardware acceleration in the Options menu.
    Disable Plugins has not fixed the problem.
    Problem has also be seen on another PC using Firefox 7.0.1.

    Seems to be caused by a lack #leftcol {clear: both ;}}

    If I add this CSS rule then it displays very well.

    Without him, I get the screen that your screenshot with specific font sizes.

    The same phenomenon occurs in other versions of Firefox as Firefox 3.6.23 and the last Nightly build

  • Displays the error message when download itunes and other updates, not microsoft... says mode without failure or installer problem

    Error code is displayed. indicates the mode without failure or installation problem, contact shop etc. where purchased.

    Hi PeterLloyd,

    (1) what is the complete error message you receive?

    (2) what version of Windows you are using on the computer?

    (3) updates are you referring?

    Method 1: Try to install the program as an administrator do a right click on the program installation files and select run as administrator, click on continue if you are prompted to confirm.

    Method 2:  Select the boot and then check if the problem persists

    Follow step 1 in the link below,
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    Important: n ' forget not to put the computer to a normal startup follow step 7 in the link.

  • TCP write problem sending 'FF '.

    Hello people! I'm having a weird problem with TCP write on the sending of "FF" (hex). I'll explain a few tests that I've done and I hope you guys can help me somehow.

    My whole system is something like this:

    [PC 1]-[MUX/DMX No. 1]-[Transmission RF]-[MUX/DMX No. 2]-[series/Ethernet Converter]-[Switch]-[2 PC]

    My goal is to send a message to [2 PC] [PC 1]. [2 PC] I use TCP write and in [PC 1] I use Visa Read.

    When I send anything that does not contain "FF" [2 PC], [1] PC receives everything correctly. For example, if I send "12345678" [2 PC], [PC 1] will receive "12345678".

    However, when I send a simple "FF", the PC [1] stop [2 PC]. More precise, it is [2 PC], which continues to send data. If I send a "1234FF5678" of [2 PC], [1] PC receives only "1234". [2] PC ceases to send any type of data, then it sends only again if I restart the software. [PC 1] continues to receive data from [2 PC] after this restart. If I send "FF" once again, [2 PC] will stop once more to send data.

    I also tried the other way. [PC 1] Visa write and [2 PC] used TCP Read. It worked correctly same shipment 'FF '. I started thinking that the problem was in TCP write.

    Then I tried the following: [PC 1]-[Switch]-[2 PC]

    [PC 1] TCP Read and [2 PC] used TCP write. I used example of LabVIEW PTC Active and Passive, and it worked correctly to send "FF". I got more confused.

    Then I tried: [PC 1]-[series/Ethernet Converter]-[Switch]-[2 PC]

    The same problem as previously occurred. [2 PC] sent properly to [PC 1] all data that does not contain "FF". When I sent '1234FF5678', [PC 1] received "1234" and [2 PC] stopped to send data.

    Well well... now I'm running out of ideas for tests. I think the problem is with TCP write or with my series/ethernet converter. Have you guys any sugestion or solution?

    Thank you very much. Best regards

    Yahoou! Finally found the problem. The problem was inside the series/ethernet converter. He had an option "Use NVT (RFC2217)". I searched the internet and found that 'FF' for this kind of Protocol has a meaning, and probably it was affecting my message.

    I disabled it and then I was able to send "FF" (hex) without any problems!

    Thank you for your attention. Best regards

  • Only in the last days, Windows will ONLY open in Mode without failure. I don't know why?

    Only in the last days, Windows will ONLY open in Mode without failure. (I have made some changes myself)

    I tried everything I knew how to do, without success.

    It must be clarified...

    Which of the following statements apply to your problem:

    1 when you started the computer you tried to log in normal mode, it wouldn't, and you needed to go to safemode manually in order to identify you.
    If so, was there an error message?

    2. When you start the computer, it went automatically in safe mode.
    If so, try this...

    Login in safe mode > start button > in the search box, type msconfig > Enter > at the top, click on start > make sure that there is NO check mark in front of Safe Boot > make sure that there is NO check mark anywhere in this window > click OK when finished.

  • Ramdomly PC turns off and restarts. Won't do in Mode without failure.

    Hello. FO; lks!

    I saw similar posts, but nothing exactly like this one.

    My PC randonly shut dow and start times ranging from 1 minute to 20-30 minutes. The frequency seems to be getting shorter. The PC will apparently still be Mode without failure.

    I tried to remove recently installed software and do a system restore.

    When I originally started to have this problem, I am running Vista Ultimate. After trying my limited number of tricks, I took the device to the local computer repair company. At first, they thought it was a problem of overheating but memory, power and MoBo all checked. When I told them to let it run a few days in safe mode, they said it should be the software, so they upgraded me to to Windows 7. This does not solve the problem.

    By reading this forum, I saw the mention of the verification of the file running. I did and all I get now is BSOD.

    My system is: 2.67ghz i7 processor of Intell, ASUS MoBo, 6 GB of RAM and a 1 TB hard drive and a DVD burner.

    I copied some of the most recent event logs to Word.

    Any help appreciated.

    Hello

    Could be heat related - try using a small fan to blow into the air intakes to see if that helps.
    Clean the dustbunnies by ports. It works better in Mode safe mode because the system
    is not as pointed, especially the video. Therefore, the system is probably overheating or heat
    the sensors are too sensitive, or both.

    To be able to remove ALL and reinstall all the cables (both ends), card and memory - in fact remove and
    replace - do not just tight. (Of course these are for a PC and not a laptop).

    This sounds like material so if the above does not help you then probably need the help of a
    real computer store (not of leeks and glances at a Best Buy or other department stores) or the system
    Support from the manufacturer.

    ===========================================================

    Check this thread for more information on using BlueScreenView, MyEventViewer and other methods of
    Troubleshoot the BlueScreens - top 3 methods. Be sure to look to the top of each Bug_Check to FaultWire.

    http://social.answers.Microsoft.com/forums/en-us/vistarepair/thread/3deab2fa-4000-4136-8c78-a3d22b1db009

    ------------

    Check out these utilities to see if information may be collected:

    It is an excellent tool for displaying the blue screen error information

    -Free - BlueScreenView scans all your minidump files created during "blue screen of death," collisions
    and displays information about all accidents of a table.
    http://www.NirSoft.NET/utils/blue_screen_view.html

    -------------

    MyEventViewer can be verified at the time of the blue screen (BSOD) within a second or so of the
    time of the BSOD to provide more information about the possible cause - see TIP.

    MyEventViewer - free - a simple alternative in the standard Windows Event Viewer.
    TIP - Options - Advanced filter allows you to see a period of time instead of the whole of the record-
    Set it for a bit before and after the time of the BSOD.
    http://www.NirSoft.NET/utils/my_event_viewer.html

    ------------

    AppCrashView - free - a small utility for Windows Vista and Windows 7 that displays the details of all the
    application goes down has occurred in your system. The information breaks down is extracted from the .wer
    the files created by the Windows Error Reporting (WER) of the operating system component of each
    time that an accident has occurred. AppCrashView also allows you to easily record the list of accidents to
    text/html/csv/xml file.
    http://www.NirSoft.NET/utils/app_crash_view.html

    ------------------------------

    Also do this so you can see the probable bluescreens. (You may or may not be able to see
    them if they occur even after doing this according to the cause.)

    Windows Vista restarts automatically if your computer encounters an error that requires him to plant.
    http://www.winvistatips.com/disable-automatic-restart-T84.html

    =========================================

    What antivirus/antispyware/security products do you have on the machine? Be one you have NEVER
    on this machine, including those you have uninstalled (they leave leftovers behind which can cause
    strange problems).

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • How to activate the mode without failure in a game?

    U see sometimes games run faster in mode safe & probably, I like it but I don't know how to activate it in gaming applications only in games ok?

    How to activate the mode without failure in games?

    AI

    Most of the games do not work in safe mode, because safe mode loads only the system drivers and not the games so it is really moot to wonder if he would run faster.

    You can start in safe mode by pressing F8 during startup. You will see that the game does not load again.

  • Windows cannot complete the installation in Mode without failure. To continue installing Windows, restart the computer.

    HP Desktop, Windows 8.0.  Do a restore of Windows 8 on the hard drive.  Everything is progressing very well until I get this dialog box message: "Windows cannot complete the installation in Mode without failure.  To continue installing Windows, restart the computer. "When I restart the computer the same message appears in a new dialog box.  Before the restoration of Windows, I tried to reset mode without fail to start to get the operating system will once again but failed to get the operating system to boot at all.  Finally resorted to restore to get the computer working again.

    How to exit this loop?

    OK, here's what I discovered.

    When you get the error message mentioned above, you can hold down the SHIFT key and press the F10 key.  This will put you in the command prompt.

    At the command prompt, type: bcdedit [then press enter]

    so to solve my problem I hade type: bcdedit /deletevalue {current} safeboot [then press enter]

    This put the loop I lived and finished restoring Windows 8

  • TCP write buffer problem...

    It is a real newbie question, but it's here...

    I connect to a device using the TCP vi.

    Here's the problem... If I write "12345" (5 characters) everything is good. Then, if I write 'ABC' (3 characters) the unit receives a "ABC45' (5 characters). Its like writing

    buffer is not being reset. It still contains what has been written previously. The device I'm talking dislikes CRLF pairs, so this isn't an option.

    On a note related... I use the TCP vi for that. It's just a simple connection TCP\IP.

    Should I stick with the TCP VI or use instead of VISA vi?

    Several related, on a note... LV has a null (\0) character? I was told that that the device use the null char to determine the end of the command.

    Maybe that's my problem.

    I found the null char. String constant value display hexadecimal 0 x 00.

    I'll try that.

  • Presario stuck in Mode without failure.

    I have a Presario SR5262NX new in November 2007, stuck in safe mode: Intel Pentium Dual Core E2160, 1.80 GHz; Cache L2 1 MB; 2 GB OF RAM; 320 GB DD; Vista Home Premium (32 bit); updated for FSP 550W PSU and GeForce 9600GT video card.

    The PC is not usually online but I packed it and he brought with me on a trip to visit his family, where I have the opportunity to be online for a while and download Windows, drivers, and updates of games.  First thing I did when I'm online was to download and subscribe to Norton 360 Ver.3.  He ran a full scan and did his thing in the background very well for a few weeks.  I left the computer on and online during the night two or three times for big downloads.  Last night, I downloaded and installed an update of Realtek HD audio driver from the HP site.  As I did I noticed that the Norton logo at the top of the sidebar gadget was red and said Fix.  Thought I would look into that as soon as I completed the update of the driver.  As the update is complete, it restarted the PC.  When the start-up has passed BIOS, then the bar travel brands MS and entered the momentary blackout before MS ball logo and the password of the user window, he remained darkened without progressing further.  However, the number lock indicator lit up as he usually does automatically as a convenience to type the password.  That's all.  No response to Ctrl-Esc or Ctrl-Alt-Delete.  Can only stop by pressing the power button.

    Since then I could not initialize in everything except in safe mode.  I think I might have a virus, but Norton doesn't scan in safe mode.  I went to the last recovery point and good recovery nothing is done before that, also without any change in the startup problem.  In PC-Doctor (the hardware bootable diagnostic diskette), the PC passes all tests diagnostic equipment (except the failed on start).  There is no available startup repair.  The OS installation disc is in a hard disk partition.  I tried the command 'bootrec /fixboot' in the command line, but 'bootrec' is not recognized.

    I really want to fix this without doing a system recovery to factory settings.  I've done it before and it's a hassle.  And I'm not sure he would get rid of the virus, if it is the problem.  I'm middle-aged, and what I know about computers, it's just that I learned by bumbling along.  I hope that it is a simpler solution than to start.  Any help will be appreciated.  Thank you.

    Frank

    Yee Haa!  It works, it works!  Reinstall the RAM sticks did the trick.  Thank you, dmhoo29.  Not sure why it works well.  I guess remove the memory sticks empty the RAM, but isn't he purged whenever the PC is turned off?  In any case, thank you very much.  And thanks for the rest of you for your help.  This site is now in my favorites.  I downloaded the updates of virus definitions and Norton did a full scan as we speak.  Everything is cool.

    I you thank everyone once again for taking the time.

    Frank

  • How can Firefox on hp laptop still open with the mode without failure or reset option I open without option.desktop is no not this. Doug

    I set up firefox on the laptop first and he must always I choose to open in safe mode or the toolbar to reset, how do I change it without having to reinstall firefox. My office does not make what it opens with everything in place. I don't know what I did different when I downloaded it on the desktop.
    Doug

    Make sure that you don't have the SHIFT key when you click the shortcut on the desktop to launch Firefox.

    Also check the properties using the context menu which - safe-mode switch is not added to the target (command) line.

  • Some Web pages won't load does not (hanging) in Firefox 6 and 7. No improvement in Mode without failure or clearing cache/cookies. Pages work fine in Chrome and IE and Firefox 5.0.1 on this computer and also fine load in Firefox 7 on other computers.

    On my main computer, Firefox 6 and 7 will not load some Web pages (redsox.com, for example - pages just block indefinitely). Boot safe mode does not help. I keep downgraded to 5.0.1 and loads pages very well; they charge both in Chrome and IE. In addition, pages loading in Firefox 7 on other computers, it seems to have a problem with this configuration/installation...have deleted the cache and cookies without improvement. Any advice?

    I would create a new.

  • I deleted the shortcut to the mode without failure of firefox 4.0 edition in the start menu, how can I get that back? Thank you

    The OS is 6.1.7601 (SP1) Windows7 Ultimate.

    There is no shortcut 'Safe Mode' for Firefox 4 on Windows start > programs list.

    To start Firefox 4 in Mode safe on Windows, do one of the following:

    • Help > restart with disabled modules
    • HOLD the SHIFT key while double-clicking on the icon of the desktop Firefox

    See:

    You can create a desktop shortcut icon, if you wish, by adding -safe-mode to the end of the "Target" path in the shortcut properties.

  • "Sleep" mode enter failure on Qosmio X 300 - 14Y

    I have a problem with him switch mode 'sleep' when the laptop to set the time elapsed does not hibernate. The problem occurred after installing the VAP - 20100419162607.zip package, until everything works beautifully.

    I use a profile high performance and the standby mode is set only when you are running on battery. Computer laptop battery does, and then turns off. Is there a way to reverse changes to the Toshiba Power Saver of the VAP update?

    My machine is Qosmio X 300 - 14.

    Before starting to discuss this issue can offer you please some basic info?
    > The problem after installing the VAP - 20100419162607.zip package, until everything works beautifully.
    And what was before? Did you install own OS or you have upgraded from Vista to Win7?

    To be honest I don't exactly understand the problem described.
    What should happen when end?
    And what is exactly happening?
    Have you changed your advanced power settings?
    > I use a profile high performance and the standby mode is set only when you are running on battery.
    This sentence confuses me even more. All available parameters can be used on battery and mode of AC power.
    >... and the standby mode is set only when you are running on battery.
    For which option?

    Sorry for all these questions, but I just want to understand your problem.

Maybe you are looking for

  • 6s die after installing 9.3.3

    After installing 9.3.3 IOS I do the backup and the GET of the screen freezes! then try to restart the phone and turns on more!

  • How to check if someone else has signed in to my iCloud without knowing me?

    If someone knows my password are able to connect to my account and access my messages/photos/notes etc without knowing me? Also is there a way to check where and when my iCloud account is connected? Thank you

  • Satellite A300 - How can I reinstall my Vista without CD?

    in an earlier era, I wrote:http://forums.computers.Toshiba-Europe.com/forums//message.jspa?MessageID=148620#148620 HI :) I have a little problem. I forgot to burn a recovery on the CD disc.I know that there is a special partition on my hard drive wit

  • Flow 8 Bluetooth does not

    I just bought a HP 8 Stream model 5909. I love the Tablet so far, but I can't seem to get anything to connect via Bluetooth. Activate Bluetooth on and it doen't discover devices that I would use to know a keyboard and a mouse. The keyboard and mouse

  • Call dynamic sub question vi

    Using the vi in the attached photo, I try to call the sub vi several times, each time should open another instance. But I can only open an instance during the first use. The 2nd time will give the error as below. LabVIEW: The VI isn't in a State comp