Convert labview VI to C code

Hi,
I've to translate LabvIEW code to C code (CVI). Does any exist?
Thank you in advance.
Bim

bimbim wrote:
Thanks for your answer,
The purpose is to adapt drivers, tested via LabVIEW, into C in order
to load it in our device (real time). So we're close of the
hardware and we must have a "light" code.
Concerning the use of a dll or of an exe, don't we need to install
the LV runtime engine (heavy) and all associates runtimes to get it
running? If true, the installation and use of the program should take
more place and time than using a simple C executable?
I still have a few misunderstanding concerning the portability of LabVIEW code, even in exe or dll...
As
Dennis already has pointed out: The only sort of LabVIEW to C converter
is part of the LabVIEW embedded system. It's C code however is only
supporting a subset of LabVIEW (no IO libraries and some of the more
advanced internal nodes) and not really meant to be used as a C code
for further use outside of LabVIEW embedded. It's readibility as normal
C code is quite hairy eventhough it is syntactically C.
In fact it won't even compile on other systems easily as LabVIEW
embedded comes with quite some specific runtime support to connect to
the compiled code on the target system and do quite a lot of other
things too, which all get built into the executable as well and which
all will be used directly or indirectly by the created C code.
CVI has a runtime too, and I'm not sure what you mean with all its associated other runtimes.
LabVIEW code in source code is generally portable across all LabVIEW
platforms of the same version and also into newer versions. LabVIEW
executables are only portable inside the family of system they were
created for. This family is both a combination of OS and CPU. So
LabVIEW created for Windows will run on all supported Windows platforms
(the newest version only supports 2000/XP/2003 anymore) but not on
Linux, MacOSX or an RT system.
An executable for MacOSX will only run on MacOSX but I think on most of
their versions although there have been specific issues with certain OS
versions. If you happen to have an Intel Mac it would only run on a
dual boot system with XP on it too, or in the emulation environment
called Rosetta if they didn't rename that in the meantime.
Basically if the OS type changes or the CPU, you can't use an
executable anymore other than in certain emulation environments that
provide the old environment.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • LabVIEW features and converting to C or C++ codes

    I am new user to LabVIEW, but many my coworkers are refusing to use the LabVIEW on any new project.  The reason is very hard to do design review when the application is adding new features or fix the bugs.  Is there anyway we can convert LabVIEW code into LabWindows and/or C/C++ codes?  Why LabVIEW is more popular than LabWindow/CVI in the industries?  How are other companies doing design or code reviews?

    I think you confuse some things here:
    a) Design review:
    Design reviews should be part of the design phase in the development process. It is strongly suggested to perform this phase without use of programming languages (famous pen'n'paper phase!).
    "Design" could incorporate flow charts, data charts or object oriented design (OOD). All those are concepts independent of any programming language.
    You might refer to "code reviews" which are done during implementation phase and they have to check if the code matches
    - style guides (code layout, documentation, ...)
    - modularity
    - desired design
    They are done on code implemented in *any* programming language. LV is a programming language, just like C/C++. The basic rules for reviews is true for both. Reviews can be done with both.
    b) Conversion of programming languages:
    LV is a complete, self-contained programming language called "G". It is different to C/C++ in regard of syntax and semantic. Porting G-code to C-code is possible (using a module). BUT: Do you write C/C++ code just to convert it to .NET code later on? Most probable not. So why doing this to G-code???
    c) Complexity of adding/changing features:
    Again, this is a pen'n'paper task in the first instance. Starting of implementing changes works for small projects, but large projects suffers badly by this. Simply make it a rule: Implementing this is only small "routine work" within a project. Desinging modularization and algorithm is something which has to be done "offline" and independent of the used programming language.
    LabVIEW is popular in academic and even industries since it is very easy to implement certain design desicision (e.g. flow charts, since THIS essentially is LV code!). So the "routine work" of implementation is getting shorter/faster....
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Are there any 3rd party LabVIEW and/or TestStand code analysis tools

    I am looking for any 3rd party tools to analyze LabVIEW and/or TestStand code. Looking for tools that will check for memory leaks, timing, and any other code performance problems. I know LabVIEW has the profiler tool, but I am looking for 3rd party tools.

    Hi wbolton,
    I am personally not aware of any 3rd party tools that do the same thing as the Profiler, but I can say that if you'd like to analyze a .VI or .seq file, the most straightforward way to do so would be with the appropriate National Instruments software.
    Regards,
    Dan Richards
    Dan Richards
    Certified LabVIEW Developer

  • LabVIEW could not generate code for the shared variable.You must open the VI in the project that contains the library where the shared variable resides

    HI
    When I put a network shared variable with fifo RT activated on my diagram, the arrow is broken.and I' ve got this message:
    ""LabVIEW could not generate code for the shared variable.You must open the VI in the project that contains the library where the shared variable resides""
    If I uncheck FIFO RT option for this variable the arrow isn't broken anymore.
    I 've no idea how to correct this weird error?
    Autodeploy is on, and I've check copy / delete in diagram in tool/options\diagram
    regards,
    james

    Hello,
    I don't reproduce this error.
    Could you send your VI?
    Regards
    VéroniqueD
    NI France

  • Exception --- Value can not be converted to requested type.Error Code: 0

    Inside my query, I try to use function,like
    Expression formattedRegDateCol = regDateCol.getFunction("to_char", "YYYY/MM/DD");
    sometimes query works fine and sometimes got following exception, can anyone here help me out..
    Internal Exception: java.sql.SQLException: [BEA][Oracle JDBC Driver]Value can not be converted to requested type.Error Code: 0
    Call:SELECT COUNT(*), to_char(REG_DATE, 'YYYY/MM/DD') FROM SYSTEM_DETAIL WHERE ((REG_DATE BETWEEN {ts '2008-08-10 00:00:00.0'} AND {ts '2008-09-30 23:59:59.0'}) AND (GEOGRAPHIC_ID = 104)) GROUP BY to_char(REG_DATE, 'YYYY/MM/DD') ORDER BY to_char(REG_DATE, 'YYYY/MM/DD') ASC
    Query:ReportQuery(com.cad.registration.RegistrationDetailImpl)
         at com.cad.report.data.DocumentReturnedDataGenImpl.loadData(DocumentReturnedDataGenImpl.java:130)
         at com.cad.report.data.AbstractDataGen.getReport(AbstractDataGen.java:96)
         at com.cad.report.command.ProcessReportRequestOnMessage.run(ProcessReportRequestOnMessage.java:74)
         at com.cad.registration.command.AbstractCommand.execute(AbstractCommand.java:106)
         at com.cad.flow.core.Run.run(Unknown Source)
         at com.cad.flow.core.WorkflowComponent.run(Unknown Source)
         at com.cad.flow.ejbs.WorkflowManagerBean.execute(WorkflowManagerBean.java:238)
         at com.cad.flow.ejbs.WorkflowManagerBean.execute(WorkflowManagerBean.java:135)
         at com.cad.flow.ejbs.WorkflowManager_uh667k_EOImpl.execute(WorkflowManager_uh667k_EOImpl.java:132)
         at com.cad.flow.ejbs.WorkflowManager_uh667k_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:335)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
         at com.cad.flow.ejbs.WorkflowManager_uh667k_EOImpl_1001_WLStub.execute(Unknown Source)
         at com.cad.util.WorkflowProxy.runWorkflow(WorkflowProxy.java:128)
         at com.cad.kbd.messenger.listener.mdb.ReportRequestMDB.onMessage(ReportRequestMDB.java:84)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
         at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4072)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:3964)
         at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4490)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070620)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: [BEA][Oracle JDBC Driver]Value can not be converted to requested type.Error Code: 0
    Call:SELECT COUNT(*), to_char(REG_DATE, 'YYYY/MM/DD') FROM SYSTEM_DETAIL WHERE ((REG_DATE BETWEEN {ts '2008-08-10 00:00:00.0'} AND {ts '2008-09-30 23:59:59.0'}) AND (GEOGRAPHIC_ID = 104)) GROUP BY to_char(REG_DATE, 'YYYY/MM/DD') ORDER BY to_char(REG_DATE, 'YYYY/MM/DD') ASC
    Query:ReportQuery(com.cad.registration.RegistrationDetailImpl)
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:282)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:988)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.fetchRow(DatabaseAccessor.java:780)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:562)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:441)
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:457)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:103)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:174)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:481)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:825)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:791)
         at oracle.toplink.queryframework.ReportQuery.executeDatabaseQuery(ReportQuery.java:518)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:620)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:779)
         at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:451)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:2089)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:993)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:965)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:878)
         at com.cad.persistence.toplink.TopLinkPersistenceBrokerImpl.executeQuery(TopLinkPersistenceBrokerImpl.java:420)
         at com.cad.report.data.DocumentSys.getSummitedDocumentNumber(DocumentSys.java:332)
         at com.cad.report.data.DocumentSys.loadData(DocumentSys.java:110)
         ... 24 more
    Caused by: java.sql.SQLException: [BEA][Oracle JDBC Driver]Value can not be converted to requested type.
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
         at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
         at weblogic.jdbc.base.BaseData.getTimestamp(Unknown Source)
         at weblogic.jdbc.base.BaseResultSet.getTimestamp(Unknown Source)
         at weblogic.jdbc.wrapper.ResultSet_weblogic_jdbc_base_BaseResultSet.getTimestamp(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.getObjectThroughOptimizedDataConversion(DatabaseAccessor.java:1038)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:942)
         ... 45 more

    Here is my code
    ExpressionBuilder builder = new ExpressionBuilder();
    ReportQuery query = new ReportQuery(RegistrationDetailImpl.class, builder);
    query.addArgument("startTime");
    query.addArgument("endTime");
    query.addArgument("lro");
    Expression lroCol = builder.get("lro");
    Expression regDateCol = builder.get(
    QueryConstants.RegistrationDetailQueryConstants.REGISTRATION_NUMBER_COL).get(
    QueryConstants.RegistrationDetailQueryConstants.REGISTRATION_DATE_COL);
    Expression formattedRegDateCol = regDateCol.getFunction("to_char", "YYYY/MM/DD");
    Expression timeExp = regDateCol.between(builder.getParameter("startTime"), builder
    .getParameter("endTime"));
    Expression lroExp = lroCol.equal(builder.getParameter("lro"));
    query.setSelectionCriteria(timeExp.and(lroExp));
    query.addCount();
    query.addAttribute("regDate", formattedRegDateCol);
    query.addGrouping(formattedRegDateCol);
    query.addOrdering(formattedRegDateCol.ascending());
    descriptor.getDescriptorQueryManager().addQuery("testquery", query);

  • Convert SQL statements to JAVA Code ?

    Using SQL queries Can I convert SQL statements to JAVA Code ?
    Edited by: user11238895 on Jun 7, 2009 10:54 PM
    Edited by: user11238895 on Jun 7, 2009 11:12 PM

    Me very new to Oracle.
    can we convert SQL Queries to JAVA Code using simple built in SQL queries ?
    Which SWISS SQL Tool does [Converting SQL Queries to JAVA Code]

  • Is it possible to convert LabView data into OLE variant?

    Hi. I'm using Activex Data Objects (ADO) to communicate with MySQL. Some ActiveX methods give OLE variant output, with "Variant Type" like "VT_ARRAY|VT_UI1", "VT_UI1" or "VT_BSTR". With some deduction and trial and error is relatively simple to extract data from this OLE variants and convert them to LabView data types. The problem is when I try to input variant data to some ActiveX methods, it almost always give me errors, I suppose because it expects the same type of the outputs, this is: OLE variants. Now, the question is: ¿Is there any way to convert LabView data into OLE variant data? ¿How?
    I've been searching and found a lot of posts about problems when passing variant data into ActiveX, saying that sometimes SAFEARRAYs are needed, sometimes saying that there were some bugs in LV6, giving some workarounds to this bug and saying that it is fixed in LV7.1, but the supposed workarounds don't work and the bug is still present in LV7.1, if it is really a bug.
    I think that if I could put LV data into OLE variant shape I may find an answer and solution to this matter.
    Thank you
    Daniel R.
    UdeC - Chile

    Below I describe how to handle OLE Variants, but I wanted to mention that LabVIEW does have a Database Connectivity toolkit (http://sine.ni.com/nips/cds/view/p/lang/en/nid/6429) that has already created a set of VIs for ADO. You might check that out first.
    However, handling OLE Variants in LabVIEW is automatic. LabVIEW itself has a variant datatype. When you use the ActiveX property or invoke nodes and one of the parameters is an OLE Variant, it is automatically converted to a LV Variant. You can then use the LV Variant VIs (such as "Variant to Data" and "To Variant").
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • How to convert LabVIEW 2.2 for Mac to PC

    Need to convert labview software from MAC to PC.
    Moved files from mac to pc. No files with .vi extension. several resource.frk files in sub directories. Is there any instructions for conversion or is this not possible?

    I've heard of people doing this before. It's been a couple of years but the process involved going from LV 2 to 3 on the MAC. Then from 3 MAC to 3 LV. Then use the LabVIEW converion kit. You may be able to bypass the 2 to 3 on MAC step.
    From my understanding you can open LV 4 and onwards VIs with LV 6. Here's a Knowledgebase entry you might find useful:
    http://digital.ni.com/public.nsf/websearch/6f80a168949d5799862569310076f14b?OpenDocument
    Another KB entry discusses how to move files between the PC and MAC:
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/5b64515b3246bd8b862565210079a8dd?OpenDocument
    Best of luck,
    Kamran

  • Help! Can't open Labview program with MATLAB codes !!!

    They used to work! But today I just can't open any LabView program with MATLAB codes in. This also happened some time ago, but after a day I tried again, it went back to normal. Can anyone help me fix it? Many thanks !!!

    Hello BLpig,
    Thank you for your inquiry regarding problems opening a VI. It sounds like a VI containing MATLAB code will not open in LabVIEW. This problem can happen when using LabVIEW 7 on a Windows 2000 machine. Assuming this is your setup, the following link is a great resource when dealing with this issue.
    http://digital.ni.com/public.nsf/websearch/4475BC3CEB062C9586256D750058F14B?OpenDocument
    Other resources similar to this can be found on the ni.com website by clicking the support tab at the top of the home page. Then search for �open vi matlab� from Technical Resources at the top of the page or topics similar to this. I hope these resources help. Let me know if I can further assist you.
    Shea C.
    Applications Engineering

  • Please convert Labview 2011 file to Labview 7.0

    Please convert Labview 2011 file to Labview 7.0. Thanks alot!
    Attachments:
    FreqResponse.vi ‏104 KB

    attached
    You will need to replace the front-panel graph. Downconversion sometimes corrupts graphs.
    Attachments:
    FreqResponse.vi ‏299 KB

  • Convert message content to base64 code format.

    Hi,
    While sending the file to the target directory ,need to convert the content to base64 code format.How we  can achieve this.
    Regards,
    Hymavathi

    this is a duplicate thread :convert message content to base64 code format.
    Please close this one.

  • How to output data when converting labview vi into matlab mex functions

    Hi,
    I am a fairly new user to labview and am currently working on labview
    7.1. I have created a labview vi which can extract data from ni daq
    6070e in real time. The problem is that this code has to be converted
    so that it can be used with matlab.in order to do that i am using math
    interactive tool kit which converts the labview code into mex files
    which can then be used in matlab. Unfortunately i have not been able to
    figure out how to output this data so that it can be processed in
    matlab easily. i cannot afford any loss of information and all the
    output must happen in real time. the o/p must take place after the fft
    has been done. i am attaching the vi for convenience.There are 10
    broken wires ,and this is the place where i want the o/p to be
    generated.
    Also do let me know if this vi can be further improved.
    Regards
    Attachments:
    RT_loop2ver4_working.zip ‏642 KB

    Manuj,
    You seem to have misunderstood the way in which LabVIEW processes data.  The code that you have produced will run in exactly the same way without the need for the case structure.
    The code does not actually run the data from the previous case. It is merely processing data from the previous loop iteration, regardless of the case. If you were to remove the case structure, leaving only one copy of the code intact, and remove the toggle switch you have produced, or used the shift register which, I assure you would have worked, then you will have exactly the same functionality.
    I have attached an example that uses the shift register to toggle cases, but also iterates that the case structure is not needed by using the same feedback node (and code) without a toggle switch or case structure.
    Hope this helps you optimize your code
    Regards
    AdamB
    Applications Engineer
    National Instruments UK
    Applications Engineering Team Leader | National Instruments | UK & Ireland
    Attachments:
    CASE_NO-CASE_Example.vi ‏24 KB

  • Converting labview from unix into windows

    I need to convert some labview programs that were written in a UNIX environment to a PC windows operating system. I have converted the files over to my PC desktop. The problem is I am trying to run libraries that were compiled in unix and have the extension .so at the end. When I open the labview program it can not find these .so libraries and when I point to their location it states that this is not a valid windows image. Is there anything I can do to convert these .so libraries into something labview can read.
    Thanks  

    As far as I know, the equivalent of a shared object in windows is a DLL - DLLs are very common in windows and are also called through the Call Library Function node. You will presumably need to take your C code and compile as a DLL using a windows compiler. I'm not sure how many modifications you will need to make to the C code.
    Try to take over the world!

  • Need to convert labview files from version 4.0 to 8.6

    I have a few labview .iv files that I need to convert to version 8.6.  They were created in version 4.0.  Can I download an intermediate verison of labview to process the conversion?  Or can i order a cd?

    Typically, you would need access to several version of LabVIEW to do the conversion.
    Open the 4.0 VI in 5.1, save.
    Open the 5.1 VI in 7.1, save.
    Open the 7.1 VI in 8.6, save.
    This example uses the most popular versions - ones you are most likely to encounter. 6.i was also popular, and might work somewhere in there.
    Richard

  • How to convert Labview 9.0 vi files to 7.1 vi files?

    Hi, I have a set of LabView 9.0 .vi files that I need to convert to 7.1 .vi files, but the current LabView 9.0 version only allows me to save it to 8.0 version. Thus, my questions are:
    1) Can a user with LabView 7.1 open 8.0 files?
    2) If not, is there any other way to convert 9.0 files straight to 7.1 files?
    Many thanks!
    Solved!
    Go to Solution.

    It requires two steps.
    You need to open the VI's in LV 2009 and do a Save for Previous version back to LV 8.0
    Then open that in LV 8.0 and do a Save for Previous back to LV 7.1. 
    If you don't have LV 8.0, then you can post the files to the downconvert thread and request there that they be converted to LV 7.1

