Best way to pass an array between TestStand, CVI

Hello

I was not able to judge or to find the best practice to pass arrays between TestStand and CVI. I'd preferably done in pass pointer to array. For example, if I have a function written in CVI DLLs:

int GetAverage (double* aBuffer, double aSize, double* aAverage)

TS I have an aBuffer double array [100]:

-I can't simply pass

GetAverage (aBuffer, 100, &aAverage)

- or, I can go:

GetAverage (&aBuffer[0], 100, &aAverage)

-The only thing that is TestStand accepts:

GetAverage (aBuffer[100], 100, &aAverage)

I don't think not good because the size is just repeated.

I had no problem if I could write

GetAverage (aBuffer[100], &aAverage)

but the problem is in this case there is no possibility fo CVI to determine the size of the table, like sizeof (aBuffer) just return, sizeof (double).

Can you provide me with advice for best programming practices in this case?

Concerning

RB

Hello

Just in addition:

Is there another way to access the tables.

Often, I use for this task, the TS-API. The only parameter you need is in this context of the sequence.

Maybe you should also visit this example:

TestStand 2010\Examples\AccessingArraysUsingAPI\UsingCVI\AccessingArrays.seq

Concerning

Jürgen

Tags: NI Software

Similar Questions

  • Best way to transfer strings, arrays and clusters

    Hi, I just want to know the best way to transfer strings, arrays and clusters between a PC and a computer-RT (compactRIO) if I want to use them in deterministic loops:

    For a string should I use a published network shared variable flow or network?

    For an array of doubles should I flatten the array in a string and the string of transfer? or should I send it as a picture?

    The same for clusters, should I flatten the cluster or the transfer as a cluster?

    Thank you!

    Transfers on the network are not deterministic.  You ask how to use the data in a deterministic way, once it arrives on the RT system.  Usually, you would create a separate loop, not critics of time to deal with network communications.  The data arrives it is copied in real-time-safe structures such as RT-FIFO to put at the disposal of the evanescent loop.

    I can't give you specific advice on network variables and network flows; Finally, I did this kind of transfer over TCP, until these other options were available.

  • The best way to pass data when browsing

    By taking the case where an action method is called and he chooses navigate to another page.

    What is the best way to pass data from bean of old media to the new (probably in the execution of the action method)? I am currently using beans of spring session scope as the support of beans.

    Take a look at:

    It goes between your commandLink or commandButton control:



  • Best way to pass the name of the e/s DAQmx channel Veristand 2011 Custom Device?

    I'm building a custom device that will run a DAQmx task on the target of RT.

    I use VS2011 and alsoSimple custom device tool, which, at this point I'm not sure if it can work under VS2011...

    I created the fine libraries and custom device (a PWM input called InputPWM) has added to the Explorer from the system.  Running it returns the following error when I deploy:

    -----------

    LabVIEW: Type VI reference is not part of connector of VI.
    =========================
    NEITHER VeriStand: Open VI reference in Custom Devices Storage.lvlib-> pen device reference (Interface HW) .vi-> Custom Devices Storage.lvlib:Initialize Device (Interface HW) .vi OR VeriStand Engine.lvlib:Initialize Inline Custom Devices.vi-> NI VeriStand Engine.lvlib:VeriStand Machine.vi engine-> Engine.vi NI VeriStand Engine.lvlib:VeriStand-> NI VeriStand Engine.lvlib:VeriStand .vi engine Wrapper (RT)
    c:\NI-rt\VeriStand\Custom Devices\InputPWM\InputPWM Engine.llb\InputPWM RT pilot VI.vi

    ----------------------

    On the console, it says that the error is 1026, LabVIEW: Refernece VI is not valid.

    I suspect that a potential problem is that I used a DAQmx e/s in the Configuration.ctl and the InputPWM RT pilot VI.vi in the framework can not deal with this type. So my questions:

    -What is the easiest way to pass the names of e/s to the custom device? For a quick test, I could go to hard code, but a more generic solution would also. Should be based on the address for the e/s MAX? Do I have to create the ctr under the DAQ hardware in VS?

    - or said by the way, is there a way to review these screw frame to see where the questions is, as you would with LV - RT?

    THX.

    L.

    If you use the tool of easy custom device, just put everything you need inside the cluster configuration data and these data will be in the home page of the custom (for the user to set) device and be available at runtime in the RT device custom code.

    You could have them type the name of the DAQ card and have an array of names for the channels to use. You then create the task running. or something like that. You like.

  • What is the best way to save an array of objects and then load it?

    Hi, what is the best way to save and load an array of objects?

    I hade a code like that, but it does not work:

    var test = new Array();
    test.push(new Foo("a"));
    for (var i = 0; i < test.length; i++) {
        console.log(test[i]);
    }
    // save and load, then show again
    localStorage.setItem("test", test);
    var test2 = localStorage("test");
    for (var i = 0; i < test2.length; i++) {
        console.log(test2[i]);
    }
    

    the problem is, the first newspaper that get the things I want. The second time I get:

    Uncaught TypeError: Property 'localStorage' of object [object Object] is not a function
    

    The work around this problem is to stringify before saving and then analyze before loading.

    http://StackOverflow.com/a/2010948/773263

    Although I said, it is better to use IndexDB.

  • Best way to pass and retrieve variables

    Hello

    Here's my setup.

    My client's site has a page for each product. On each product page is a link to a photo album for this product in a 3rd party gallery that I've implemented (Plogger: this gallery has several different photo albums, one for each product). I want to be able to do is provide a link to the gallery that when you click on will take the user to return to this page for specific product on the main site. I think that I would accomplish this by passing a variable to the gallery which is set to the url of the page that it is supposed to return from the main site. But I don't know how to put this all in place.

    What would you say is the best way to do it, and nobody knows instructions on the web?

    Thank you

    Mike

    I looked at the Plogger demo Gallery.  I was referring to the GET method that there is nothing in the address to link the file to the album.  Without examining the code at a deeper level, I'll try to explain what you should look for.  I'll use the next page for example:

    http://www.ptssolutions.com/gallery/software-screenshots/AVL-replay-screenshots/02/

    The album "AVL response Screenshots" is what you need capture, but which should also match your product page.  When you go to the page 'Answer AVL', you find yourself at this address:

    http://www.ptssolutions.com/automatic_vehicle_location_software.shtml

    Because there is no common variables to select, you need to understand the application you are using.  I was looking for an easy solution via a GET method or a variable that is located in the Plogger skin, but was unable to find a solution through my brief review.  Most likely, you need to change the administration area to attach a URL to each Album, which then gets displayed in the skin.  You will need to edit the page, so that you can easily change it later, in addition to the creation of a database table.  I would recommend a separate table of Plogger installation so that the path if you improve their script at any time it should not affect your change.

    As I said, it is probably possible, but I'm only reviewing the frontal point of view and without evaluating the code at all.  For changes of this nature, I'd be active in their community to get an overview of the extension of their application.

  • What is the best way and to share data between a server and a Client app?

    Hello

    I'm trying to communicate a Client-Server application.

    In fact, I already have a simple data transfer via TCP/IP. However, I don't know yet, if TCP/IP is the best (and by that I mean, better, faster, safer, etc.)

    How to do.

    What are the cons and Pros between TCP/IP, STM and shared Variable?

    Do you recommend another type of communication in addition to these 3?

    Thank you

    Matt.

    In my view, that a general question cannot have a response says.

    Then, there is no way 'the best' for sharing data between a client and a server app.

    I like to use TCP/IP, but sometimes (when data loss is not critical) I use UPD (quick and dirty).

    I generally avoid shared variables, especially on embedded devices.

    Some other times I have I like to Exchange data in a database...

    A few other times I Exchange data using file...

    Marco

  • Best method to pass a resource between classes

    Hi all

    Relatively new to OOP again and worked on a project of OBJECT-oriented programming.  My basic architecture is a machine to States OOP, each class represents a different test.  I have a test that will go through all the tests, so I thought I could spend just a new class in one for a loop and pass all the tests.  Problem with this is of course I connect to a device and the resource is lost with each new object.  A solution imagined ive because this problem is to have a class that the class test and the resource and I could a new class of group whenever I passed the test and carry the same resource on the wire.

    Any comments welcome, if my overall plan for this program is disabled please tell.

    Thank you

    Matt

    Use a shift register to store your device and have each of your methods to run the Test have an entry for the device object.  You will probably need a couple of tests to initialize device and device close.  These should be the only two cases that open or close your device.  So no dialing is required.

  • What is the best way to convert an array of bytes or string cluster

    I am writing a program that sends UDP packets and I defined the data I want to send via large groups (with numbers of u8, u16/u32, u16/u8/u32 tables and nested groups). Just before sending the data, I need to convert groups or chains of arrays of bytes. The flatten the string function is almost perfect for this. However, it is addition of lengths in the tables and strings that makes this unusable method, because as far as I can tell.

    As I have many of these groups, I would rather not hard code the unbundle names and conversion/cast of strings or arrays of bytes for each of them.

    Y at - it a function, or a tool that I'm on?

    Thank you!

    mkirzon wrote:

    The program I'm developing is to communicate and to poll an external device that includes a Protocol well documented. The messages that I built in clusters contain components accurate that expected from the other device. So, if my program adds any additional info (such as this array/string lengths), monitor the device external won't recognize messages and returns an error.

    Unfortunately, you have to ungroup your cluster and collect the individual channels to concatinate.

  • Best way to pass customer data from 2.4 GHz to 5 GHz network?

    Wireless network was initially designed for b/g data, voice on a service.

    Voice has not yet been implemented and have decided to move the data from one, and can use Vocera on b/g.  Should I create a new SSID that is enabled only on a radio and reconfigure all clients to use this (more than 300 customers would need to be touched... but I would like to know what devices are had been missed), OR should I use the radio on my existing SSID, allowing customers with a radio to start using, which should help me determine what clients do not have a radio (although I'm not sure if the) customers will choose one on b/g).  I would possibly turn off b/g on my existing SSID (legacy clients could be upgraded or reconfigured).

    You really have to use different SSID for voice and data.  In this way, you can configure QoS.

    The extent of the passage of the customers you could either just configure the SSID to use only 802. 11A, or you can use bandselect.  With bandselect, push customers to 'a', but if the customer can not 'a' is always will join on "b/g".

  • Best way to move virtual machines between two clusters: HP and UCS

    Hello

    We move the virtual machines in the cluster UCSChassis: 6 guests ESXi in a Cluster of HPChassis.

    I wonder how do it with minimum downtime.

    Thanks for your help,

    If you have shared storage - expose the storahe where virtual machines are stored to both sets of guests - and the hosts are ocmpatible you can vmotion - or at least - to stop the mover VM's from the environment of the UCS and add it to the HP environment.

    If you can't share the storage you - you can use VMwate Standalone converter and V2V the VMs-

  • Best way to share the colors?

    Hi all

    What would be the best way to share the colors between apps? I realized the color CC only lets you set 5 colors and I have several brands that I create visuals for and I use multiple applications. What would be the best practice to share my palettes of colors between apps?

    A big thank you to all...

    Have you looked into the cloud libraries?

    Synchronize digital resources in Adobe files and apps | Creative cloud libraries

    How to get started with creative cloud libraries | Tutorials Adobe Creative Cloud

  • by passing the array of strings of Teststand to LV dll

    Hello

    I wonder, why is it not possible to pass an array of strings 1 d of TestStand to a dll, which is compiled with LabView. By the way the PropertyObject works very well, but as parameter category "Array of Strings" exist in the call dll TestStand pane, it should be possible to pass an array directly. I get an empty dialog box, where I try to view the contents of the array passed directly.

    Why it does not work?


  • best way to migrate project teststand

    Hi all. I am new to teststand

    I have to work again on a former ramp driven by a core of teststand. to do this, I first need to copy all the data with another computer, just to see the source codes and .seq file, since I can't not work directly from the ramp

    After copying the workspace, a lot of things don't work / are not more recognized in the source code. the main one is the globals station. is it stored somewhere else in the project directory? You can specify all the things outside the project that I have to copy with my project and with what?

    Thanks for your help

    It is not trivial to simply copy like this.  There is so much that goes into automation TestStand.  Consider the following, which form a TestStand system:

    • Code model/s process and support
    • File of the client's sequence and dependencies (screws, DLLs, assemblies, etc...)
    • Cfg files (settings of the station, stationglobals, search directories, report options, etc...)
    • User interface
    • Engines
    • Drivers
    • And much more

    Station globals are stored in the config directory.  Usually stored here: C:\ProgramData\National Instruments\TestStand 2010 SP1\Cfg on Windows 7.

    In addition to the configuration settings, the most important copy thing on would be the .seq file and all of its dependencies.  You will have to go through it, step by step to understand what all of those who are.  And then to top that off, you need to make sure that when you should I copy on they are accessible by the search directories (of if using absolute paths that they are exactly the same task).

    The best way to move from a system of TestStand is to deploy.  http://digital.NI.com/public.nsf/allkb/EE3382373D209449862570A5006572F0

    Hope this helps,

  • Pass parameter value between c# and TestStand

    Hello

    I'm currently futured, customize the User Interface complete

    I Test.seq master who has all the tests and I need to run only the selected test user in the user interface.

    so I thought to transmit the selected user code c# UserInterface test form to master Test.seq.

    How can I pass the value of the parameter or is there another way I can share data between USerINterce and seq file?

    Thanks in advance

    IVI


Maybe you are looking for

  • VIZIO Smart TV with built-in Skype App receives "orange badges", but other Skype applications show nothing...

    Hello First off I apologize for opening a new thread if this has been discussed before... As I am a noobie on this interesting platform... lol Now I just installed Windows for the desktop app and have Windows 8 MS (appstore) and also have Windows Pho

  • "error 31000" in the notifications tab

    I want to start a discussion to see how many people have this rare error and to get an overview on how this is all. Since I got my phone in early January, I had to randomly "code error" (I don't know what else to call it) in my tab notifications from

  • App memory exhausted

    Recently updated to El Capitan. Given that do so Safari freezes, don't leave unless forced and "app memory exhausted" appears frequently. Re installed OS X 10.11.2. No solution! MacBook Pro, end of 2013, 2.3 GHz Intel Core i7, 16 GB of RAM. Help!

  • Add or remove programs will not fill

    In Control Panel, click Add/Remove programs. Nothing, just white.

  • RAM has worked in a T30 but not another

    I have 2 sticks of 1 GB of RAM: DDR 333, FDMHGO - 04032T This RAM worked well in a portable T30 2366-85U I put the same RAM in a laptop of 2366-KU1 T30 and it does not - in a memory slot. The BIOS is 1IET71WW (2.10) 16/06/2006, which I think is the l