Why don't examples work?

I'm an old hand at LabVIEW (15 years), but a newbie to RT.
I just loaded the RT module (7.0) on top of my Windows 2000 LabVIEW 7.0
Just plugged in my 7041 board, and ran a few basic things, targeting the RT board. All is well.
Ran some timing tests on the RT, all is well.
But when I try to run the examples, nothing works - and the instructions are extremely lame.
I'm probably missing something, but the instructions cause more problems than they solve.
#1 ------
I target RT, load the example TOOLSETS : REAL TIME : COMMUNICATION : SPECTRUM ANALYZER - RT
The instructions say 1 -- Download VI to RT and 2 - Run the host counterpart in Windows.
I set the device# to 1 why is it defaulted to 2??? , and do the Download.
I target Windows, open TOOLSETS : REAL TIME : COMMUNICATION : SPECTRUM ANALYZER - HOST
The instructions say : 1- download the RT side (already done), 2 Enter the machine name what machine name? when connecting to processor card, the syntax is DAQ::
So I set the DAQ Device to 1 why is it defaulted to 2??? , enter "DAQ::1" in the MACHINE NAME field, and run.
--- Error: VI reference is invalid.
I try "DAQ::RT::0" in the MACHINE NAME field - it takes longer, but still says:
--- Error: VI reference is invalid.
Everything I try, I get the same error.
#2 ---
I target RT, load the example TOOLSETS : REAL TIME : COMMUNICATION : TCP - RT
The instructions say 1-Enter PORT and #Points 2- Run VI 3 - Choose EXIT WITHOUT CLOSING RT 4-Run Host version from WIndows.
I leave the port as is (2055), and run the VI. It downloads. I exit without closing.
I relaunch LabVIEW (which targets windows now), and open load the example TOOLSETS : REAL TIME : COMMUNICATION : TCP - Host why are there TWO of them with that name?
The instructions say: 1-- Have the RT side running. 2- Enter the port why is is not the same as the RT? and choose a function What the heck does THAT mean? There is no FUNCTION selector. 3-Enter the address of the device on the RT engine. when connecting to processor card, the syntax is DAQ::. 4 - Run the VI.
So I change the port to 2055, enter DAQ::RT::0, and run.
Error: Network address is ill-formed
If I try DAQ::1, I get:
Error: Connection closed by peer
Everything I try, I get the same errors.
#3 ---
I target RT (the previous TCP program is still running - I kill it), open the example TOOLSETS : REAL TIME : COMMUNICATION : DataSocket-RT
The instructions say: 1- To use live data, start the DataSocket Server on he Host. 2- Target RT and run the RT side 3-- Target host and enter the same URL same? Same as what? (dtsp://locahost/wave) apparently I was supposed to enter that into the RT side, as well for this example, and click the connect button. Unfortunately, there is no CONNECT button
Anybody have a clue what I am missing?
Why is it so hard to write instructions that have some bearing on the VIs?
Why are they pointing to CONNECT buttons that don't exist, FUNCTION selectors that don't exist?
Why do they have the default port as 2055 on the xmitter, but something else on the receiver?
Signed,
Grumpy
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks

Hi,
Let me try to help you with this.
#1
This example and some other communication examples assume that the PCI plug-in RT board is 7030 based, so the default DAQ device # is 2 in these VIs. DAQ device# for 7041 should be 1 as you chose. Also instead of "DAQ::1" you need to use "RT::0" for PCI-7041 board. These corrections should eliminate the "error:VI reference is invalid". If not please check the VI server configuration settings on the RT engine
To configure VI Server on the RT system, target the system with LabVIEW and select Tools�RT Target: Options.
Under VI Server: Configuration make sure that all enabled check boxes are checked and that the Port number is 3363.
Under VI Server: TCP/IP Address make sure that there is a checkmark next to your IP address or next to an asterisk (*).
Under VI Server: Exported VIs make sure that there is a checkmark next to an asterisk (*).
#2
As you realized, there are two TCP-Host Computer.vi and this was a known issue and fixed in LabVIEW 7.1
You need to close the one you are using and open the first one in the list. I have attached a screenshot of the front panel of the correct VI you need to be using, please refer to the attachment. As you will notice, the correct host VI has a function selector and the port number is selected as 2055. You still need to enter "RT::0" instead of DAQ::1 in the machine name/IP address.
#3
This example program needs to be modified to be able use with 7041. First of all, after you target to RT device and open the "Data socket RT engine.VI" select File>>VI properties>>Windows Appearance and select "Default" instead of "Custom" This will allow you change the Execution target from the menu after you run it. Also modify the dstp path as
dstp://localhost/wave
After you change the execution target to Windows and open the Datasocket host computer.VI you should be able to see the sine wave.
I hope this helps, let me know if you have any questions.
Best Regards,
Remzi A.
Applications Engineer
National Instruments.
Attachments:
TCP-Host_Computer.jpg ‏40 KB

Similar Messages

  • Raw - Canon 70D - PSE12 Why don't they work together??

    I just purchased a Canon 70D only to find out that PSE 10 does not support the raw files.  I read on here that I needed to update to PSE 12 and that it supports them.  Why then after I have now upgraded to PSE12 am I still not able to open my raw files?

    lol I just figured it out! Yay!! OMG I have stressing out over this.  Phheww You have now idea how relieved I am right now

  • Why don't tutorials work the way book says they will?

    When I copied the test action script to get the
    button to work in this tutorial, the text does not show up as
    advertised.
    function testFunc(eventObj:Object) {
    menu_mc.title_txt.text = "Testing the title";
    menu_mc.description_txt.text = "Testing the description";
    // add the event listener for the button
    next_btn.addEventListener("click", testFunc);
    I thought maybe it was because of the difference in what the
    tutorial told me to name the menu. It was named "menu" in the
    explanation on creating it, and now I see the the action script is
    looking for "menu_mc". This is one of many discrepancies in your
    "Exploring Studio 8" book, and this one could easily screw up
    action script. Is this a common problem with people trying to do
    these tutorials? Also, in many cases the UI just doesn't behave in
    the way that the tutorial describes. I'm starting to get pissed off
    with your product and the documentation.

    Hate to say this - as pissed off as you may be with this
    product and its documentation - this is an
    case of user issue - there's nothing wrong with the tutorial
    - it works just fine - out of curiosity
    i followed each step and 3 minutes later the button worked
    and the text displayed.
    Did you miss a step?
    Chris Georgenes
    Animator
    http://www.mudbubble.com
    http://www.keyframer.com
    Adobe Community Expert
    *\^^/*
    (OO)
    <---->
    sifupeter wrote:
    >
    When I copied the test action script to get the
    button to work in this
    > tutorial, the text does not show up as advertised.
    >
    > function testFunc(eventObj:Object) {
    > menu_mc.title_txt.text = "Testing the title";
    > menu_mc.description_txt.text = "Testing the
    description";
    > }
    >
    > // add the event listener for the button
    > next_btn.addEventListener("click", testFunc);
    >
    > I thought maybe it was because of the difference in what
    the tutorial told me
    > to name the menu. It was named "menu" in the explanation
    on creating it, and
    > now I see the the action script is looking for
    "menu_mc". This is one of many
    > discrepancies in your "Exploring Studio 8" book, and
    this one could easily
    > screw up action script. Is this a common problem with
    people trying to do these
    > tutorials? Also, in many cases the UI just doesn't
    behave in the way that the
    > tutorial describes. I'm starting to get pissed off with
    your product and the
    > documentation.
    >

  • I am so Frustrated with my apple charging devices! Why don't they work?

    I own Three apple products , i Ipad Mini, i Ipad 2d gen and aniphone 4s. If I can't "Charge them why have them!

    I have four Apple products: an iPod Touch, iMac, MacBook Pro, and iPad Mini - and I haven't had any problems at all.

  • Why don't hyperlinks work on my android tablet?

    Adobe reader is on my new Samsung tablet but while i can underline and make notes etc, the hyperlinks in the document are showing as normal text.

    Can you share such a file with us: https://forums.adobe.com/thread/1408375
    [topic moved to Android subforum]

  • Why don't links work in my emails with ios 6.1?

    Since I downloaded ios 6.1 for my iPad 2, I notice that, whenever I attempt to touch a link in an email, my screen freezes. I cannot scroll or even select another email to view. I am forced to double tap on the home button and "clear" my mail icon. What is going on?

    Have you tried restarting or resetting your iPad?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after the iPad shuts down, then press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds). Ignore the "Slide to power off"

  • What can be done to make these code examples work on web Browsers?

    I have tried numerous versions of ?Hello World? examples over the web to display the text on a web page. All the examples work on my local machine in the application viewer, but they don?t work when from a web browser. I have tried both Firefox and IE.
    Some of them include:
    [http://java.sun.com/docs/books/tutorial/uiswing/examples/start/HelloWorldSwingProject/src/start/HelloWorldSwing.java|http://java.sun.com/docs/books/tutorial/uiswing/examples/start/HelloWorldSwingProject/src/start/HelloWorldSwing.java]
    Firefox error:
    java.lang.reflect.InvocationTargetException
         at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.runOnEDT(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassCastException: start.HelloWorldSwing cannot be cast to java.applet.Applet
         at sun.plugin2.applet.Plugin2Manager$12.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Exception: java.lang.reflect.InvocationTargetException [http://en.wikipedia.org/wiki/Swing_%28Java%29|http://en.wikipedia.org/wiki/Swing_%28Java%29]
    Error when viewed on Firefox:
    java.lang.reflect.InvocationTargetException
         at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.runOnEDT(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassCastException: start.SwingExample cannot be cast to java.applet.Applet
         at sun.plugin2.applet.Plugin2Manager$12.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Exception: java.lang.reflect.InvocationTargetException An Ideal Code if someone could decipher why it fails from a browser is:
    import javax.swing.*;
    public class SwingHelloWorld extends JFrame {
        public SwingHelloWorld(String name) {
          super(name);
          this.setDefaultCloseOperation(EXIT_ON_CLOSE);
          JLabel label = new JLabel(name);
          // label.setPreferredSize(new Dimension(210, 80));
          this.getContentPane().add(label);
          this.pack();
          this.setVisible(true);
      public static void main(String argv[]) {
            SwingHelloWorld swingHelloWorld = new SwingHelloWorld("This would be great if it worked via a browser!");
    } Error from Firefox:
    java.lang.reflect.InvocationTargetException
         at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.runOnEDT(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.RuntimeException: java.lang.InstantiationException: start.SwingHelloWorld
         at sun.plugin2.applet.Plugin2Manager$12.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.InstantiationException: start.SwingHelloWorld
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         ... 9 more
    Exception: java.lang.reflect.InvocationTargetException The latter code is very short and would serve the intended purpose most ideal. It can accept input and allow me to replace the ?System.out.println? function that works so well to display when working with code in the development environment.
    Thanks in advance for any input on this.
    -- L. James
    L. D. James
    Edited by: apollothethird on Mar 8, 2010 5:05 AM

    paulcw wrote:
    As per your suggestion, I changed the &#147;extend&#148; to Applet and changed it to &#147;JApplet&#148;. Making that change will result in code that won?t even compile.Right. You're going to have to change your program to actually work as an applet.
    Either that or use Java Web Start, which is probably the best option.Thanks. The code I presented was my attempt to find examples that represented the advice I thought I was getting (to use JFrame and JLabels). I?m changing the direction of the examples I?m looking for now.
    >
    The current code as published by sun.com actually compiles and displays in the Netbeans programming environment. It looks great. But I?m kind of stuck with the missing link for making it output to the browser.Different things work in different ways. You wrote a standalone application which compiles and runs. Writing an applet is a different thing, and works in a different way. Read the applet tutorials for more information on applet methods and the applet lifecycle.Thanks. I?m reading. I try to execute some of the examples from my reading, but and stuck. So, I?m asking for some clarifications of some of the components I?m stuck with. Having some of my questions answered would help me to understand better the lots of reading and studying that I?m doing.
    I?m taking in all the advice that is given, and I appreciate it a lot.
    >
    Thanks for the hints. Thanks also in advance if you happen to know how to change the extend to Applet or JApplet instead of &#147;JFrame&#148; and it works.This is made clear in the applet tutorials. It's more than just changing the class to extend. Note that Applet/JApplet extends Panel/JPanel, so that changes the way your program is constructed. Basically, you don't have to create your own frame.Also, I don?t want a frame. I?m trying to find a way to make my question clear. I appreciate the time you?re taking to respond to a new user?s scope.
    >
    But again, web start is probably a better choice if you have a running app.
    You should probably abandon the idea that you just have to nudge a program slightly in a new direction to make a wholly new thing. Programming is all about reducing complex problems to a set of concrete solutions.Absolutely. I have some examples that will actually print a string to a browser. However, those examples will print what?s written in the immediate code, with no apparent method (that I can) make into a variable. The ?Hello World? example that I find that has a main class is the ones that are failing. The ones that don?t have a main class will print.
    I have been trying to find a way to pass a variable to this code that will print over the web:
    import javax.swing.JApplet;
    import javax.swing.SwingUtilities;
    import javax.swing.JLabel;
    public class HelloWorld extends JApplet {
        //Called when this applet is loaded into the browser.
        public void init() {
            //Execute a job on the event-dispatching thread; creating this applet's GUI.
            try {
                SwingUtilities.invokeAndWait(new Runnable() {
                    public void run() {
                        JLabel lbl = new JLabel("Hello World");
                        add(lbl);
            } catch (Exception e) {
                System.err.println("createGUI didn't complete successfully");
    }However when I try to add a functioning main class and change the ?Hello World? to a string variable, it fails. I understand it fails because I?m having a missing link about how to turn the class into something that can take input.
    I know I?ll be ridiculed for the example I?m about to print, but I?m printing it to give an example of having a variable for my output.
    Look at the code that fails (just to get an idea of what I?m trying to explain):
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package test1;
    * @author teama
    import javax.swing.JApplet;
    import javax.swing.SwingUtilities;
    import javax.swing.JLabel;
    public class HelloWorld extends JApplet {
        //Called when this applet is loaded into the browser.
        public void init() {
            //Execute a job on the event-dispatching thread; creating this applet's GUI.
            try {
                SwingUtilities.invokeAndWait(new Runnable() {
                    public void run(String myhello) {
                        JLabel lbl = new JLabel(myhello);
                        add(lbl);
            } catch (Exception e) {
                System.err.println("createGUI didn't complete successfully");
            public static void main(String[] args) {
                // This is the output of my calculation
                // HelloWorld.void("Hello World")
                run("My Hello")               
    } -- L. James
    L. D. James

  • Why don't Hold keyframes work on Audio Level?

    Hi -
    In the past (AE6.5) I recall using Hold frames to keep the Audio Level really low until the exact frame I wanted to bring it up to 0db.  Now in CS4 the Hold keyframes don't work that way.  I wind up using lots of extra keyframes and sliced up layers.  It's pretty messy.
    For example I have a narration where I have to replace one word in the center of a sentence.
    Is there a setting somewhere or, is there a new way to adjust audio levels quickly besides using key frames that someone could tell me about??
    Why don't Hold keyframes work on Audio levels anymore??
    Thanks,
    JL
    AE CS4, Intel Mac, OS10.5.8

    "adjusting your Quicktime settings to use less hardware acceleration and a different audio buffer duration"
    In AE Preferences I have "Audio Hardware" but no mention of QT.  It's currently set on "Built-in Output".
    Under "Output" I have an Audio Block Duration set at 01:00.
    In QT preferences there is nothing about hardware acceleration or buffer duration.
    Are any of these related to what you suggest?
    JL

  • I upgraded for Firefox 4 and now my simplePass identity protection (biometric scanner) on my laptop will not work. WHY? It still works with IE but I don't use IE.

    I upgraded for Firefox 4 and now my HP SimplePass Identity Protection (biometric scanner) on my laptop will not work. WHY? It still works with IE but I don't use IE. It worked with the previous Firefox version but now when I use the internet, it doesn't even acknowledge I have the scanner. When I run my finger over it, it opens the settings panel but does not allow use of the already saved information or allow new information to be entered. I need this corrected. Any suggestions?

    I asked this same question, and just received a response:
    "Thank you for contacting DigitalPersona. There will be no update releases
    for DigitalPersona Personal in the future. There will be no updates for
    Firefox 4 nor Internet Explorer 9. IF they work they work, if they do
    not work with DPPersonal, then you will have to decide to either keep
    DPPersonal and forgo Firefox 4 or IE 9, or vice versa. DigitalPersona
    is leaving the consumer market and is focusing on business applications.
    In fact, DigitalPersona Personal will not longer be supported after
    Mid-April of this year.
    We apologize for any inconvenience this might cause. Sincerely, Tech Team "
    In other words, there will be NO update.

  • Why don't work adobe reader XI on my laptop with windows 7 home premium? Thanks for advance.

    Why don't work adobe reader XI on my laptop with windows 7 home premium? Thanks for advance

    Hard to say. Please let us know exactly the problem, including messages in full.

  • TS3297 I want to buy the double coins from the game subway surfers! But they told me to contact the itunes support! I don't know why it's not working.. Please help! iPhone 4ss

    I want to buy the double coins from the game subway surfers! But they told me to contact the itunes support! I don't know why it's not working.. Please help! iPhone 4ss

    These are user-to-user forums, you are not talking to Apple here. You can contact iTunes support via this page and ask them why the message is appearing : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then probably Purchases, Billing & Redemption

  • I get this message on my Facebook news feed when someone posts a YouTube video. Don't know why. It's worked fine for years. I am using Safari on my iPad. If I use the Facebook app it works fine. Any thoughts. Thanks,    Access Denied   You don't have

    I get this message on my Facebook news feed when someone posts a YouTube video. Don't know why. It's worked fine for years. I am using Safari on my iPad. If I use the Facebook app it works fine. Any thoughts.
    Thanks,
    Walid
    Access Denied
    You don't have permission to access "http://fbexternal-a.akamaihd.net/embed/?" on this server.
    Reference #18.3555facd.1362007289.6945153f

    Same thing on mine, it just started happening last weekend.

  • HT204291 Why don't I see the airplay icon in my settings? I have the ios7 installed now my netflix won't work as need to turn off mirroring..... And the airplay device is not installed.... Anyone help on this?.

    Why don't I see the airplay icon in my settings? I have the ios7 installed now my netflix won't work as need to turn off mirroring..... And the airplay device is not installed.... Anyone help on this?.

    Reboot your router. The icon only shows when connected to wifi and Apple TV or similar device. Same thing happened with my phone and the icon appeared in control center after router reboot.

  • Why don't the FAQ's in this Sub-Forum Work?

    Why don't the FAQ's in this Sub-Forum Work?  Not in Firefox 22.0 or IE 8-latest.

    They do now.

  • I have seen on this community that the earpods do not work on iPod shuffle gen 3 but when I was using on them it worked the control panel thing that is but only until I turned it off I don't understand why it won't work again and why it did in the first p

    I have seen on this community that the earpods do not work on iPod shuffle gen 3 but when I was using on them it worked the control panel thing that is but only until I turned it off I don't understand why it won't work again and why it did in the first place can someone please explain and tell me how to make it work again

    Sorry first time asking question didn't mean to write same thing twice well copy paste

Maybe you are looking for

  • Instead-of Trigger Complication.

    Hi folks, Please look at the following table to have a clear picture, I have 2 schemas namely, A and B. I have 2 objects also X and Y. These are tables in schema A but these same tables (with same structures and data also ) are views in schema B. In

  • ABAP Objects - Instance of a method

    Goodmorning to you all, Can anyone explain the process in : IF cl_gui_alv_grid=>offline( ) IS INITIAL. The method OFFLINE has a returning parameter E_OFFLINE. Questions : - how does the system recognise this parameter. - can i check this variable in

  • Output determiation and crystal reports

    Hi all, I had a doubt regarding is it possible to integrate crystal reports with output determination. Regards, Nisha Divakaran

  • How to use Visual C++

    Hello, I am new to Visual C++ can someone help me learn C++ or direct me to a website that teaches C++ for beginners? 

  • Local Client settings

    Hi, I am facing an issue with Excel in which if I try to open an existing workbook, it closes any blank template (book 1) if open automatically. My colleagues use the same excel version but for them, opening an existing workbook does not close down t