Maybe you are looking for

  • Itunes wont recognise ipod and ipod not playing!!

    My ipod is being recognised in windows but not in itunes. When i connect it a message pops up to say that problems have occured and to scan and fix them but when i do it says no problems were found yet it still doesn't pop up in the sources in itunes

  • Copy and paste problem with regions

    I've noticed that occasionally, when I copy and paste a region within the same track, I sometimes paste twice (directly on top of the other region). Or at least that's the end result. When I realize this, I go to delete the region and then there's a

  • Replaced HD, boot issue. please help

    Good morning... I recently (just now) replaced a failing HD in my 27" imac. I realize i dont have the temp probe etc. I made a disk image of my failing HD so i can reinstall it once i boot up my new hd. Problem is, i dont have the cd to boot to the u

  • Problem when filling Node and Item tables for the metho add_nodes_and_items

    Hi Experts, I am facing problem when filling  Node and Item internal tables for the method add_nodes_and_items. as i have written the below logic:   LOOP AT gt_partner INTO wa_partner.     CLEAR lvs_tc_root.     l_key = l_key + 1.     lvs_tc_root-nod

  • Dreamweaver 8 Off Topic Problem

    I am looking for some help with an ASP form page in Dreamweaver to create an invoice in QuickBooks Enterprise 2007 using an ODBC connection. I can already create a new custoemr and edit that customer. But I need to create and modify invoices to Quick