I am trying to call a function with LABVIEW developed in CCS compiler

I used MPLAB (CCS compiler) to develop c code that is used to transmit and receive messages to and from an automotive display. It works great as a stand alone. I would like to call this function from LABVIEW but am having difficulty doing so. Does anyone have experience calling a MPLAB developed project from LABVIEW? Thanks in advance.
Matt

PTE wrote:
I used MPLAB (CCS compiler) to develop c code that is used to transmit and receive messages to and from an automotive display. It works great as a stand alone. I would like to call this function from LABVIEW but am having difficulty doing so. Does anyone have experience calling a MPLAB developed project from LABVIEW? Thanks in advance.
Matt
MPLab is for programming PICs if I'm not mistaken. I'm not sure how you would want to call a function compiled in MPLab from LabVIEW directly. MPLab will create binary code for execution on PICs and there is no LabVIEW that could run on a PIC. On the other hand I didn't think you could create standard Windows DLLs, Mac shared libraries or similar in MPLab at all.
You will have to recompile your code in a C compiler that can create the standard shared library format for the plaform you want to call it from LabVIEW.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • How to call a function with parameters in ScriptStart function

    i am trying to call ScriptStart function from SUD dialog. This is how iam calling Call ScriptStart(path & "test.vbs","abc") abc is function which is written test.vbs. It is working. But when i want to pass some parameters to the abc function of test.vbs. It is not working why. can anybody suggest where i went wrong. I am calling the same function as Call ScriptStart(path & "test.vbs","abc(" & text1.Text & ")"). It is not working why ? Is the ScriptStart function only point to functions. it does not take any parameters or waht ?

    Hi abc421,
    Another option in addition to UserCommands would be to use ScriptInclude(path). If you execute a ScriptInclude(path) command at the beginning of your VBScript, then all the functions and Subs in the VBscript located at "path" are now available to you-- including passing parameters and receiving return values from functions. If you are calling a VBscript that uses only VBScript variables, then this is the preferred method.
    If instead you are calling a VBScript that uses global DIAdem variables declared in a VAS file (their variable names all end with the "_" character), then those parameters are already available at the subroutine called with ScriptStart(path, routine).
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Call outside function with same name in a package

    I created a function as follows:
    create or replace function f1 return number
    is
    begin
    return 1;
    end;
    This f1 is to be called in a package created below.
    Then I create a package with a function in it, as follows:
    create or replace package pack1 as
    function f1 return number;
    end;
    Now I define the package body as follows:
    create or replace package body pack1 as
    function f1 return number as
    -- I am trying to call the first function f1 defined above here
    How do I resolve the name issues here?
    In other words, I want to call a function with the same signature outside a package.
    Thanks for your kind help.

    Hi,
    Welcome to the forum!
    Do you have a good reason for using the same name?
    Refer to the stand-alone function with the owner name, even though it's your current schema.
    That is, even if the package and the stand-alone function are owned by scott, in the package, say
    x := scott.f1;

  • Is it possible to call a function with the same name from 2 different dll's at the same time.

    I'm trying to call a function ( F ) form 2 different libraries ( A.dll and B.dll ) at the same time. The first lib loaded determines the function F. A->F and B->F have same interface and name but different implementation.

    Hi,
    I tried it with two dll's, both with the same interface, and at the same
    time, in the same VI. The popups even appear at the same time.
    But now I understand the problem... Both dll's are created by LabVIEW! If
    they are not (or one is not, and the other is), this is no problem.
    And VI's in memory cannot have the same name. LabVIEW doesn't care if VI's
    are in a dll or not.
    This might not help, but if you want to make some sort of "plug in" system,
    you might consider using llb's. By loading VI's dynamically, you can select
    the path from which they are loaded. You must unload (close all references)
    one before the loading the other, or the same problem will occur. If you go
    this way, I consider a different approach. Make on
    e library (or even a dll)
    that has the interface you like, this is the "loader". Now make several
    "plug in"'s, with the same interfaces. The name of each function in a plug
    in is a concatenation of the library name and the function name. The loader
    has one extra function, that loads (and unloads, when done) references to
    all desired libraries to use (the names of the functions can be figured out
    easily). All that the loader functions do is dynamically call the library
    functions. You can use a call by reference node for this (you can use the
    connector pane or the loader vi, since the interface must be the same!).
    If you go this way, I guess the loader library can be converted to a dll...
    Hope this helps.
    Wiebe.
    "rsam" wrote in message
    news:[email protected]..
    > Thx Wiebe,
    >
    > did you load both dll at the same time? For example in 1 vi. Somehow
    > the first loaded function keeps to overrule the second. Notice that
    > the interface is
    exactly the same.
    >
    > I loaded 2 dll created in Labview with results described above.
    >
    > Regards Ruud

  • How to call a function with pl/sql

    How does one call a function with pl/sql that uses a function?

    Hi,
    How does one call a function with pl/sql that uses a
    function?I'm not sure what you mean.
    In PL/SQL function can be used just about anywhere where an expression (with the same data type that the function returns). Arpit gave a very common example.
    Here's another example, where all the functions take a single NUMBER argument and return a NUMBER, so they can all be used in places where NUMBERs are used:
    IF  fun_a (fun_b (0)) < fun_c (1)
    THEN
        UPDATE  table_x
        SET     column_y = fun_d (2)
        WHERE   column_z = fun_e (ROUND ((fun_f (3), fun_g (4)));You call a function simply by using its name, followed by its argument list, if any.
    If the function is in a package, you must call it with the package name, like "pk_foo.bar (1, 2, 3)", unless the call comes from within the same package.
    If the function is owned by someone else, you must give the owner name, like "scott.bar (SYSDATE)" or "scott.pk_foo.bar (1, 2, 3)". You can create synonyms to avoid having to name the owner.

  • Is there a way to call a function with in the initializer of a ArrayCollection?

        Is there a way to call a function with in the initializer of a ArrayCollection?
    It won't let me do this:
    var ac:ArrayCollection = new ArrayCollection([
                        {childName:'addTrade',index:addTradeIndex },
                        {childName:'tradeList',dealsCanvas.getChildIndex(tradeList) }

    The correct syntax is
    var ac:ArrayCollection = new ArrayCollection([
                        {childName:'addTrade',index:addTradeIndex },
                        {childName:'tradeList',index:dealsCanvas.getChildIndex(tradeList) }

  • How to call a function with event

    How do I call a function with a event inside it?
    function showTopTen(e:Event):void
        highscoreData = new XML(e.target.data);
        trace("Hiscores: " + highscoreData.item[0].name.text() + " - " + highscoreData.item[0].score.text())
    //showTopTen();  ..??

    Could you indicate why you would want to?
    The eventhandler you show here uses the properties of the event object passed as an argument.
    The way I read it it is data retrieved from a server so your app won't know anything about is untill it is loaded from the server which should be done with an URLLoader object which in it's turn calls your eventHandler when the Event.COMPLETE is triggered.
    something like:
    var urlLoader = new URLLoader();
    urlLoader.addEventListener( Event.COMPLETE, showTopTen )
    urlLoader.load( new URLRequest( "http:// etc." ) );
    to me would seem the proper method to have the function execute.

  • How can i call javascript function with out internet connection?

    I have trying to call javascript function through ExternalInterface. But flash player recomonding to have internet connectivity. i have allredy used allowscript="always" .

    first, allow the folder that contains your flash files to connect to the internet by adjusting your security settings:
    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.ht ml
    then try the following in a swf and open the published html in your browser to test:
    import flash.external.ExternalInterface
    ExternalInterface.call("function(){alert('test');}")

  • How to call java function with parameter from javascript in adf mobile?

    how to call java function with parameter from javascript in adf mobile?

    The ADF Mobile Container Utilities API may be used from JavaScript or Java.
    Application Container APIs - 11g Release 2 (11.1.2.4.0)

  • Labview Dll call library function Causing Labview to unload

    I am trying to use the Call Library function in Labview 7.1 to call an Init function for a Zathic Can4USB device. When I run the vi, it complete log LabView out of the computer. Can anyone tell me why the function totally unloads LV without displaying an error?
    Thanks

    Either the function has a serious bug or you are calling it with
    invalid parameters or wrongly setup parameters. The problem happening
    here is that your DLL passes somehow invlid parameters to a system
    device driver and that driver causes a protection fault. For device
    driver execeptions which happen in the privileged kernel, Windows does
    not try to attempt to message a user in such cases (other than the
    threaded blue screen of dead which when you get it really means a full
    restart) but unloads the current application as fast as possible.
    Check the documentation for this function and try to see where you call
    it srong or contact the developer of this DLL for assitence.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Application crashes when calling DLL built with LabVIEW 2011

    Hello everybody,
    Our application calls DLLs built with LabVIEW 2010 SP1. We installed LabVIEW 2011 and built some DLLs. So far so good. If we start our application and run 2010 DLLs it still works fine. If we run a 2011 DLL just once no error happens, but if we try to run the same 2011 DLL our application crashes reporting the error below. I saved the code for 2010 version and built a DLL and it works fine. Does anyone know why?
    Thank you in advance.
    #Date: Fr, 16. Sep 2011 16:25:25
    #OSName: Microsoft Windows XP Service Pack 3
    #OSVers: 5.1
    #OSBuild: 2600
    #AppName: PasTA
    #Version: 11.0f2 32-bit
    #AppKind: AppLib
    #LabVIEW Base Address: 0x30000000
    16.09.2011 16:25:26.181
    Crash 0x0: Crash caught by NIER
    File Unknown(0) : Crash: Crash caught by NIER
    minidump id: 8a779b3f-51d7-4864-8e4d-6ab0195cd158
    ExceptionCode: 0xC0000005
    N
    0x3072C804 - lvrt <unknown> + 0
    0x3072CBB8 - lvrt <unknown> + 0
    0x7C864191 - KERNEL32 <unknown> + 0
    0x7C83AB50 - KERNEL32 <unknown> + 0
    0x00000000 - PasTA <unknown> + 0
    Attachments:
    error.PNG ‏11 KB

    On that note, you should be able to create DLLs in 2010 and run them with 2011, correct??  In my case, I have a 2010 built DLL (talking to sbRIO), most of the functions work when run in 2011, but a couple of them lock up LabVIEW on the desktop (but not the sbRIO), no lock ups happen with 2010 on the desktop.

  • Call a function with tables in a FORM

    Hi all,
    I am currently willing to create a FORM that would call a function (which has a table in its parameters).
    In the form, I modify the fields of this table, and then I call the function.
    I put the table in the FORM parameters (either 'USING' or 'TABLES').
    Problem is: the syntax check keeps on telling me that my internal table is not correctly defined (missing the statement 'OCCURS 0') and won't compile.
    I tried to add this statement 'OCCURS 0', even 'WITH HEADER LINE', but I cannot make it work.
    Can anyone help ?
    Thx a lot.
    Isa.

    Hi,
    Declare a Ztable inside the form of the type declared in the FM with a header line.Assign the fields that u require to pass through the table and append to this Ztable.
    Now pass this Ztable to the parameters of the FM.
    This should help u out...
    Mark useful answers...

  • Trying to call a function from a variable in Flex 4.0 ActionScript and need some suggestions

    I am attempting to build a site map in Flex. I have my links (or will have) in a database, along with a "link." On click from a datagrid, I have an event handler where I can get the link. However, everything I have tried to use won't call the function. Ideally, I would like to call a function from from my topLevel application, and I can do that using the mx.core.FlexGlobals.topLevelApplication call. Can anyone point a fairly new Flex coder in the right direction? Thank you.

    Here is the function on the group component (simplified): -- I got this from one of my google searches. The other was using the SWFLoader, but since this is in the same application, I didn't think it was as relevant. Plus, the SWFLoader used some references that I couldn't resolve.
    private function site_click(event:ListEvent):void {
      var sURL:String=list.dataProvider[event.rowIndex].link;
       var sCommand:String="mx.core.FlexGlobals.topLevelApplication." + sURL;
       this.[sCommand]();
    This yields the error message ReferenceError: Error #1059: Property mx.core.FlexGlobals.topLevelApplication.myths_click() not found on sitemap and there is no default value.
    Whereas this works fine:
    mx.core.FlexGlobals.topLevelApplication.myths_click();
    sitemap is my component name.

  • ORA-7445 when trying to call a function over JDBC

    Hi,
    We are trying to call a PL/SQL stored function which is in a package. When we call the procedure with SQLPlus or something different, it works fine, no error occurs. But when we try to call it over jdbc, we gat the following error plus an ORA-07445 error in the alert log. (running 8.1.7.4.0 on SunOS 5.8)
    UDBAdapter.UDBAdapter : 2003 Feb 04 09:04:05:662 DEBUG Alert : Connection--Connection recovered--NO_ALERT--1044342009152
    UDBAdapter.UDBAdapter : 2003 Feb 04 09:04:05:662 DEBUG Operation : Customer Update
    UDBAdapter.UDBAdapter : 2003 Feb 04 09:04:05:682 DEBUG Unique Id : 1123839
    UDBAdapter.UDBAdapter : 2003 Feb 04 09:04:09:998 ERROR Exception MessageNo more data to read from socket
    UDBAdapter.UDBAdapter : 2003 Feb 04 09:04:09:998 ERROR Exception Code17410
    UDBAdapter.UDBAdapter : 2003 Feb 04 09:04:09:998 ERRORjava.sql.SQLException: No more data to read from socket
    The alert log error is as follows :
    ORA-07445: exception encountered: core dump [kolcpcpy()+168] [SIGBUS] [Invalid
    address alignment] [2147484761] [] []
    Any help would be appreciated. Best regards.
    Ogun

    Hi Ogun,
    The "oerr" utility for your error code gives the following output:
    07445, 00000, "exception encountered: core dump [%s] [%s] [%s] [%s] [%s] [%s]"
    // *Cause: An OS exception occurred which should result in the creation of a
    // core file. This is an internal error.
    // *Action: Contact your customer support representative.
    Excuse the silly, obvious questions, but
    * have you examined the core dump?
    * have you contacted your customer support representative?
    * have you searched the "MetaLink" web site?
    http://metalink.oracle.com
    If you care to post the part of your java code that is causing the problem -- I may be able to help you.
    Good Luck,
    Avi.

  • Dot source/calling a function with switch from the cmd line

    Hi
    This is driving me crazy and I know its something really obvious.
    If I have an example script like so, called myexample.ps1
    [CmdletBinding()]
    param
    [Parameter(Mandatory=$false, HelpMessage="My Switch")]
    [switch] $Myswitch,
    [Parameter(Mandatory=$false, HelpMessage="Email Address")]
    [string] $email
    Function Main
    [CmdletBinding()]
    param
    [switch] $Myswitch,
    [string] $email
    if ($Myswitch)
    Write-Host "Switch Enabled"
    Write-Host "Email is $email"
    else
    Write-Host "Switch Disabled"
    Write-Host "Email is $email"
    Main -email $email #This is the line that I think is at fault
    I have two issues
    1) How do I correctly write the code so that the script can be called with either or both parameters. The switch ($Myswitch) is the one that is really causing me issues.
    2) Is invoking it the easiest method/best/most common method of calling it via a batch file
    Here's my understanding
    a) I could dot source it (. .\myexample.ps1) to load the functions into the current session, then call the function
    Main -email hello.com -Myswitch
    or
    Main -email hello.com
    b) or I could Invoke it, which I think is my preference as my final goal here is for it to be called via a batch file in a scheduled task
    & 'C:\Users\myusername\Desktop\MyExample.ps1' -email hello -myswitch
    or
    & 'C:\Users\myusername\Desktop\MyExample.ps1' -email hello
    Any push in the right direction will be appreciated :)

    Why the function?  Just call the file.  We don't "Invoke" scripts. Just call the script..
    # MyExample.ps1
    [CmdletBinding()]
    param(
    [Parameter(Mandatory=$false, HelpMessage="My Switch")]
    [switch] $Myswitch,
    [Parameter(Mandatory=$false, HelpMessage="Email Address")]
    [string] $email
    if ($Myswitch){
    Write-Host "Switch Enabled"
    Write-Host "Email is $email"
    }else{
    Write-Host "Switch Disabled"
    Write-Host "Email is $email"
    Now jsut call it like a normal script:
    .\MyExample.ps1 -email someemail -MySwitch
    It is as simple as that.
    If it has to be a function as in a library then you must either dot source or create a module.
    ¯\_(ツ)_/¯

Maybe you are looking for

  • Function Modules on Appointment Calendar

    Hi friends,                I have to create a rfc which has to create entries into the appointment calendar (scc1-tcode). I want to know whether there are any BAPIs or function modules which insert this data into the respective table. And more over t

  • My macbook pro runs slow. What can i do ?

    After i went on a streaming website, my macbook pro has started to run slow  over night and after 1 or 2 hours using the internet  didn't let me acess the internet. My intenet connexion is good. but safari says that he cant find the servor for the we

  • Pages created by other applications

    I have some applications which create html from within them to post on the web. I have my own domain, and have had no issues creating pages with links to these pages. With iWeb, how do I create a dead link, so I can add the pages to the site folder?

  • How to update the value in xml file using transformer after setNodeValue

    Hi, This is my code I want to set update the values in xml file using transformer.. Any one can help me This is my Xml file <?xml version="1.0" encoding="UTF-8"?> <place> <name>chennai</name> </place> Jsp Page <%@page contentType="text/html"%> <%@pag

  • How can deaf people contact customer support?

    I'm looking for a chat link for deaf people who need to contact customer service. Going on the apple website, it seems that a generic phone number or email is available (We can't talk on phones, and emails take too long to reply). What is the best wa