Skip to content Skip to navigation

Connexions

You are here: Home » Content » Including LabVIEW Content in Connexions Modules

Navigation

Content Actions

Including LabVIEW Content in Connexions Modules

Module by: Matthew Hutchinson

Summary: An explanation of how to include embedded LabVIEW content within Connexions modules.

There are a couple different ways to include LabVIEW content in a Connexions module. They are as follows:

  • Use a VI from another Connexions module.
  • Upload a VI from your hard drive.

This module describes the process for each of these methods.

Using a VI from Another Module

If you find a virtual instrument (VI) in Connexions that illustrates your point, the Creative Commons license allows you to use the VI in your own module. Steps for embedding the VI in your module are as follows:

  1. Choose a workgroup to hold the module containing the desired VI.
  2. From the workgroup window, click the Search for Published Content button.
  3. Type some terms which identify the desired module and click the Search button.
  4. Click the checkbox next to the desired module, choose the target workgroup from the dropdown, and click the Add button to add the desired module to your workgroup.
  5. Open the workgroup window containing the desired module.
  6. Click on the desired module to open it.
  7. Locate the CNXML element containing the VI, click in it, and record the values of the lvfppviname, width, and height parameters.
  8. Click on the Files tab to display files contained in the module.
  9. Click the checkbox next to the file containing the desired VI. It should be the file with a .llb extension.
  10. Click the Copy button to copy the file containing the VI.
  11. Navigate to the files tab of your own module.
  12. Click the Paste button to paste the VI into your own module.
  13. Add a paragraph to your own module (either in Edit In Place or Full Source Editing mode).
  14. Paste the code that follows in the paragraph and modify the attributes to reflect what you recorded earlier:
    
    <media type="application/x-labviewrpvi80" src="your_llb_filename.llb">
    <param name="lvfppviname" value="your_vi_filename.vi">
    <param name="width" value="your_vi_width">
    <param name="height" value="your_vi_height">
    </media>
    
  15. Save your module.

Uploading a VI from Your Hard Drive

If you can't find a VI in Connexions that illustrates your point, you can upload one from your hard drive. First you must configure the VI for viewing on the web and second you must include the VI within the CNXML of the module. Both of these are outlined below:

note:

You must have the full version of LabVIEW to configure a VI for viewing on the web.
  1. Open the VI in LabVIEW.
  2. Size the VI to the desired size by dragging the lower right corner.
  3. Select the File > VI Properties menu item.
  4. From the Category dropdown, select Execution.
  5. Check the Run VI when opened check box.
  6. From the Category dropdown, select Window Size.
  7. Click the Set to Current Window Size button. Make note of the width and height, as this will need to be specified in the Connexions module.
  8. Click the OK button.
  9. Save the VI by selecting the File > Save menu item.
  10. Create a new project by selecting the File > New Project menu item.
  11. LabVIEW should ask "There are currently VIs open... Do you want to add them to the new project?" Select the option that adds the open VI to the project.
  12. In the Project Explorer window, right click on Dependencies and choose Refresh from the list.
  13. Save the project and all enclosed files by selecting the File > Save All menu item.
  14. Right click on Build Specifications and choose New > Source Distribution.
  15. In the My Source Distribution Properties window, change the Build Specification Name to the name of your VI.
  16. In the Packaging Option section, select Custom.
  17. Uncheck the Exclude vi.llb check box.
  18. Uncheck the Exclude instr.llb check box.
  19. Uncheck the Exclude user.llb check box.
  20. Specify a Destination Path for your new .llb file.
  21. Check the Destination is llb check box.
  22. Confirm that the build is an LLB in the dialog that appears.
  23. Click the Build button.
  24. Save the project by selecting the File > Save All menu item.
  25. Open the LabVIEW LLB Manager by selecting the Tools > LLB Manager menu item.
  26. In the LLB Manager window, select the File > Open Folder menu item.
  27. Navigate to the folder where your LLB is located and click the Current Folder button.
  28. Double click your LLB in the list that appears.
  29. Locate your VI in the list that appears, right click on it, and select the Top Level option.
  30. Close the LLB Manager by selecting the File > Close menu item.
  31. Close LabVIEW by selecting the File > Exit menu item.
  32. Open the Connexions web site and navigate to the Files tab of your module.
  33. Add a new file to your module by choosing File from the dropdown and clicking the Add New Item button.
  34. Browse to your .llb file in the screen that appears and click the Save button.
  35. Open your module for editing in Connexions (either in Edit In Place or Full Source Editing mode).
  36. Add a paragraph to your module.
  37. Paste the code that follows in the paragraph and modify the attributes to reflect your VI:
    
    <media type="application/x-labviewrpvi80" src="your_llb_filename.llb">
    <param name="lvfppviname" value="your_vi_filename.vi">
    <param name="width" value="your_vi_width">
    <param name="height" value="your_vi_height">
    </media>
    
  38. Save your module.

Comments, questions, feedback, criticisms?

Send feedback