How to use a c file in LabVIEW

Hi All,
I have a c file which communicates through serial port and J1850 protocol. I want to use the C file in labview and do the communication through serial port.
Can any one give me an idea how I have to use the c file in LabVIEW.
Thank you.!
---------------- Be Good. Do Good. ---------------------

Have you tried reading the LabVIEW Help or even searching this web site? This question has been asked MANY times. There's a section in the LabVIEW Help called "Calling Code Written in Text-Based Programming Languages." There are also several articles written on this. Here's just one: https://decibel.ni.com/content/docs/DOC-1690
Please do the research and then come back with a more specific question.

Similar Messages

  • How to open a .MAT file in LABVIEW

    Hey everyone,
    I currently have a .MAT image file which I would like to open in LABVIEW to apply some image filters. However, I am unsure as to how to open the .MAT file in LABVIEW. Ideally I would like to be able to open the .MAT file without using matlab, and it seems the only way to accomplish this task is through the mathscript node. I have attached an example of the image im trying to open, as well as the LABVIEW program which I would like to use on the image. Thanks for the feedback! =]
    Attachments:
    MAT_Image_Adjust.zip ‏1779 KB

    Hi Boiler,
    1) Do you have a choice in the format you export your data from MATLAB?
    "ASCII Format
    Complete the following steps if you want to import or export data between LabVIEW and the MATLAB® environment, the process is straightforward as long as you are using ASCII format.
    From the MATLAB® environment to LabVIEW
    To save a vector or a matrix Xin ASCII format with tab delimiter, enter the following in the command window or m-script file in the MATLAB® environment:   
    >>SAVE filename X -ascii -double -tabs
        This creates a file whose name is filename, and it contains the data X in ASCII format with a tab delimiter.
    Import the file into LabVIEW using the Read From Spreadsheet File VI located on the Programming»File I/O palette.
    2) Have you tried using the mathscript node? Did you get any errors?
    "Binary Format
    Complete the following steps if you want to import or export data between LabVIEW and MATLAB®.
    From the MATLAB® environment to LabVIEW
    To read a .mat file in LabVIEW would require a VI to parse the file. This may be easier if each variable is saved to a separate file.
    " -- this was done here, no ideas if it still works,
    I want to read a Matlab MAT file into labview
    Hope this helps, James
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • How can I read pdf files from LabVIEW with different versions of Acrobat reader?

    How can I read pdf files from LabVIEW with different versions of Acrobat reader?
    I have made a LabVIEW program where I have possibility to read a PDF document.  When I made this LabVIEW program it was Acrobat Reader 5.0.5 that was installed on the PC. Lather when the Acrobat Reader was upgraded to version 6.0, there was an error when VI tries to launch the LabVIEW program. And Later again when we upgraded to Acrobat Reader 7.0.5 I must again do some changes and rebuild the EXE files again
    It isn't so very big job to do the changes in one single LabVIEW program, but we have built a lot of LabVIEW programs so this take time to due changes every time vi update Acrobat Reader. (We have build EXE files.)
    The job is to right click the ActiveX container and Click "Insert ActiveX Object", then I can brows the computer for the new version of acrobat Reader. After this I must rebuild all the "methods" in the Activex call to make the VI executable again.
    Is there a way to build LabVIEW program so I don't have to do this job every time we update Acrobat Reader?
    This LabVIEW program is written in LabVIEW 6.1, but I se the problem is the same in LabVIEW 8.2.
    Jan Inge Gustavsen
    Attachments:
    Show PDF-file - Adobe Reader 7-0-5 - LV61.vi ‏43 KB
    Read PDF file.jpg ‏201 KB
    Show PDF-file - Adobe Reader 5-0-5 - LV61.vi ‏42 KB

    hi there
    try the vi
    ..vi.lib\platform\browser.llb\Open Acrobat Document.vi
    it uses DDE or the command line to run an external application (e.g. Adobe Acrobat)
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • How to print a pdf file from Labview

    Hi,
    Does anyone know how to print a pdf file form Labview. I need to be able to point on the pdf file and to print it.
    Activex examples doesnt seem to be working it always displays an error, on every PC that I tryed to run it.
    {"code 3005" ,,,"Automation Open: Object specified is not creatable in Display PDF in Dialog.vi"}.
    Thank you for your help.
    Regards,
    Jenia.

    You can use the "System Exec.vi". The command line should have the following structure:
    "<Path to AcroRd32.exe>" /t "<Path to document>" "Printer name"
    For example"
    "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe" /t "C:\myreport.pdf" "Tektronix Phaser 300i"
    Regards;
    Enrique
    www.vartortech.com

  • How to open an external file in Labview?

    Hi, Who knows how to open an external file in LabView? I want to open an .UDL file(data link API) which is a dialog window letting me input correlated database information, but I dont know how to open this type of file in my LabView Program.
    Thanks.
    Red

    A UDL is technically a text file, so you could open it with "Read Characters from file", put the result string into a string control, edit it and save it back using the "Write Characters to File".
    UDLs however have their own configuration dialog embedded in the Windows OS. You can use this dialog in your LabVIEW application. The attached VI shows how to create a new UDL. You can edit an existing UDL by switching the method node to PromptEdit and wiring in an open ADO connection reference.
    Attachments:
    ConfigureDatabaseConnection.vi ‏26 KB

  • How to use multiple video files??

    hi all,
    i am using flex 4 ...
    now i have designed video player..
    i used single flv file for execution..
    how to use more flv files in tis program???
    i have included program also..
    can any one reply for this...
    thanks in advance...
    regards,
    saran r
    video.mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="init()" height="700" >
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.core.UIComponent;
                import flash.events.NetStatusEvent;
                import flash.media.Video;
                import flash.net.NetConnection;
                import flash.net.NetStream;
                private var nc:NetConnection;
                private var stream:NetStream;
                public var videoDuration:Number;
                public var nsClient:Object = new Object();
                private var videoComp:Video = new Video();
                private var meta:Object = new Object();
                private var timer:Timer = new Timer(100);
                private var uiComp:UIComponent = new UIComponent();
                private function init():void
                    nc = new NetConnection();
                    nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    nc.connect("rtmp://localhost/saran");                 
                    this.addElement(uiComp);
                    uiComp.addChild(videoComp);
                    timer.addEventListener(TimerEvent.TIMER,timerHandler);
                    timer.start();
                private function netStatusHandler(event:NetStatusEvent):void
                    trace("Code ===>>>    "+event.info.code);
                    if(event.info.code == "NetConnection.Connect.Success")
                        connectStream(nc);
                private function connectStream(nc:NetConnection):void {
                    stream = new NetStream(nc);
                    videoComp.attachNetStream(stream);
                    stream.play("Terminator")
                    // stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    stream.client = nsClient//new CustomClient();
                    nsClient.onMetaData = metadataHandler;
                    trace("stream ===>>>    "+stream.currentFPS);
                    //responder = new Responder(onResult);
                    // nc.call("getStreamLength", responder, "bikes" );
                private function metadataHandler(metadataObj:Object):void
                    meta = metadataObj;
                    videoComp.width = metadataObj.width;
                    videoComp.height = metadataObj.height;
                    //positionBar.move(videoComp.x, ((videoComp.y + videoComp.height)+20));
                    //positionBar.width = videoComp.width;
                    trace("Duration ====>>>>   "+meta.duration);
                private function timerHandler(event:TimerEvent):void
                    //trace("Timer called.........."+stream.time);
                    //positionBar.setProgress(stream.time, meta.duration);
            ]]>
        </fx:Script>
    </s:Application>

    I have the same question but I am using two pc's

  • How to use a key file in the FTP Task using and SSL connection

    In the past I have used this code to set the FTP pass word in an FTP component task in SSIS.
    Does anyone know how to use a Key file in an SSL connection to download a file from an FTP site?  If not can you tell me where I can get the C# code examples to learn how to create a script task or if there is another way in SSIS to download large files
    from an SSL FTP site?  Thank you for any help offered.
    public void Main()
    ConnectionManager FTPConn;
    FTPConn = Dts.Connections["FTPServer"];
    FTPConn.Properties["ServerPassword"].SetValue(FTPConn, Dts.Variables["FTPPassword"].Value);
    Dts.TaskResult = (int)ScriptResults.Success;
    Antonio

    You can use SFTP for this.
    This is a way of implementing SFTP in SSIS using standard tasks 
    http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html
    also see
    http://blog.goanywheremft.com/2011/10/20/sftp-ftps-secure-ftp-transfers/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to use my as3 file in flex

    hi, I am new in flex and want to divert into flex. How to  use my as3 file into flex. Is there any sample tutor . so, that I could learn fast.

    Please clarify. Is this .as file a class you previously used as a complonentcomponent you now wish to use as the main application?
    If the .as file just has variables and functions you wish to access from your Flex app, use:
    include "subfolder1/subfolder2/etc/MyASFile.as";
    If you want to use classes from the file, do this:
    import subfolder1.subfolder2.etc.MyClassName;
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services

  • How to use a C# dll in Labview?

    How can I use a C# dll in Labview 8.2? With the "Import Shared Library" Wizzard I need the header file which I don't have. Is there another way
    to use such .dll to import the functions created in C#?
    Thanks in advance
                                  Norick

    Norick,
    afaik there is no tool which provides you the possibility to create something like an instrument driver for .NET assemblies.
    Maybe we should take a look into terminology:
    - Instrument driver: This is a set of functionality, which provides the user with an easy to use API for a special instrument. Very often, the driver itself is written in C/C++ and provided as a DLL.
    - "Import Shared Library" Wizard: This wizard enables the user to create an own API for any C/C++ DLL (or compatible) for LabVIEW. This wizard requires the information on all exported functions; this info is contained in the header file. The result of the wizard is a set of VIs containing one Call Library Function Node each for each exported function.
    - .NET assembly (extension .exe OR .dll): This can be compared to ActiveX. So the way to program with .NET is similar to ActiveX. Maybe you want to take a look into the examples of LabVIEW regarding .NET...
    - Global Assembly Cache (GAC): All assemblies contained here are registered in the system. Every application can easily work with assemblies contained here.
    - Private assemblies: This would be the way to work with .NET assemblies which are built on your own. You have to select the .DLL-file itself and make sure that the file can always be found in the same (relative)folder of your application.
    hope this helps,
    NorbertMessage Edited by Norbert B on 02-21-2007 02:16 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to use XVID MEPG4 DECODER in labview

    May i ask how to use Xvid MEPG4 Decoder to compress the AVI file. For this decoder have been installed in my computer but the VI(IMAQ AVI2 Get Codec Names)can not list this code name. So may i ask how can i use this decoder in the labview. For this decoder is relatively has good quality and also small size. Or what kind of other solution can be provieded for the relative small size of AVI file.
    Thanks
    Daniel

    I believe this was answered already in a different thread:  http://forums.ni.com/t5/LabVIEW/LabView-to-grab-and-save-video-to-mpeg/m-p/643864
    www.movimed.com - Custom Imaging Solutions

  • How can you read datalog files in LabVIEW?

    I have a VI that records time and waveform data and writes them as a cluster to a datalog file. I have been unable to read these files in any way, however. I have been working with the datalog examples in LabVIEW, but I have not been able to figure out how to use the Read Datalog File example effectively. Does anyone have any suggestions on how I can either use this example to read waveforms, or how I can design a VI to read datalog files in another way? Thanks.

    Hi,
    when you read from a datalog file you have to wire to the datalog type input of the Open File function a cluster of the same type as the clusters when you created the file; each cluster is a record.
    In the example Write Datalog File Example.vi you see that each record consists of a cluster containing a string and 1D array of DBL; in the Read Datalog File Example.vi a cluster of exactly the same type is wired to the datalog type inputs.
    You can use this example to read your datalog files but you must wire to the datalog type input a cluster containing the time data and a waveform data; pratically you have to tell how the data are saved in your file.
    I hope I have been clear enough, eventually if you tell me how you save the time data (string, numeric) I
    can modify the example to read your datalog files.
    Good luck,
    Alberto

  • How to use a CSS file  in a jspx page..

    I'm using JDev 10.1.3.4.
    I would like to know how can i use a CSS file in a JSPX page..
    there is this file: public_html\WEB-INF\temp\adf\styles\cache\oracle-desktop-10_1_3_4_0-en-ie-6-windows-s.css
    How do I make use of this is my jspx page?
    Also how do i use the style class in property inspector?
    What should be the path of "oracle-desktop-10_1_3_4_0-en-ie-6-windows-s.css"?
    Also please tell me what changes I have to make in all the other files like web.xml or adf-faces-config.xml.
    Im using web application template using (EJB,Toplink and JSF)
    Please suggest the detailed steps as I'm new to JSF.
    Thanks ,
    Shri

    under view put a new tag
    <f:view>
    <ui:script url="page.js"/>
    and thats it

  • How to use an .xsl file to transform input XML to re-formatted output XML?

    Hello,
    I have a .xml file from a report that I want to use a stylesheet to transform into a different .xml format.
    I am reading that I can create a .xsl file to read my input and then transform it to a new output .xml file.
    How do I load this into the Apps?
    I tried creating a template definition and loading the .xsl in as type 'XSL-TEXT' and also, I added
    <?xml-stylesheet type="text/xsl" href="Transform.xsl"?> to my xml data source. The output looked the same as the input.
    Has anyone done this before? Any suggestions would be great!
    Thanks
    -CC

    This is how I use e4x with HTTPService:
    import mx.collections.XMLListCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable] private var claimsXLC:XMLListCollection;
    private function claimsHandler(evt:ResultEvent):void{
        claimsXLC = new XMLListCollection(evt.result..claim as XMLList);
    XML data is being returned, but I use XMLList to create the XMLListCollection.
    If this post answers your question or helps, please mark it as such.

  • How to use a excel file to create a service component?

    Dear all,
       I want to use a excel file to create a service to be my data source. I used the wizard to do that but i always got a message. "The data format is not valid, fields in each record must be delimited by tab charactors, and each record seperated by new line charactors". How should I reformat my excel file to fit the requirements? I have already chang the field`s format into 'text' type. Thx ^^

    Hi Louis,
    [Here|http://img125.imageshack.us/my.php?image=exceltestlo7.jpg] is the result of your data.  I downloaded your excel sheet and created a simulated service in 7.1.1 and it works fine.
    Below are the steps:
    1. Go to Tools -> service component wizard
    2. The popup opens : Step1 :  Enter the name of your service component
    3. Go to Excel spreadsheet Copy the data for which the service needs to be created.
    4. Step 2 : Paste the copied Excel data in the popup
    5. Step 3 : Define Input -> just click next
    6. Step 4: Define Conditions -> just click finish.
    Let me know if it helps.
    Good Luck,
    Dharmi

  • How to use Parameter from file in window env

    hi All,
    Please tell me the how I can get Parameter from Saved file and can use in other file.
    EX:
    I want to use Password file for each instance like
    ORCL-manager
    ORCL_1-tiger
    ORCL_2-*****
    how to call this file in other file. using pasword for instance
    any help would be appereciated.
    Regards,

    You can use SFTP for this.
    This is a way of implementing SFTP in SSIS using standard tasks 
    http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html
    also see
    http://blog.goanywheremft.com/2011/10/20/sftp-ftps-secure-ftp-transfers/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for