Use of "Open FPGA VI Reference" function --- Build Specification vs VI vs Bitfile

When using the "Open FPGA VI Reference" function in a LV2012 cRIO application, there are 3 options: Build Specification, VI, or Bitfile. What would be the reasons for selecting one over the others? Does it affect the resulting startup.rtexe when the cRIO application is built? I searched through the help and in these forums, but I don't see criteria for selecting one over the others; maybe I missed it.

Hello Chris,
Apologies in advance for a long reply.  
The reference method won't change the functionality of your rtexe.exe.  They all end up dropping a bitstream, based on a bitfile, onto the cRIO's FPGA.
To a degree, the method used to reference the FPGA code is a matter of taste, but there are situations where one method is better suited than the others.
Reference by VI:
Setting the configuration options to open reference by VI is helpful during development when you are making changes to an FPGA VI often and building/testing using the same spec.  When this option is used, a bitfile is selected based on the default build specification for the project.  A project may have only one default build specification.  You can make any build the default by checking the option under the Source Files category in the build properties.  The default build is indicated in the project explorer by the green box around the builds icon.  
Reference by Bitfile:
This option references a bitfile directly.  Through the configuration window, you can select one specific bitfile to open a reference to (this is not dynamic and does not change unless you physically go make a change to that path).  If you're using this method, it helps to give your bitfiles more meaningful names than the ones that are automatically generated by LabVIEW.  When you run subsequent compilations off of the same build specification and do not change the bitfile nname or path in the build configuration, the old bitfile is overwritten and replaced with the new one.  When you are using this option, it is critical that you keep up with which bitfile is the one you want to be using.  There is an option now that will help alleviate any problems referencing by bitfile through the Open FPGA VI Reference function.  There is a new VI called Open Dynamic Bitfile Reference.  It is typically used when you want to chose a specific bitfile to load depending on something in your host code (a configuration option etc) - but it allows you to dynamically reference a bitfile on the block diagram by path.
Referency by Build Specification:
This option is good for when you want to always use a bitfile that is associated with/compiled with the same build configuration.  Say you have two options for top level FPGA VIs in your project (each with its own build spec).  Both of these VIs have the same interface (read/write controls, DMA) but they run different algorithms or something.  This is nice because you can easily switch your host application between them by picking the build spec associated with the FPGA VI you want to use.  In this type of sutation, referencing by VI is no good because you can only have on default build spec.
cheers.
Matthew H.
Applications Engineer
National Instruments

