TCP/IP Connecting with Real Time Controller

I have a host running Labview on a windows XP and a realtime embedded controller on a pxi chassis that acts as the server.  When the realtime is started it automatically goes into listen mode and listens for a connection from the host.  The host opens a connection.  After a valid connection is open the Real-Time side goes into a TCP_Read and the host can then send commands that the real time processes and sends to the FPGA on the pxi-chassis. 
Now the problem I'm having is how to handle the case when a TCP connection is lost.  I can have the TCP_Read on the real-time error on a time out and then go into a listen mode but this isn't very logical because then the host will have to reconnect each time a time out occurs.  So if I make the TCP_Read timeout be infinite and if the connection is lost (let's say I unplug the ethernet cable and re-plug it back in) then I cannot recover from this and the Real-time will need to be re-booted.
I've tried to send the Real-time into listen mode if the error code is other than a timeout error (code 56) and have it go back to TCP_read mode if it is a timeout error.  But if the connection is lost by means of a physical way (such as me pulling the ethernet wire and plugging it back in) then the Real-Time never sees that the connection is invalid.  The host on the other hand can detect it bc it will get an error when it's trying to write?
So my is:
Is there any way to prevent an infinite loop that needs a reboot and at the same time prevent the host from reconnecting every time there is a timeout?

Hi SJeane,
I apologize for taking so long to respond, but I wanted to test this on my end.  In doing so, I realized that using the RT Reboot Controller.vi after the connection is lost does not work because the message to reboot cannot be relayed to the target without communication!  Thus, to solve this problem, we have to approach it a different way.  You mentioned that you tried programmatically clearing errors, but did you try to reestablish connection after clearing the errors?  I tested this on my end with a FieldPoint controller, and the attached VIs resumed operation even after unplugging/replugging the Ethernet cable (no reboot).  Will this solution work for you?
Peter K.
National Instruments
Attachments:
Reestablish.zip ‏39 KB

Similar Messages

  • Check if real-time controller is connected to a PC

    I have some applications that run on a PC that call (deploy and run) a VI on a PXI target from the .lvproj.  However, I share the PXI with others (who use the same method).  If they are using it or if they forget to disconnect my application tries to deploy and run the VI but crashes because the real-time controller is already being used by another PC.  I would like to create a VI that would check to see if the PXI is busy (somebody else is already connected to it) so that I can run this test before trying to deploy my applications and thus fail gracefully.
    I don't think any of the VIs on the Real-Time palette are what I'm looking for, so I tried opening an application reference and looking at what info I could get via property nodes.  It appears that there is some promise here, I might be able to make do with the "Remote Panel:Connections To Clients" or "NI Security:Nobody Logged In?", but neither of these can be accessed remotely.  I glanced at the invoke node, but nothing popped out at me, and I'm not really trying to invoke anything anyway so that seems like the wrong path.  I'm thinking that my only option is to create a standalone app that I can pre-deploy and that my PC applications will have to call that asynchronously via remote app ref?  I've never done that before, but I would imagine it is possible.  It just seems so complicated for such a simple operation...why isn't this built in to LV?  Am I missing something?
    I apologize if this is a duplicate thread; I tried searching for the topic but didn't feel like I found the right keywords.

    You are correct -- I do not understand what you want to do.  However, now that I have this out of the way, I'm going to "take a guess" and then say "I don't think you can do that".
    I'm dealing with a 1 PC/1 PXI system, where the PC and PXI share a private network (so there's never a "worry" about multiple PXIs).  However, I want to be able to "control" what code the PXI is running, as I have multiple PC codes that are paired with multiple PXI counterparts.  This turns out to be a somewhat difficult task (that I haven't fully figured out), one "piece" of which is that I haven't figured out how to "know" what the PXI is running at any given time.
    The solution that I'm drifting towards is to "force" the PXI to be in one of two known states (and to force the user to go and reboot the PXI if this proves to be false).  One state is running a Startup routine that "listens" for a command from the PC to load and transfer control to a particular "Real-Time Target" routine, which when it exits reboots the PXI (hence returning it to the Startup state).  The other "state" is executing the appropriate Real-Time Target routine.  Under this assumption, I never need to ask if the PXI is running, because I've programmed it to always be running. 
    I do use Network Streams to communicate with the PXI, so one thing my Host routine could (and probably will)) do is to attempt to connect to the Network Stream Engine running on the PXI.  If it times out, then it is safe to assume that the PXI is not in a proper state, so I can get the PC to reboot the PXI, forcing it into a known state.
    Hope this is helpful.  I'd be interested in your ideas and experiences.
    Bob Schor

  • Video Output for PXI Embedded Real-Time Controller ?

    I plan to purchase a PXI Embedded Real-Time Controller for security monitoring.
    Is it possible to use the video output of a PXI Controller running RTOS to display messages from a LabVIEW RT application ? According to the documentation, it seems that the use of the video output is only possible for PXI Controllers running Windows XP.
    Does it exist a specific application to do this with LabVIEW RT ?
    Thanx.
    H.L.
    Solved!
    Go to Solution.

    Hi Yann,
    The situation seems a bit confusing as in the link you've given above using the local monitor from a pxi labview rt system as the HMI without a pc attached, two messages (here and here) say that it is possible to display an image on the video output of a PXI RT controller using a function of the NI-IMAQ librarey (namely, the IMAQ RT Video Out VI) !
    I have the NI-IMAQ library but no PXI controller to test if this solution should work or not
    Does anyone have the answer ?
    Thanx,
    H.L.

  • FieldPoint real-time controller or Ethernet interface

    Good Afternoon,
    The first feature listed on the FP-2000 product page is:
    Stand-alone embedded real-time controller or Ethernet interface for PC-based distributed I/O.
    Has anybody successfully implented a FP-2000 as an Ethernet interface for PC-based distributed I/O?  In other words, have the FP-2000 act like a FP-1600?
    There are some discussion forum threads that dance around the subject but I have not found one that really answers it.
    Thanks,
    Ed
    Solved!
    Go to Solution.

    Hi edlad,
    After playing around with a FP-2010 for a while, I do believe that you need to install LabVIEW Real-Time on the controller in order for it to work, even if you are technically not using it because you are not running a VI/executable on the controller. As far as your issue with installing LabVIEW 8.5.1 on a FP-2000, that is troubling because there should not be an issue doing this at all. In fact, I have personally been able to install LabVIEW 8.5.1 on many FP-2000s. For that issue, I would suggest reformatting the FP-2000 from MAX and try again.
    ThinkG: Regarding your question about using a cFP-2220 to communicate with Lookout, I am not sure because Lookout support is handled by our Shanghai branch via email only. However, I do know that you can use that second ethernet port to communicate with another FieldPoint network module (cFP-180x) using the FieldPoint drivers. Here are a couple good KnowledgeBase articles regarding that configuration. I hope they are helpful.
    http://digital.ni.com/public.nsf/allkb/F602F6F1B243282686257495007695BB?OpenDocument
    http://digital.ni.com/public.nsf/allkb/67F94BB93BCE32CF86257367006B3659?OpenDocument
    Thank you for choosing National Instruments.
    Aaron Pena
    National Instruments
    Applications Engineer
    http://www.ni.com/support 

  • Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Here are a few Links to a helpful Knowledge Base article and a White Paper that should help you out: http://digital.ni.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF and http://www.ni.com/white-paper/10435/en/ . The methods for File IO in Real Time are the same for all of the Real Time Targets. The White Paper has best practices for the File IO and goes over how to do it. 
    Alex D
    Applications Engineer
    National Instruments

  • HT4623 I have an IPhone4 and is updated with version 6.1.3 and I am not able to connect with face time calls. I have checked the date ant time. I used to be able to use face time with no problem. since the late os upgrace I have not been able to connect w

    I have an IPhone4 and is updated with version 6.1.3 and I am not able to connect with face time calls. I have checked the date ant time. I used to be able to use face time with no problem. Since the late os upgrace I have not been able to connect with face time.

    Read http://support.apple.com/kb/ts3367

  • RMAN in active data guard with real time apply ON without a catalog DB

    I would like to know whether I can take RMAN backups (both level 0 & incremental) in active data guard with real time apply ON without a catalog database. version is 11.2.0.3.2. Will it make difference in the control file of standby syncing with primary? Can I use these backups on primary to restore and recover the database(including control file backup)?

    Thank you very much msberg. Could you please answer the below queries as well?
    Should I cancel Real Time Apply before starting RMAN?
    Will it make difference in the control file of standby syncing with primary? Is it possible to use these backups on primary to restore and recover the database(including control file backup)? If possible, how will I do that?

  • RAC with real time knowledge

    Hi, I'm interested in learning RAC and dataguard with real time knowledge......... please help me finding some training institution or peoples with real time knowledge
    Thanks

    The term "+real-time+" has a very specific meaning in Information Technology. See http://en.wikipedia.org/wiki/Real-time_computing for the basic details.
    Oracle RAC is not a real-time database.. and nor does the "real-time knowledge" make much sense IMO...
    Always difficult to get to grips with the nuances of the English language where it is your 2nd or even 3rd language. But it is important that we speak the same language and understand the same terms and concepts, in Information Technology.

  • B2MML with real time data

    Hi All
             I want some B2mml files with real time data.
    So exact( maintenance infromation and Production) B2MML that is coming from MIS.
    So if anyone have some information regarding this please tell me.
    Thanks in Advance
    Ramshanker

    Hi, Ramshanker.
    In the cases where the plant system is directly delivering B2MML documents (such as with certain products from Wonderware, Siemens, and some others), using the data in xMII is quite straightforward.
    1) If the B2MML message is not "standard" B2MML (be aware that very few plant vendors use the baseline standard - most have a number of specific extensions), you can add the vendors' schemas or B2MML example documents to xMII by adding them to a ReferenceDocument folder on the server.
    2) In xMII BLS, create a transaction (let's assume you called it B2MMLHandler) with one input parameter, of type "XML" (let's assume you called it "B2MMLDocument").  Add a "ReferenceSchema" or "ReferenceDocument" action, and configure it to load the vendor's B2MML format.  Use the "assign reference document" menu option to assign this format to the transaction input.
    3) You can now use the B2MML document to perform analytics or to map from the B2MML document into any RFC or BAPI calls or ESA service calls from within BLS.
    4) The plant system system should "post" the XML data to an xMII transaction using the "Runner" URL as in:
    http://<yourserver>/Lighthammer/Runner?Transaction=B2MMLHandler&InputParameter=B2MMLDocument
    Of course, if the MES system isn't capable of posting the documents and they are available on the file system, you can use the xMII file actions (or remote file access via FTP) to access and load the B2MML documents, perhaps at a scheduled interval.
    Hope this helps get you started in the right direction.
    Best regards,
    Rick Bullotta

  • [Solved] QJackCtl won't start in with real time.

    Hey all,
    I'm having a problem with QJackCtl, I got my version from Extra. The problem is that for some reason Jack won't start in real time mode using QJackCtl. Real Time is checked and marked under the set-up tab, but that little piece of info doesn't seem to make it to jackd. If I start Jack through CLI it works with real time, but not from the GUI.
    I figured this out by starting JACK from the command line and then starting QJack. When I would do that it would be running in real time just without the rest of my settings (buffer,periods,sampling rate, etc).  So in my head there's an issue with QJackCtl. I've tried to find a solution, but I can't seem to find one. This isn't the first time I've set JACK up on a system, but this is the first time I've had this problem.
    The rest of the system is set up and ready to go. Rt Kernel, limits.conf and all other tuning is done.
    Is there something I missed when setting this piece of software up? Any ideas?
    Solved Edit:
    Okay, so right after I posted this I got a crazy idea. When you enter setup in qjackctl on the first page there's a box for server path. The path defaults to "jackd". On that line I added "--realtime", so it looked like a basic CLI start-up of JACK and now it works!
    So, if anyone else has this problem go to the Setup tab, in the setup window on the line that says Server Path it should look like this:
    jackd --realtime
    It worked for me and I hope it helps somebody else out.
    Last edited by Zen:Core (2010-04-03 21:41:52)

    Which volume? Assuming you're on the most common usecase (single hw audio device) then whatever command line you use (amixer for example) it'll work fine, it'll control the volume of the device rather than the pulseaudio plugin (so other playing apps get affected as well, which is probably what you want). The 'global' volume so to speak.
    For multiple hw audio devices it gets tricky though.

  • I have a PXI-8109 with Real Time installed. That displays USER1 indicator?

    HI all,
    I have a PXI-8109 with Real Time installed.
    That displays USER1 indicator LED on the panel?
                                                      Thanks
    Solved!
    Go to Solution.

    Thank you.
    The NI PXI-8109 front panel has 4 LEDs.
    (Figure 3-1. NI PXI-8109 Front Panel Layout and Dimensions)
    - PWR OK/FAULT LED
    - DRIVE LED
    - USER1 LED
    - USER2 LED
    The NI PXI-8109 User Manual describes only 2 LEDS:
     - PWR OK/FAULT LED
    - DRIVE LED
    What do USER LEDs on the NI PXI-8109 front panel mean?

  • Trying to connect with face time between my iPod touch and my macbook but it always say user is unavailable  even after i accept?

    trying to connect with face time between my ipod touch and my macbook. It rings i accept but it then says unavailable?

    - Common problem with Yahoo.
    - Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?
    - Some users have had to change their Yahoo password.

  • Uploading files to SAP using HTML5 /AJAX/Gateway media links with real-time progress bar

    Hi All,
    Check out the blog post 'Uploading files to SAP using HTML5 /AJAX/Gateway media links with real-time progress bar'
    Uploading files to SAP using HTML5 /AJAX/Gateway media links with real-time progress bar
    Regards
    Prabaharan

    aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    Which correspondents fine with the
    device "hw:0,3"
    in my mpd.conf alsa section.
    Also sound worked fine withh this config before I started installing ffmpeg-svn and alikes
    hokasch:
    I tried changing the mixer to "Master" but that did not change much.

  • CRIO and ni 9234 modules not working or communicating through fpga with accelerometers, fpga connected to real time application which is also connected to shared variables linked to modbus slave

    Hi,
    I have a compact rio which has a 4 way chassis attached to that chassis is three ni9234 modules they are linked using fpga to a real time application then using shared variables in the low speed loop that are linked to a modbus slave to communicate with dcs, the ni 9234's have accelerometers connected to them with iepe ac coupled option on the c modules, my problem is the real time application seems to be running okay even when power loss occurs it restarts with no problem and the fpga writes to the portable hard drive bin files fine but without a accelerometer connected I get low noise readings as soon as I connect a accelerometer to any one of the 10 outputs it just goes to a fixed number (0.03125) as soon as disconnect it again it reverts back to reading noise, I have run a scan on the modules and only get a spike when I connect or disconnect the accelerometer, I have tested the voltage at the pins of the module and I get 22 volts dc which makes it more likely that the hardware is not the problem but a software is maybe causing this to hang-up, I attach project and files for your perusal. I also carried out a new project which in scan mode directly linked the module input to shared variable and the same scenerio again. Help would be much appretiated. 
    Many thanks
    Jason
    Solved!
    Go to Solution.
    Attachments:
    logger 2plusmodbus2.zip ‏679 KB

    Whren using waveform acquisition with the 9234s we recommend the following FPGA and RT template.
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/209114
    it can be extended as a data logger with:
    http://zone.ni.com/devzone/cda/epd/p/id/6388
    or using shared variables combined with scan engine
    http://zone.ni.com/devzone/cda/tut/p/id/9851
    The FPGA in all of these, as well as the RT framework have been used successfully by 1000s of users.  I would recommend giving these a try. 
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • Compatibility of Pattern I/O with a PXI-6533 card with real time application

    Hi,
    I use a PXI-6533 card on a chassis with a PXI-8145 RT controller. I want to acquire 32 bits of data with this card at 1,25 kHz. These data are generated by an external FPGA card together with a clock signal. Referring to the 6533 documentation, a simple way to synchronize the acquisition is to use pattern I/O, entering the clock signal on the REQ pin. I tried the LabVIEW example Cont Pattern Input.vi. It seems to go well, but it does not work when I change this .vi priority to Time-critical or any higher priority than normal. Is there an incompatibility between this type of acquisition and real-time ?

    Hi,
    Sorry for this late answer, I effectively added a �wait until next ms function� in the time-critical loop and it seems to work. In fact, I don�t see exactly how, but it works with 1ms up to 50 ms.
    Nevertheless, the next step is to add the content of this example in a more complex system with a communication loop to transfer the acquired data to the Host PC. I already have such an architecture, with a �time-critical priority� .VI to read the data at 1.25 kHz and a RTFIFO to transfer them to a second �normal priority� .VI loaded on the PXI, that ensures a TCP communication with the HOST PC. This architecture works correctly on another application with an internal clock, BUT doesn�t with this example, even with your solution.
    In
    fact, it seems to work when I put the two .VIs loaded on the PXI in �normal� priority, but with a tremendous jitter (the frequency varies from 1 to 2 kHz) and a scan backlog that gets full very fast. Then, the PXI crashes as soon as I change any priority.
    You�ll find attached these three .VIs and I hope this could help to find a solution.
    Cordially
    PS: Since we started this thread, I�m in relation with NI Support France on that subject. Nevertheless, we haven�t found any solution yet and any new idea is welcome !
    Attachments:
    HOST_Comm.vi ‏532 KB
    RT_Comm.vi ‏265 KB
    TCLoop.vi ‏256 KB

Maybe you are looking for