Jump to content

bulebell

Members
  • Posts

    28
  • Joined

  • Last visited

Posts posted by bulebell

  1. i use labview to build a dll to measure audio SNR,but when i use my program to call this dll ,its result is diffrent from the procedure result in labview,what is the matter with it? my computer program is written in C++bulider.

  2. You have to configure the Call Library Function Node according to the prototype of your C function, all argument types and positions have to match.

    Here is a modified version of your VI with the (hopefully) correctly configured Call Library Function Node:

    test_dll.vi

    Note: A function argument that returns data must be a pointer. If an argument returns a string you have to allocate memory before: You can initialize an array of U8 and use that as string argument.

    thanks very much. for your information, i had wrriten a successful program.

  3. Not fully understand what you are trying to ask but I guess you want to see when you can use the Boolean value change AND the mouse down at the same time, right. Since normally you click the control to fire a value change event for that button which means value change AND mouse down already. So what is the Boolean value change AND mouse down you can use for???? is the question.

    I have create an example on what you can do with it.

    The 1st Boolean button has the value change event: as you can see from the example, the string indicator doesnt clear after you clicked the button

    The 2nd Boolean button (Boolean 2) has the value change AND mouse down, the string indicator shows the text WHILE you hold the button and clear it straight away after you release it.

    Hope this is what you are after.

    thanks very much for your answer. but i am so sorry to tell you .because my labview's version is 2009,so i can't open your vi.

  4. The configuration of the Call Library Function Node is wrong. Take a look at the header file of your DLL. The required function prototype is:

    void __stdcall NIDAQ_Wave_Get_070528(char DAQPort[], double rate,

    long samplesPerChannel, long inputTerminalConfiguration, LVBoolean *Result,

    double *Amplitude, double *Frequency, char ErrorMsg[], long *len);

    Your Call Library Function Node is actually configured for:

    int32_t __stdcall NIDAQ_Wave_Get_070528(void *input terminal configuration, int32_t Amplitude,

    int32_t Frequency, CStr DAQ Port, int32_t samples per channel, int32_t rate);

    thanks very much! can you help me to offer me a sample? i am a freshman.

  5. i mean I want to set two types of control condition,the first one is the initial value and the initial value is a string。 the other one is the value when the forward case structure run over the case structure return。meanwhile ,this value is Dynamic data。

  6. That API is 'smart' it allows you to read/write using the single VIs and LabVIEW handles all the opening and closing of references in the background.

    However if you want more control e.g. streaming data to disk in a loop - so you dont want to open and close a reference everytime - you can explicitly handle it yourself.

    oh,i see, thanks very much

  7. I want to use case structure vi, that has a prolem. it has a Initial value(it is a string),but case run over,it will return a return value. I will use the return value to control this case structrue as a condition station .meanwhile ,the return value may use as a input value.

    what can I do to solve this problem?

  8. I'm not sure I completely understands your question, but just calling the "Write To Text" method replaces any previous content (see help).

    If you want to append new data to the file you'll have to;

    1. Open the file with "Open/Create/Replace file"
    2. Move the pointer to the end of file using the "Set File Position"
    3. Write new data with "Write To text file"
    4. Close file refnum

    /J

    for your information,i understand i maybe forget the "Set File Position"。

    but i’m puzzled because i didn't Close file refnum, its running is ok. so whether i must add “close File”,if i don‘t use it,what will happen?

  9. You have one case structure, that has two cases 'write' and 'read'.

    Both case-names are in red because they don't match the selector data-type (an unconnected selector defaults to boolean allowing 'False' and 'True').

    If you want to use a string as selector you need to add a 'default' case (or make one of the two cases default).

    You could also add a Boolean as selector, making it a read or write boolean.

    Ton

    PS if you are in the error dialog (ctrl-L), you can double click on the error and you'll get send to the error.

    thanks a lot. for you information ,i handle with the problem.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.