Announcement

Collapse
No announcement yet.

Installing Labview shared variable engine on crio

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Installing Labview shared variable engine on crio

    I get an error message about the shared variable engine not installed on the crio when I build and try to deploy the program. It says it can't find the engine on MAX.... It is on MAX and I have the engine check box selected in the build configurations in the robot project. What is the procedure for installing the engine on the crio? This is the first time we have tried to use shared variables in our project.

  • #2
    Re: Installing Labview shared variable engine on crio

    What are you using the Shared Variables for? For communicating between VIs in the robot code, global variables are probably what you are looking for. For communicating across the network the SmartDashboard/Network Tables VIs should work.

    Using Shared Variables with the FRC image may work, but as far as I know has not been tested.
    FIRST®
    FRC Robotics Engineer

    Comment


    • #3
      Re: Installing Labview shared variable engine on crio

      kevin,

      I tried working with network tables for a couple weeks and got nowhere. There is so little documentation on the labview version I just gave up. We are using shared variables to pass data from a highly modified dashboard to the crio on the robot. I got shared variables working after I found out how to install the shared variable engine on the crio with MAX. Is it not sanctioned FIRST to use shared variables? My other fallback position was to use the basic TCP connections....

      I wanted to use network tables and I posted a question on the vendor's forum about network tables as requrested by an answer on this forum, but I got no answers to followup questions I aksed.

      Comment


      • #4
        Re: Installing Labview shared variable engine on crio

        Rich,

        I did some more digging on the LabVIEW Shared Variable Engine and the ports it uses will be blocked by the field network.

        I'm very sorry about not responding to your follow-up question about the SmartDashboard VIs! It appears that I did not receive an e-mail notification for the question, I will look into that to make sure it does not happen in the future.

        You are welcome to use a simple TCP connection on any of the ports indicated as available in the Game Manual.

        If you do wish to attempt SmartDashboard again, I have attached LabVIEW code snippets for the Dashboard and robot sides (the robot snippet is if you were using in Teleop, if you are placing it in Autonomous, where there is not an explicit loop, the code should be placed in a loop).

        You make an excellent point that there should be a better way to monitor connection status on the Network Tables Client VI. You can open up the Network Tables Client VI and put a probe on the error of the TCP Open and/or the initial Write (the "Hello") in order to see if the Client is successfully connecting to the robot.

        You can also open the Default LabVIEW dashboard and click on the Variables tab to see all of the Variables in the Network Table (you can have this open simultaneously to your customized dashboard).
        Attached Files
        FIRST®
        FRC Robotics Engineer

        Comment


        • #5
          Re: Installing Labview shared variable engine on crio

          Kevin, Thanks for your response. My next question was going to be what ports the network variables used.

          I think I may have an idea why our attempt at the network tables wasn't working. Your directions were to put the server on the robot side and the client on the dashboard side, but we write from the dashboard side. Or does this not make any difference? Also, the Network table has a "table-name/table-entry" format. SmartDashboard is the table name used in the dashboard, can we use a different table name?

          I did go into the client table vi and connect all the status wires and that's when I saw that I wasn't connecting to the server and that's when I gave up.

          Comment


          • #6
            Re: Installing Labview shared variable engine on crio

            In the Network Tables protocol spec, the server should always be the robot and anything else you want to send/receive data is the client. Both the client and server can read and write values to/from the tables.

            You should be able to use a different table name, but if the TCP Open or initial Write was failing you weren't even getting to the point of a table name. It sounds like you were either being blocked by a firewall, the server IP being passed to the Client VI was incorrect, or the Server VI is missing from the robot code framework (it should look as shown in the attachment)
            Attached Files
            FIRST®
            FRC Robotics Engineer

            Comment


            • #7
              Re: Installing Labview shared variable engine on crio

              Kevin, we created a new dashboard and new cRIO project and then added the SD writes and reads and everything worked fine.

              In looking back at our modified dashboard in comparison to the unmodified, I saw that we had deleted the SDBind vi that contained the original client. I had added a client without knowing about the deletion of the original and it was this client that we had problems with. In looking at your example above, the only difference I see is that I supplied a table name for the client in the dashboard and the same name for the server in the robot.

              So, if I understand your example above, all I have to do is supply the robot IP on the client vi and just the as-is server vi on the server side? Then the SD reads and writes only have to have the table entry names (and not a table name) as you show in your example?

              Comment


              • #8
                Re: Installing Labview shared variable engine on crio

                Correct, the IP should be all that is required on the Dashboard (client) side and the server can be left as is.

                The SmartDashboard VIs use the table "SmartDashboard" by default. As long as you are using the SD VIs and not the raw NetworkTables VIs on both ends all you need to specify on the reads and writes is the key, you do not need to specify the table.
                FIRST®
                FRC Robotics Engineer

                Comment

                Working...
                X