Similar Messages

  • Using Open FPGA VI Reference in a distributed VI

    Hi all.
    I have some problems with the Open FPGA VI reference. In my project I have a VI which uses the Open FPGA VI Reference. In the Configure Dialog I’m using a lvbitx file located under “C:\Program Files (x86)\National Instruments\NI VST\Custom Bitfiles”. This works as it should while running the VI on my development machine but after building an installer including all this, the path to the lvbitx file gets wrong. When I build the installer I’m using VIPB but the same problem occurs if building an installer using NI Build Spec. When I try to use the distributed VI on a “customer machine”, it automatically starts searching for the lvbitx file but the path to the file is incorrectly set to ..\..\..\..\..\Program Files (x86)\National Instruments\NI VST\Custom Bitfiles, and this forces the user to manually find the bit file. I don’t like that, the distributed VI should have the correct path to the bit file so that the user can use the VI directly.
    I have found out that the path to the bit file in the distributed VI is relative to a temporarily build path used by the package builder. So, I have tried using several different temporarily build paths, but I have never been able to find a relative path that is correct. Even if my distributed VI seems to have the correct relative path to the bitfile it cant find the bitfile… Any suggestions for how to use the Open FPGA VI reference successfully on a distributed VI?
    Regards
        /Gunnar

    Hi Gunnar,
    What version of LabVIEW do you use? Something new in LabVIEW 2013 is the "Open Dynamic Bitfile Reference". With this, you could use e.g. an "Application Directory" node and build the path at runtime:
    http://zone.ni.com/reference/en-XX/help/371599J-01/lvfpgahost/open_dyn_bitfile_reference/

  • Open new class or function builder window per program

    Hello,
    in my program I've got a string variable <b>a</b> that either holds the name of a class or of a function module. Besides there is a variable <b>b</b> that tells me whether <b>a</b> is the name of a class or a function module.
    Now I would like to open a new sapgui window that either shows the class named by <b>a</b> in the class builder or the function module namend by <b>a</b> in the function builder depending on the value of <b>b</b>.
    I experimented with sap's cl_wb_startup and cl_wb_request but calling the start method of cl_wb_startup gives an error stating that I've got no permission to access transaction wb_new_window.
    Question is now if there is another way to open the desired sapgui window or if my experiments went into the right direction but I need to get the required transaction permission.
    Thanks in advance and best ergards,
    Patrick Baer

    Definitely not the best way, but a solution none the less.
    report zrich_0003 .
    data:   bdcdata like bdcdata    occurs 0 with header line.
    data:   messtab like bdcmsgcoll occurs 0 with header line.
    parameters: p_fmname(50) type c,
                p_clname(50) type c.
    start-of-selection.
      perform call_transaction.
    *      Form  CALL_TRANSACTION.
    form call_transaction..
      data: session_name(30) type c.
      data: tcode type sy-tcode.
      clear bdcdata. refresh bdcdata.
      clear messtab. refresh messtab.
      clear: session_name.
      concatenate sy-uname sy-datum sy-uzeit into session_name.
      if p_fmname <> space.
        tcode = 'SE37'.
        perform bdc_dynpro      using 'SAPMS38L' '1009'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'RS38L-NAME'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=SHOW'.
        perform bdc_field       using 'RS38L-NAME'
                                p_fmname.
      elseif p_clname <> space.
        tcode = 'SE24'.
        perform bdc_dynpro      using 'SAPLSEOD' '1000'.
        perform bdc_field       using 'BDC_CURSOR'
                                      'SEOCLASS-CLSNAME'.
        perform bdc_field       using 'BDC_OKCODE'
                                      '=CIDI'.
        perform bdc_field       using 'SEOCLASS-CLSNAME'
                                p_clname.
      endif.
    * Call the transaction in another session
      call function 'ABAP4_CALL_TRANSACTION'
          starting new task session_name
              destination 'NONE'
                   exporting
                     tcode                         = tcode
                     mode_val                      = 'E'
                     update_val                    = 'S'
                   tables
                     using_tab                     = bdcdata
                     mess_tab                      = messtab
                   exceptions
                     call_transaction_denied       = 1
                     tcode_invalid                 = 2
                     others                        = 3.
    endform.
    *        Start new screen                                              *
    form bdc_dynpro using program dynpro.
      clear bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      append bdcdata.
    endform.
    *        Insert field                                                  *
    form bdc_field using fnam fval.
      clear bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      append bdcdata.
    endform.
    Regards,
    Rich Heilman

  • How to use Compare and Swap (CAS) atomic function(Solaris specific) in C

    Hi,
    I have found cas32() atomic function in (solaris 10) </usr/include/sys/atomic.h> (and also there is another atomic.h header file in </usr/include/atomic.h> but this header file does not have any cas32() function declarations) the declaration of cas32 in <sys/atomic.h>
    is as follows
    extern uint32_t cas32(uint32_t *target, uint32_t cmp, uint32_t newval);
    extern ulong_t caslong(ulong_t *target, ulong_t cmp, ulong_t newval);
    extern uint64_t cas64(uint64_t *target, uint64_t cmp, uint64_t newval);
    extern void casptr(void target, void cmp, void newval);
    extern uint8_t cas8(uint8_t *target, uint8_t cmp, uint8_t newval);
    But the problem is when iam using these functions in c programs and compiling
    using gcc it is showing the following error.
    Undefined first referenced
    symbol in file
    cas32 /var/tmp//ccQcsnev.o
    And if i use the function other than cas32 group of instruction
    such as atomic_or_uint()
    whose declaration is extern void atomic_or_uint(uint_t *target, uint_t bits);
    in <sys/atomic.h> it is giving no error where as for CAS32 it showing as undefined symbol.Why it is giving like that we are not able to know.Is it the case that CAS32 instruction only available in Kernel mode and not available to user mode.Please inform us if anyone knows how to use cas32() instruction in the user C programs.As this is usefull for writing Nonblocking versions of stacks and Queues.Is there any way to write
    our own atomic functions?
    Rama

    You are trying to use the old kernel-only CAS functions, use the correct ones like:
    atomic_cas_32.
    DS

  • Bind FPGA host reference to type definition in labVIEW 2012 crashes labVIEW

    Hi,
    I am using FPGA target device 5641R and labview FPGA 2012 with 5640R ver 1.7.
    On the configure window of open FPGA VI reference function, choosing the dynmaic mode shows broken arrow when wired to the 5640R configuration VIs (i.e. Configure timebase, Configure ADC default, Configure ADC NCO functions). So i tried the other option which is binding the FPGA host reference to type definition and choose the control from path C:\Program Files\National Instruments\LabVIEW 2012\instr.lib\ni5640R\Configuration\NI-5640R VIs\ni5640R FPGA VI Reference.ctl. But after that when i try to save the VI on which open FPGA VI reference function is placed, labVIEW crashes. I am unable to figure out the reason. Earlier I was working with labVIEW 2011 and it was working fine there. Any suggestions would be highly appretiated. 
    Please see the attached images for more details.
    Thanks
    Attachments:
    1.png ‏33 KB
    2.png ‏71 KB
    3.png ‏40 KB

    Check out this thread.  It looks like someone else ran into a similar issue and made changes that fixed their application.
    http://forums.ni.com/t5/IF-RIO/correct-5640r-template-use-recommendation/td-p/1331918
    Jeff B.
    Applications Engineer
    National Instruments

  • No VIs listed for VI option in "Configure Open FPGA Reference"

    I have a cRIO and I was using the Open FPGA Reference function to load a bitfile by specifying the VI name.  This was working fine.
    I have been compiling all day, and I just deleted a control and then changed a DMA FIFO datatype.  When loaded and ran calls to the FIFO returned an error.  So I tried refreshing the VI specification, but now when the dialog comes up, there are no VIs listed.
    No idea what's wrong here.
    Solved!
    Go to Solution.

    1) I commented out the FIFO when I compiled (forgot to switch it back on); so that's why the error occurred.  Whoops.
    2) I still don't know why I could not browse for the VI, but I was able to drag and drop.

  • Open FPGA reference - slow?

    I'm trying to do some data acquisition through a cRIO 9101 attached to DI, DO and AI modules. Right now, I have something like a Read AI VI in my cRIO application that opens the FPGA reference, reads the control (using the read control node), then closes the FPGA reference and returns the read value to the calling VI. My issue is that this seems mindbogglingly slow.
    I use this VI and the corresponding DI and DO VIs that are pretty mucht he same internally in a handful of places throughout my code and at least in one spot where I've timed it, it takes something like one full second to run this VI. The culprit seems to be the open FPGA reference VI.
    At this point, can anyone suggest what I'm doing wrong?
    Is this the right way to go about this, given that my access to the FPGA needs to be fairly scattered throughout my code?
    Should I perhaps just write the FPGA reference into a global variable and initialize it once at the start and use it everywhere from the global?
    An alternative that I've got going right now is to use the first call VI to only use the open FPGA reference once, then store the reference in a shift register.
    Both of these soultiuons create some issues with closing the FPGA reference. Can anyone comment if closing the FPGA reference is really all that necessary?
    Thanks,
    Chris

    My VI is fairly complex, I do single reads and writes in various locations throughout the code, but never repeatedly in rapid succession. To facilitate this, I had a subVI that just reads analog values from the FPGA and it is within this subVI that I had the sequence of Initialize FPGA ref. --> read --> close FPGA ref. This was the initial solution that was giving me trouble, each call to this sub VI would take a very long time.
    My solution right now is to initialize the FPGA reference once at the start of the application and store it in a global, then use that reference every time I do a read/write. This leads to not closing the reference until the application is done, which, in my application, really doesn't happen unless there's a system reboot, power failure, etc. So at the end of my application frequently, the reference will not get closed.
    I assume that opening the reference does not store any state information that would survive a reboot (i.e. storing something in flash), so not closing the reference shouldn't be an issue. If anyone has any information to the contrary, please let me know.
    Thanks,
    Chris

  • Error 1054 Open VI Object Reference

    Hi Ppl,
    I'm using LabVIEW 8.6 and I'm debugging a code that uses the  Open VI Object Reference node. The parent reference thats passed in is a refrence of a VI instance and the vi object class is the control type. Though the control is present in the VI, the node returns error 1054 and says object not found. 
    I'm wondering why this was. However when the parent is the VI reference itself instead of the instance VI this works. I'm not able to understand the problem.
    Thanks,
    Sathish

    Sorry, I made what you have told me:
    now i have this error:
     why? If you have implemented a correct Vi can you give me it please?
    Thanks!
    Attachments:
    ClearChart.vi ‏14 KB
    test.vi ‏12 KB

  • Programmatically create build specification

    Here's my problem. I have several dozen projects, each of which contain the same VIs (more or less) but are for different hardware configurations. In particular, they all contain 1) a PXI target that contains a unique EtherCAT configuration, 2) a unique startup VI that should run on the PXI, and 3) other peripherals that may have build specifications as well (e.g. FPGAs). Occasionally I need to make a change to the way our code builds, and that means I need to open every single project to make the change. Since the projects are very large, this takes a long time.
    My solution is to create a separate program whose job will be to open the selected project, create build specifications with the settings that are common across all the projects, allow the user to select unique aspects such as the startup VI for the PXI, and build any/all other build specifications necessary for the selected project.
    I found here a topic disucssing modifying build specifications programmatically, but since I want to create a build specification, I would need to know what every single tag is, how it is used, what its allowed values are, etc. Is there some documentation I can refer to for this? Or better yet an example VI that someone has already put together?

    The other thing to remember is that at the end of the day, the output of the build specification process is just a string that happens to be part of an XML file (the *.lvproj).
    You can always check your work by opening the project file with a text editor and verifying that it is correct. Just remember that because this is not documented or supported, it can change at any time. So if you are successful, anytime you update LV you will need to recheck this code to make sure it still works.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Build specification

    hi all
    I'm pretty new to Labview and are now using LV2009 and having some trouble with "build specification"
    aren't there suppose to have 5 specifications, including EXE, Installer, DLL, source distribution, and zip file ?
    why can i only find 2, namely Source Distribution and Web Service(RESTful) there?
    thx
    Solved!
    Go to Solution.

    Hi guys,
    I have a similar issue, although mine is a bit more complex. I see only two build specifications as well (Source Distribution and Web Service(RESTful)) despite the fact that I have LabVIEW Professional Development System installed. For some reason I installed the Application Builder as well separatelly as a trial version and now it has expired. What should I do? Should I reinstall LabVIEW? Any ideas?
    Thanks

  • Vi path in "open VI reference" function

    how do I specify a vi in a vi library when using the "open VI reference" function.
    thank you very much

    You can think of a library as a directory
    So the path would be C:\MyFolder\MyLibrary.llb\MYVI.vi
    If you are using either a path constant or control you can set the browse options so that the file dialog will allow you do browse into libraries and select the VI. Right click on the control and select Browse Options. You can then select existing file (use LLBs).

  • Open VI Reference Function won't execute in multi process application

    I have a sub vi with Reentrant execution, and it has
    recursive call on some cases.
    It is very similar to OpenG VI “Read Key
    (Variant)__ogtk.vi”, my sub vi works without any problem unit LabVIEW’s Two
    Button Dialog is opened in other process loop.
    I have attached a Test VI, and would like to understand why
    would Loop 1’s Dialog box have any execution impact on Loop 2’s process?
    Why Open VI Reference Function won’t execute when Two Button
    Dialog is opened in other process?
    LabVIEW version 8.6
    Thanks,
    Attachments:
    Test Vi.zip ‏17 KB

    Broken Arrow wrote:
    LabVIEW's native dialog box is Modal. It will not let anything else run which requires (or MAY require) user input. In the case of your code, LabVIEW can't open a VI with a modal process going.
    Broken Arrow thanks for your reply, but not sure if I understand Modal dialog box would cause the problem.
      I already had a work around by using Three Button Dialog VI, and it is s Modal VI.
      I would still like to understand, why would DataFlow halt at Open VI Reference Function in Loop 2 when I use when Two Button Dialog?
    Attachments:
    Test Vi 2.zip ‏20 KB

  • The buttons in main the vi get locked after opening a vi reference in a subpanel and using buttons within the subpanel.

    I am trying to open a reference to a vi in the subpanel of the main vi. However after the vi opens in the subpanel and after pressing a few buttons in the subpanel the buttons in the main vi get locked, i.e. I can't even close the main vi or control anything else. Is there any way how I can avoid this happening?

    > The buttons in main the vi get locked after opening a vi reference in
    > a subpanel and using buttons within the subpanel.
    >
    > I am trying to open a reference to a vi in the subpanel of the main
    > vi. However after the vi opens in the subpanel and after pressing a
    > few buttons in the subpanel the buttons in the main vi get locked,
    > i.e. I can't even close the main vi or control anything else. Is there
    > any way how I can avoid this happening?
    This is most likely happening because in either the top or sub panel,
    there is an event structure that is queuing events, and is set to lock
    the panel until the events are handled, and because of the logic in the
    diagram, the events aren't being pulled from the queue.
    So, you have a deadlock. You are waiting
    on the panel. The panel is
    waiting on the diagram. And the diagram is waiting on something else.
    So, if there are indeed event structures involved, determine where in
    the diagram things are delaying. Also, if you do not need the panel to
    lock until the event is handled, you can change the setting in the
    events dialog on the structure. But the events will still be queued
    until the diagram starts executing.
    Greg McKaskle

  • Open a VI reference from an application

    Hello,
    I have a Main module.vi that is calling a Test module.vi by a reference. I use the open VI reference with a strictly typed VI and the Test module.vi is inside a llb.
    As VI the Main module is running without any problems. When I build an application of the Main module I get the error 1003 from the open VI reference.
    The path to the llb and the Test module.vi is correct.
    The idea of this function is that I don't must changing the Main module application in the future when it's running.
    The path to the llb is reading out of a config file by the Main module and it is calling the Test module inside the llb.
    When I have a new llb, I insert only the new name into the config file. The Main module reading out the new name, I can select it in the program and it will be calling by the Main module.
    I hope that anybody can help me with my problem or has an other solution for my idea.
    greetings
    Sascha

    Meanwhile I have found the problem.
    The problem was that inside the llb were not all neccessary VIs like VIs from the vi.lib.
    Now I build a source distribution with inclusion of all vi.lib, instr.lib and user.lib.
    Then I build again the llb and it's running wihtout any problems.
    greetings
    Sascha

  • Error 42 occurred at Open Applicatio​n Reference in DynamicDow​nload.vi

    Hi! 
    I want to create an executable from a VI wich calls a dll created by Simulink and Simulation Interface Toolkit.
     After I compile the simulink module with MSVC++ 6.0 in MATLAB,and then use this dll in LabVIEW, 
    the following message appears:
    Error 42 occurred at Open Application Reference in DynamicDownload.vi->SIT_InitEstablishTCPConnection​.vi->SIT Initialize.vi->Untitled.vi
    Returning to Select Host dialog.
    Possible reason(s):
    LabVIEW:  Generic error.
    What should I do to have an executable which works correctly?

    I have the same Problem here with the Error 42 on open application reference.
    Can someone pleas explain what this error means, and what the reasons are for this error?
    I have two exe files, and i am trying to open the application reference of the other exe when i get this error.
    First i thought it has something to do with the .ini file settings, which by the way is nowhere explained...
    here my entries:
    server.tcp.acl="290000000A000000010000001D00000003​000000010000002A10000000030000000000010000000000"
    server.tcp.enabled=TRUE
    server.tcp.port=3360
    server.tcp.serviceName=Image Monitoring
    server.tcp.access=+*,"+*","127.0.0.1","Localhost"
    server.vi.access=+*
    server.vi.callsEnabled=TRUE
    server.vi.propertiesEnabled=TRUE
    server.ole.enabled=TRUE
    server.tcp.paranoid=TRUE
    server.tcp.servic=My Computer/VI Server
    tcpServer.log=TRUE
    tcpServer.logPath=c:\TestStand\Tools\Image Monitoring PC\serverlog.txt
    server.app.propertiesEnabled=TRUE
    if i build a simple exe with call on open applicationr eference it works. but not with my main application,
    so this is why i need to know what causes the Generic Error???
    Is there a possibility that there have to be certain entries in the ini file of the calling exe? and what would those entries be?????????

Maybe you are looking for