Access a dll with a table as argument in Teststand

Hello

I did a dll with the following function call:

__stdcall __declspec (dllexport) int FSCOM_ModbusQuery (int nComport, ucAddress unsigned char, unsigned char ucFunctionCode, unsigned char ucTxData [], int nTxDataLength, unsigned char ucRxData [], int nRxDataLength)

I want to access this function call in Teststand 2010 SP1. I did table 2 in Teststand and gave addresses to the function call (as you can see in 'Capture.png' and 'Capture1.png').

When I try to run the sequence I get an error on the ucTxData and the ucRxData with the message "number expected, found the table of numbers.

How can I solve this problem

Thanks in advance

Wissam

I think you have misunderstood what I wanted. In the specification of the Panel Module tab, you can change the type of data that the function expects. You probably set on the wrong thing. It must be set to an array of numbers where the elements are unsigned 8-bit integers.

-Doug

Tags: NI Software

Similar Questions

  • Access ni4882.dll with Qt and MinGW

    I have to control some electrical loads and power supplies by GPIB. We use Qt 4.7.4 with MinGW 4.4 (32-bit) on Windows 7 64 bit.

    The drivers package GPIB-NI-488. 2 package 3.0.2 for Windows 7 64 bit is installed. GPIB Troubleshooting Utility tool displays "pass" and the application of the Measurement & Automation can connect to it and talk to an intrument. So far so good.

    Now, I want to write an application can use the NI4882.dll (3.0.0.49153). Unfortunately, there are just objects for compilers files Microsoft and Borland and no lib file.

    Therefore, generate us a def of the ni4882.dll file with:

    pexports ni4882.h ni4882.dll h > ni4882.def

    -ni4882.def-

    LIBRARY NI4882.dll
    EXPORTS
    ? compareVersion@nGPIBAPI_NI4882@@YGXABVtSSVersion@@0AAJPBD@Z
    ? getCurrentVersion@nGPIBAPI_NI4882@@YG? AVtSSVersion@@AAJ@Z
    ? getOldestCompatibleVersion@nGPIBAPI_NI4882@@YG? AVtSSVersion@@AAJ@Z
    AllSpoll@12
    DevClear@8
    DevClearList@8
    ...

    --

    Then generate the lib with:

    dlltool k d ni4882.dll d ni4882.def-l libni4882.a

    Now, I build a small test QT program.

    -.pro file-

    INCLUDEPATH += $$ PWD/include

    LIBS += $$PWD/lib/libni4882.a

    --

    -.cpp file-

    #include "ni4882.h".

    ...

    Sub MainWindow::Init()

    {

    int DD = idev (0,3,0,T10s,1,0);

    If (Ibsta () & Err)

    {

    Err (tr ("Unable to open board:ibdev=%1").arg(dd)); "))

    }

    If (ibonl (0,0) & ERR)

    {

    Err (tr ("could not close the Council"));

    }

    }

    void MainWindow::Err (QString message)

    {

    Switch (Iberr ())

    {

    case 0:

    {

    message. Append ("(EDVR-erreur système)" ");

    } break;

    ...

    }

    qDebug ("Error: %s\nibsta = 0 x %x iberr = %d\n",)

    (unsigned int) Ibsta(), (int) Iberr ());

    }

    --

    The source code will be compiled and linked without error.

    But if I run, the output is:

    Error: Could not open the Board of Directors: ibdev = 32768 (EDVR - system error)

    ibsta = iberr 0x8000 = 0

    Error: Cannot close the Board of Directors (EDVR - system error)

    ibsta = iberr 0x8000 = 0

    So the question is: what is the problem? Why am I still getting this error EDVR. I also tried SendIFC (0) with the same result.

    With interactive control GPIB tool, I can communicate with my instrument and the Trace of e/s OR it connects. But I don't see the papers in my request tracking tool. Is this an indication?

    Any ideas?

    Marko

    Hi all,

    After a few questions about the use of the GPIB with Qt library, I wrote a description step by step to create objects for MinGW files:

    1 create a folder and copy the "gpib - 32.dll' of the"C:\Windows\System32"("C:\Windows\SysWOW64"in Win7) in this folder.

    2. copy "ni488.h" to "c:\Program Files (x 86) \National Instruments\Shared\ExternalCompilerSupport\C\include\. (Not ni4882.h!)

    3. load PExports (my version is 0.44) and put the exe in your folder. I don't have a URL to load this tool but should be easy to find. It is freeware.

    4. copy "c:\QtSDK\mingw\bin\" dlltool.exe in your folder.

    5. create a batch file '1 - build def file.bat' with the content: "pexports ni488.h gpib - 32.dll h > gpib.def.

    6. create a batch file "2 - build file.bat lib" with the content: "dlltool k d gpib - 32.dll - d gpib.def-l libgpib.a.

    7. run the batch file "1 - def file.bat build" to create the file 'gpib.def' def

    8. start the batch file "2 - build file.bat lib" to create the file in the library 'libgpib.a '.

    9 copy 'gpib - 32.dll' and 'libgpib.a' in your software project. I created the 'lib' subdirectory and copied the files to.

    10. copy "ni488.h" into your software project. I created the "include" subfolder and copied the file in.

    11. in your PRO file type:

    # #####################################################################
    # Include the NI 488 library. 2
    # #####################################################################
    INCLUDEPATH += $$ PWD/include
    HEADERS += include/ni488.h

    LIBS += $$PWD/lib/libgpib.a

    12. in your type of source code:

    #include "windows.h".
    #include "ni488.h".

    bool InitializeGPIBBoard)

    {

    bool isStarting = false;

    boardID int;        / * id board @brief. */
    QString boardName;  / * @brief Committee name. */
    int boardDescr;     / * descriptor of Council @brief. */

    Get ID Board
    SendIFC (boardID);

    If (ThreadIbsta() & ERR)
    {
    ErrorHandling (tr ("failed to open the Council"));

    Return isStarting;
    }

    Open and initialize a Board or a configured by the user device descriptor
    wchar_t * aName = new wchar_t [boardName.size () + 1];
    m_para.boardName.toWCharArray (Anom);
    aName [boardName.size ()] = 0;
    m_para.boardDescr = ibfind (Anom);
    delete [aName];

    The Board of Directors is the system controller.
    If (ibconfig (boardDescr, IbcSC, 1) & ERR)
    {
    ErrorHandling (tr ("failed to create the system controller board"));

    Return isStarting;
    }

    Affirm the clear interface.
    If (ibsic (boardDescr) & ERR)
    {
    ErrorHandling (tr ("Assert clear interface"));

    Return isStarting;
    }

    ASO.

    isStarted = true;

    return isStarted.

    }

    13 be happy! :-)

    I hope this helps. If you have any problems, please write me a message or post on this thread of Council.

    Gruss und viel Erfolg!
    Marko

  • Creation of DLL with LabWindowsCVI or MSVC?

    Hello

    first of all, I'm new on LabWIndows/CVI, but some experience with LabVIEW.

    So far, I usually create DLLs with MS Visual Studio and call functions exported with the library call node-VI.

    These dll provides some specific functions that are used in applications in real time and no time real (Windows, PXI and cRIO)

    Now, I saw that it is also possible to create DLLs with LabWindows/CVI.

    Is there an advantage using LabWindows/CVI? As special libraries that can be used, better integration with the rest of an application LabVIEW etc.?

    For now, I don't know for what purpose LabWindows/CVI should be used when creating LabVIEW applications.

    Could someone please give some short information if LabWindows/CVI provides better ways to create dlls for LabVIEW?

    Thank you

    Christian

    I wouldn't say that there is no benefit - if you develop a CVI application, then you have as a project CVI rather than being too dependent on one non-ICB IDE (for example. MSVS).  I usually group CVI application jointly with one or more DLL projects in the same workspace of the CVI.

    If you develop an application, MSVS, there is no advantage to the DLL in CVI that I can think of, unless you want to use libraries OR you cannot attach directly from your application MSVS - and I'm not sure that there are some who are like that - I think that you have access to the most If not all libraries OR through Measurement Studio when you use MSVS as your application development environment.

    Maybe someone of NEITHER can talk to the question that there is an advantage to the use of DLL of CVI authors with a LabView application.

  • Cannot access a DLL copied to a services of cRIO-9081.

    Hello

    Problem: In a simple test, I can't access a DLL copied to a services of cRIO-9081.

    -J' created a project of LV, in which the target of cRIO-9081 OR has been added.

    -J' created a VI on the target, in which I want to test working of the modules in the series C NI 9205 (analog input) and NI 9264 (analog output).

    -In VI, I want to simply call the function 'Add' in the library 'simplCalc.ddl' using the node library function call. (FTP using the simpCalc.dll is copied to C:\ni-rt\system)

    - BUT in "call library function node. Configure the... "I can not locate the DLL file on the hard disk target.

    Can you please help me in this case?

    Attached is the LV project file.

    Thank you

    The cRIO running Windows or LabVIEW RT as operating system? I guess that's LabVIEW RT - is the DLL compiled/compatible with Phar Lap (LabVIEW RT OS) or is it a Windows DLL?

    The configuration of nodes to call a library function will be * always * look on your PC (it is a dialogue of Solution Explorer, after all), not the drive on target. Normally, you must configure the DLL to use a relative path (for example by specifying just the name of the DLL or by directly plugging the path (check under the path)).

    Here are a few resources:

    http://digital.NI.com/public.nsf/allkb/0BF52E6FAC0BF9C286256EDB00015230

    http://digital.NI.com/public.nsf/allkb/2EA49B05E67DDECF86256F9A006FB315

  • For the complex data type, how to generate the Dll with compatible interface to C/C++

    Hello

    I used the Labview FPGA module to develop test equipment. Now, I need to write a driver that is to be a Dll with compatible interface to C/C++ for this equipment. So that my client who is familiar with C/C++ can call the driver without any study on labview. But I had a few problem on how to convert labview for C/C++ data complex data type. To clearly explain to my question, I have attached a simple example. (see attachment) I try to generate a Dll for the attached example VI and get the the function prototype at the head of the files as below:

    ' void OpenFpgaReference (LStrHandle * RIODevice, TD1 * errorIn, LVRefNum * FPGAVIReferenceOut, TD1 * errorOut).

    As you have known, the type of data "LStrHandle * RIODevice" and "LVRefNum * FPGAVIReferenceOut" Labview data format are. C/C++ do not have this kind of data type and can not reconige it. As a result, I can't call the Dll of C/C++ programming language. How to convert these two data type of labview for the C/C++ compatible data format, and then build the Dll? Anyone know about this?

    The answer is really apprecaited! Thank you in advanced.

    Ivan.Chen wrote:

    As I found in the following article:

    http://digital.NI.com/public.nsf/WebSearch/FB001AA027C8998386256AAD006C142D?OpenDocument

    LVRefNum is the name of resource of LabVIEW VISA or refnum, and "it is impossible to convert LabVIEW VISA name of resource or refnum VISession valid ID."
    This means that external code modules can not access & control the session VISA which is open by labview. But for my purposes, I will not attempt to access this VISA extenal code(C/C++) session. I just hope that save this session VISA in the external code once I opened it in Labview dll; and pass it to the labview dll when needed. While I have not need to login again when I need to control the device. Is it possible to do?

    A LVRefNum is really just a single int32 value. Its meaning is useless for other environments than those who created it so that you Michael not any what in C/C++ caller but pass it back to other functions in your DLL, but this often isn't a problem at all.

    You can take the following statement of the LabVIEW extcode.h headers and add them to your delabviewed header files to make it work in such a way.

    #define Private (T) typedef struct T # _t {void * p ;} * T}

    Private (LVRefNum);

    The LStrHandle you must set a standard C string instead in your export DLL and document what is the size of the string buffer should have if it is an output parameter.

    TD1 error clusters should also be divided into their parameters (C compatible) separate for all items or just to the left of suite entirely.

    Rolf Kalbermatter

  • Rename tables and columns in sql running that accessing these columns in the table.

    Hello

    Using oracle 11.2.0.3

    We want to rename columns, tables and work just a sql scripts for this.

    If sqls who have access to those running long tables/columns for example reports what is happening

    Existing sql running, will work perfectly in that picked up sql before table/colum rename or will they crash if tables/columns renamed during them.

    scripts wil take a few seconds to run maximum

    Thank you

    The only other activity that would go on select is against these tables/columns. No etl isnert/update/delete etc wil, which happened during the name change.

    Only possible activities are report instructions srunning select.

    Tried to run a long selection and rename that select while that was going on and got no error on the test system.

    This is because certain statements does not place locks on tables or lines, so even if a session is reading data, another session can make some ddl (or dml) manipulation.

    In this situation (with only selects, no other dml queries), renaming can be done, but the question remains, what the application code?

    If it refers to old column names after name change operation, is no good.

  • Enable advanced tagging vs enable accessibility and reflow with tagged Adobe PDF

    Is anyone know the difference between these two parameters in the PDFMaker preferences?

    Enable advanced tagging vs enable accessibility and reflow with tagged Adobe PDF

    I can't find any information that distinguishes these two parameters are mutually exclusive. I am trying to decide what is the best when you create a PDF document that is signposted from MS Word. If someone has an idea, I would be very happy.

    "Advanced marking" is changing the way that some elements of the page are defined (table of cells, lines, boxes, etc.), who makes the most reliable conversion of "Visual" in PDF Acrobat forms fields. You must have the option "enable accessibility and reflow with tagged Adobe PDF" as well on, or tags are not created at all.

  • To access the buttons in the table

    Difficulties with certain codes, Im trying to access the buttons in my table, but cant seem to figure it out.

    my intention is to trace the im button pressing.

    Here is my code

    var btns:Array = [bk_btn, red_btn, blu_btn, brw_btn, purp_btn, orn_btn, ylw_btn, grn_btn, wht_btn];

    var currentClip = "";

    for (var a = 0; a < btns.length; a ++)

    {

    inclinometer [a] .addEventListener (MouseEvent.CLICK, colorbtnEvnt);

    }

    function colorbtnEvnt(e:MouseEvent):void

    {

    trace ("a");

    }

    assuming that these objects in btns exist, use:

    var btns:Array is [bk_btn, red_btn, blu_btn, brw_btn, purp_btn, orn_btn, ylw_btn, grn_btn, btn wht_];.

    var currentClip = "";

    for (var a = 0;

    {

    inclinometer [a] .addEventListener (MouseEvent.CLICK, colorbtnEvnt);

    }

    function colorbtnEvnt(e:MouseEvent):void

    {

    trace (e.currentTarget.Name);

    trace (BTNS. IndexOf (e.currentTarget));

    }

  • Using a dll with java

    I have to use a dll microsoft with java.
    This dll allows a specific signature of SMIME. I know some more details about it.
    I loaded the dll with System.loadLibrary ("cnascapi"); but I don't know what to do next.
    I tried
    cnascapi test = new cnascapi();
    but the error is "cannot find symbol: class cnascapi.

    Thank you.

    Google for JNI tutorial and/or the tutorial of the JNA.

    JNI is the traditional way to access native libraries via Java. JNA is a newer approach that is supposed to be simpler.

  • [Flex 3] Problem with the additional compiler arguments (cannot open)

    Hello world

    I have a problem with an additional compiler argument:

    Error Msg: can't open 'WEB-INF/flex/service-config.xml'

    This is the error I have to manage.

    I read that it is has to do with the argument of the compiler:

    -Compiler arguments additional properties - Flex compiler:

    -local = en_US, fr_FR, nl_NL-source-path = local / {local} -services "WEB-INF/flex/service-config.xml"

    But what's not here?

    Best regards.

    PS: I tried with a lot of path to the file.

    Hi PLbe,

    Using weborb in your project or any type of remote access in your project.

    Try to give the complete path for argument of services instead of the relative path.

    Thus to specify---> - services "c:\inetpub\wwwroot\weborb30\web-inf\flex\services-config.xml".

    instead of -services "WEB-INF/flex/service-config.xml"

    If you pasted the WEB - INF folder in your Flex application project file in src so no need to specify the full path. But if you have not included the WEB - INF folder (including configuration files) in the folder of your project, then you must include the full path.

    "c:\inetpub\wwwroot\weborb30\web-inf\flex\services-config.xml" is the default path where this file...

    Thank you

    Jean Claude Chari.S

  • Problem with a table

    Hello

    Sorry for my bad English.

    I have a problem with a table. I made a table with a script, but when I add a new line, this script will not work in the new lines. I know that I have something wrong, but I do not know the solution. Anyboy help me? You can see the file in http://www.frmgm.jazztel.es/duda.pdf. I am new in programming.

    I thank you very much.

    OK, now I understand... each row that you add to the table changes the somExpression for objects (so that they are unique). The repeating subform Gets a case number, but the rest of the phrase remains the same. If you do not include a number of occurrence, then the 1st appearance is supposed to... that is why only the 1st row is affected. You can build expressions so that you can derive the correct number of occurrence. The click event code would look like this:

    If (xfa.resolveNode ("Tabla1.Fila1 [" + this.parent.index + "]").) Casillaverificacion1.RawValue == '0') {}
    xfa.resolveNode ("Tabla1.Fila1 [" + this.parent.index + "]"). Casillaverificacion2.access = "readOnly";
    xfa.resolveNode ("Tabla1.Fila1 [" + this.parent.index + "]"). Casillaverificacion3.access = "readOnly";
    xfa.resolveNode ("Tabla1.Fila1 [" + this.parent.index + "]"). Casillaverificacion4.access = "readOnly";
    xfa.resolveNode ("Tabla1.Fila1 [" + this.parent.index + "]"). Boton1.presence = 'hidden ';
    } else {}
    xfa.resolveNode ("Tabla1.Fila1 [" + this.parent.index + "]"). Boton1.presence = "visible";
    xfa.resolveNode ("Tabla1.Fila1 [" + this.parent.index + "]"). Casillaverificacion1.access = "readOnly";
    xfa.resolveNode ("Tabla1.Fila1 [" + this.parent.index + "]"). Casillaverificacion2.access = "open";
    xfa.resolveNode ("Tabla1.Fila1 [" + this.parent.index + "]"). Casillaverificacion3.access = "readOnly";
    xfa.resolveNode ("Tabla1.Fila1 [" + this.parent.index + "]"). Casillaverificacion4.access = "readOnly";
    }

    You can see that the xfa.resolveNode takes a string that represents the object we want to use. The string is then built and the number of occurrence of the Fila1 subform is derived by obtaining the index number of the subform parent of the object that we clicked (this.parent.index). Occurane numbers are wrapped in [] brackets.  The rest has not changed. You will need to update your code to use this technique.

    Hope that helps

    Paul

  • When I print a table (multiple pages) the text box under the table seems to be moving under the table and prints with the table of this overlap. My only solution is to push the text box further down the page before printing... Any advice?

    Im having problems shaped a text box so that my table does not print right on top of it. I want it inside of my table (it's 'tems and conditions' budget)

    Any advice would be great.

    I face the same problem as well. Would like to know if there is a better way to get the text box to move with the table instead of the effect that overlap. Have to manually adjust the layout, whenever I want to get a reasonable print of a document (or export it to PDF) seems counterintuitive, especially when it causes the document seem ill-disposed on screen.

    I am running version 3.6.2 of the numbers in the case where that matters.

  • How can I access the internet with my Apple TV

    Is it possible to access the Internet with my Apple TV which I can do with my laptop Smart TV and my Macbook Pro?

    Do you mean to display web pages?

    If AppleTV 1-3 have thus no such ability / AppleTV 4 does not have this capability built-in, if there is an application of browser for him however, you might be in luck.

  • How do VI with timestamp table entry

    I'm doing a sub - VI for a program and I need to have a double array, boolean and an array of time as an entry stamp. I can't find a way to mark the entrance with a table timestamp however indicator. My only choice seems to be double and Sub. Is it possible that I can do this?

    You have a block of empty array on your front panel and then move there a timestamp control.

  • Time dilation of a curve with interpolation table 1 d?

    Greetings,

    I'm trying to run a time dilation of a curve I used to work with the table 1 d of function interpolate VI. Basically, I have to perform the expansion on each segment, that is why each segment contains 100 points, where there are currently 60.

    I am currently working with two files (the two are broken) to compare because I'm not sure how to use the table 1 d interpolating VI, and what I have to enter for the fractional index. I know that the output of the table in the first for loop should go in the 1 d array interpolated somehow.

    I'm stuck!

    Thank you!

    TheLT

    I'm good I thought it

    Here's how to do it for later use.

    Code attached.

    TheLT

Maybe you are looking for

  • Skype has stop working

    Caused something the program to stop working correctly, windows will close the program and notify you if a solution is available *, what I do to make it stop happening?

  • install printer Windows XP error message: there is no print processor

    Try to re - install a printer (Knoica/Minolta MC-2300-DL) and installation of the process works fine until you click the final OK... then I get the error message "cannot install the printer.  The print processor does not exist. » I used the FIX IT pr

  • WLC balancing without fault tolerance

    Hello, I need 13 points of service and provide load balancing between all connected AP Fault tolerance is not a concern at the present time where my reasoning below. I look at by specifying two 4402 controllers with the AP 12 license and configure th

  • Q10 blackBerry smartphones won't boot need urgent help

    one day after shooting my load when using q10 it off immediately and the custom start so I pluged the charger he showed the bat is in charge, but later on this subject showed the error change the bat that I did but just when even used begin Infact wh

  • Driver_Power_State_Failure on Lenovo U310

    Hello! I just got my Lenovo for about a month and then it started to do this "Driver power state failure" error whenever I have try to wake my computer from sleep or if I leave my computer unattended for some time. I don't know much about computers i