Holding values as default in LabWindows/CVI application

Hello -
I am writing a LabWindows/CVI application, which controls an USB Digital I/O Board.  I have set an user interface to a default value.  However, when a user runs the application, he/she may need to change the default value.  How can I hold the value the user entered for the next time the user runs the application?
Best,
Matthew

You better post this in the LabWindows/CVI board instead of the LabVIEW board
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!

Similar Messages

  • Entering numeric values with suffixes in Labwindows CVI (e.g 100 kHz instead of 100e3 or 100000 )

    is there any practical way of entering numeric values with suffixes in Labwindows CVI in order to prevent user from struggling with '0' es. 

    In LabVIEW there is another Display Format called "SI Notation" that is exactly what you're looking for.
    Maybe you can add a feature request in CVI Idea Exchange Forum and ask NI to add this Display Format in CVI too.
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

  • Setting Current Values as Default in Stand-Alone Application ?

    Hi
    I have a stand-alone application using LabVIEW run-time and I want the user to be able to make the choice if he wants to retain the default values or modify them ? I know you can't use the invoke node and set the current values to default because that works only in EDIT mode. I saw some postings where there was a talk about using configuration VIs. I am not sure how to use them. Also is there some other way I can accomplish this ?
    Thanks
    Sridhar
    P.S: I use LabVIEW 7.0
    Kudos always welcome for helpful posts

    I would use a configuration file to hold default values for my controls. When the vi starts, prompt the user to select default values or to modify. You can use a two button dialog to do this. Wire the output to a case structure. If the user selects default, read the config file and use the values to set your controls values. If the user selects modify, call a subvi that gives the user an interface to modify the values. You can start with the old default values. This subvi would have a loop, waiting for the user to press either a cancel button or a change button. If the user makes changes and presses the change button, exit the loop and write these new values to the config file. If cancel is selected, exit the loop and do not write to the config file. Upon returning to the main, read the config file and set the control values accordingly. You can even go a step further and create a "factory default" file. This file would be read only. The user can be given a choice to select this file in case he made changes and saved them to the config file, and the new changes were all screwed up.
    Config files are nothing more than a file containing keys which represents controls, and the data values for those controls. There are examples located at \examples\file\config.llb.
    - tbob
    Inventor of the WORM Global

  • Running a LabWindows/CVI application created and built in Windows XP Serv.Pack 2 on a Windows 2000 computer

    I have created an application using LabWindows/CVI on my computer. I would like to install this application on a Windows 2000 machine but  I receive a message saying something like  "This program requires Windows XP service pack 2". 
    What can I do to make this work. 
    I am using LabWindows/CVI version 2010.
    Any Ideas?

    OK, Thanks, I will try that.
    Regards
    // Mikael

  • Start CVI application when particular file type is double clicked

    I'm developing using Labwindows/CVI 2013 on Win7
    I'm trying to get my installed Labwindows/CVI application (the app is called KSALogViewerV100) to run when a file with a particular extension is double-clicked.
    I went to Control Panel:
    Control Panel\All Control Panel Items\Default Programs\Set Associations
    I found my extension (.klg) and and clicked Change Progam, then Browse and navigated to:
    C:\Program Files (x86)\KSALogViewerV100 and selected KSALogViewerV100.exe
    So far so good.
    But when I open Explorer and find a file like MyFile.klg and double click it I get this:
    Any ideas what I'm doing wrong?

    OK, my bad, I was mis-handling the argc, argv stuff and overwriting a string.
    Now when I double-click a .klg file the appliction comes up just fine.  The full path-name of the file I double-clicked is in argv[1].
    Not sure I followed you though--
    Are you saying I should not have to go into control panel to associate .klg file types with my KSALogViewerV100.exe application?
    Kirk

  • LabWindows/CVI Process Communications

    I have a LabWindows/CVI application (executable) that must launch a second executable via the "LaunchExecutableEx" library function.  When the second executable terminates, it must return an integer value to the first executable.  Other than the horrid solution of using a disk file, how can this be done?
    Maybe by using a shared DLL?
    Thanks.

    Please refer to the post on the LabWindows/CVI forum here
    Al B.
    Staff Software Engineer - TestStand
    CTA/CLD

  • Writing a Compressed AVI File in NI LabWindows/CVI with the IMAQ Vision Acquisition

    I'm still facing some problems when I try to save pictures from a GigE Vision camera into a compressed avi-file in a LabWindows/CVI application on Windows7.
    The task is to grab images from the camera with 30 fps to monitor a process, evaluate the grabbed pictures to find certain characteristics of the monitored process and save them in an avi-file to have the possibility to load and evaluate them once again Offline if necessary.
    My questions: which compression filters can I get with the NI-Imaq Vision Acquisition and Vision Development Runtime 2012 SP1? Is a mpeg4 codec available to compress quickly and effective? Can I use a third party codec or only the ones delivered with NI-Vision?
    I posted the problem two times already, but there is little response up to now. Thanks

    The encoding algorithm, or codec, that's used for compression needs to present on your system. When I had done some research on this sometime back, I found that if your custom codec could align with the DirectShow architecture, then your codec would work with IMAQ AVI functions.The codecs that are available may vary from system to system, depending on what software is currently installed. Be sure to check out this article:
    Writing a Compressed AVI File with the IMAQ Vision Acquisition Software
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • I would like to know how to transform an API C++ application in MFC C++ application to use the measurement studio components or Labwindows CVI

    I don t know the way used to transform a C++ with API program in an MFC application using measurement studio or Labwindows CVI.
    Thank you for you help.

    You can use the Measurement Studio Add/Remove Components Wizard to add Measurement Studio components to your C++ application. For more information, see the "Adding and Removing Components from Measurement Studio Projects Using a Wizard" topic in the Measurement Studio reference. You can find it in the table of contents under:
    Visual C++ Help
    Tutorials
    Measurement Studio for Visual C++ 6.0
    If you're using the Measurement Studio update for Visual C++ .NET, this topic will be under:
    Visual C++ Help
    Tutorials
    Measurement Studio for Visual C++ .NET
    - Elton

  • Using the SVDEx function in LabWindows​CVI

    Hello,
    I am writing an application in LabWindows CVI to display and analize data that we obtain in an optical experiment.  The data is a matrix where the subsequent rows represent spectra collected a different times. There are about 200 columns and 100 rows in each matrix. I want to use singular value decomposition using the  SVDEx function. I get an error every time i try to execute the code in debugguing mode:
    FATAL RUN-TIME ERROR:    The program has caused a 'General Protection' fault at 0x0342BC16.
    I believe that I am passing the incorrect arrays to SVDEx. I  was wondering if there is any example code available, so I can learn how tro do do this.
    Here is a fragment of the code where I call the function SVDEx:
    //declare the arrays to hold S U V
    double *U,*S,*V;
    int isizeS=Y_DATA_POINTS;
    int i;
    int AnalisisError=0;
    if (X_DATA_POINTS<Y_DATA_POINTS) {isizeS=X_DATA_POINTS;}
    //Allocate arrays
    U=malloc(Y_DATA_POINTS*X_DATA_POINTS*sizeof(double​));
    S=malloc(2*isizeS*sizeof(double));
    V=malloc(Y_DATA_POINTS*X_DATA_POINTS*sizeof(double​));
    AnalisisError = SVDEx (adAbsMap, Y_DATA_POINTS, X_DATA_POINTS, FULL_SIZE, U, S+isizeS, V);
    FATAL RUN-TIME ERROR:   "Visualize_12.c", line 2451, col 17, thread id 0x00000E18:   The program has caused a 'General Protection' fault at 0x0342BC16.
    Any help will be very much appreciated.
    J. Hodak

    Hi,
    Thanks for trying to find an answer. I just realized now where the probem was. My mistake was when i allocated the arrays for holding the matrices. Because i was assking SVDEx to carry out FUL SIZE decomposition I must declare the arrays U and V to be , Y_DATA_POINTS*, Y_DATA_POINTS doubles and X_DATA_POINTS*, X_DATA_POINTS doubles respectively. My code was wrong, I was declaring the sizes to be smaller than necessary and  "Visualize_12.c", line 2451, was the call to SVDEx, and col 17 was pointing t that mistake. It took me a while to realize this because the error message did not exlicitly specify that the size or the array passed was too small. Now it is working well. But I believe that it will help to have an example to get started with this.
    Thanks again,
    Fundadero.

  • Always getting errors when trying to control YOKOGAWA 7651 power supply on Labwindows/CVI

    Hi,
    I'm trying to set the voltage on the YOKOGAWA 7651 power supply through labwindows/cvi. I've set up a numeric slide on my userinterface with callback function "yoko7651dcvolts" and constant name "YOKO7651DCVOLTS".
    I always get this error when I run my program:
    "FATAL RUN-TIME ERROR: "DcSource.c", line 53, col 65, thread id 0x00001F3C: Invalid argument type: found 'pointer to double', expected 'pointer to int'."
    This error points to the third argument of the GetCtrlVal function below. The program/compiler wants me pass the variable "yoko1volts" as integer, but I want to (and should) be able to set voltages as floating numbers.
    Plus, even when I declare "yoko1volts" as integer, it stills doesn't work. All I get is zero, zero, and zero...on the power supply meter everytime I press the numeric slide.
    This is the section of the C code that is problemic:
    int CVICALLBACK yoko7651dcvolts (int panel, int control, int event,
    void *callbackData, int eventData1, int eventData2)
    double yoko1volts;
    switch (event)
    case EVENT_COMMIT:
    GetCtrlVal (yoko76511Panel, YOKO7651_1_YOKO7651DCVOLTS, &yoko1volts); // to read the values entered on the numerical meter on the user interface
    yk7651_set_volts (yoko76511Panel, yoko1volts); // set the entered values as voltage on the instrument
    break;
    return 0;
    This is the related h-file:
    #define YOKO7651_1 4
    #define YOKO7651_1_YOKO7651SWITCH 2 /* control type: binary, callback function: yoko7651switch */
    #define YOKO7651_1_YOKO7651DCVOLTS 3 /* control type: scale, callback function: yoko7651dcvolts */
    Please help, how can I fix this issue?
    All the drivers (including the YOKOGAWA 7651 power supply) are properly installed and mounted. As a matter of fact, I can successfully turn the power supply on and off with the code below:
    int CVICALLBACK yoko7651switch (int panel, int control, int event,
    void *callbackData, int eventData1, int eventData2)
    int yoko7651switchstate;
    switch (event)
    case EVENT_COMMIT:
    GetCtrlVal (yoko76511Panel, YOKO7651_1_YOKO7651SWITCH, &yoko7651switchstate);
    SetCtrlVal (yoko76511Panel, YOKO7651_1_YOKO7651SWITCH, !yoko7651switchstate);
    yk7651_output (yoko76511Panel, !yoko7651switchstate);
    break;
    return 0;
    It's just setting the voltage on the power supply that is very problematic. Any help is appreciated...Thanks.
    Solved!
    Go to Solution.

    I second Al opinion of a disconnection between the UIR and the variable that holds the panel handle.
    As a side note, I noted that the problematic line is reading the value of the controll whose callback is executed:
    #define YOKO7651_1_YOKO7651DCVOLTS 3 /* control type: scale, callback function: yoko7651dcvolts */
    int CVICALLBACK yoko7651dcvolts (int panel, int control, int event,
    void *callbackData, int eventData1, int eventData2)
    double yoko1volts;
    switch (event)
    case EVENT_COMMIT:
    GetCtrlVal (yoko76511Panel, YOKO7651_1_YOKO7651DCVOLTS, &yoko1volts); // to read the values entered on the numerical meter on the user interface
    yk7651_set_volts (yoko76511Panel, yoko1volts); // set the entered values as voltage on the instrument
    break;
    return 0;
    In a situation like this, I would try using GetCtrlVal (panel, control, &yoko1volts); instead, that should get rid of all problems in panel handle / control ID.
    Despite this solution is working, in any case I would deep into the problem as an incorrect panel handle can lead to erratical behaviour in other places of the program.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • LabWindows​/CVI is taken out of NI's front page

    I have an impression that LabWindows/CVI is listed in NI's front page as LabVIEW. 
    But it's not. 
    You have to click into Products & Services to find LabWindows.

    As mentioned by D_Biel in your post, we value the input we receive from the Idea Exchange, but there is a balance among various sources of feedback including bug fixes and compatibility. It can take time, but features do get implemented as shown with the release of CVI 2012. There may be more ideas than we have the bandwidth to implement, but I definitely think that the Idea Exchange is a step in the right direction, laying a foundation we can build off of for receiving user feedback, but with anything there is still plenty of room for improvement.
    Regards,
    Anjelica W.
    National Instruments
    Applications Engineer

  • VXI-MIO-64E-1 in LabWindows/CVI

    I am using VXI-MIO-64E-1 module for Data Acquisition of differential Signal of 0-10V. By default Module is configured in -5V to +5V. I have used  status = AI_Configure (deviceNumber, chan, inputMode, inputRange, polarity, driveAIS) function for configure module to 0-10V unipoler but  still module is taking -5V to +5V not 0-10V.  here is LabWindows/CVI code for configuration of analog input module.
        buffer = (short *)malloc ( NUMPOINTS * sizeof(short));
       status = Init_DA_Brds (1, &brd);
       if ( status != 0 )
        MessagePopup("Error","Error in initializing VXI device");
        exit(-1);
       status = SCAN_Setup (1, NUMMODULES, ChannelList, ChannelGain);
       if ( status != 0 )
        MessagePopup("Error","Error in configuring VXI device");
        exit(-1);
       status = DAQ_DB_Config (1, 1);
       status = DAQ_Config (1, 1, 0);
       status = Select_Signal (1, ND_PFI_7, ND_IN_SCAN_IN_PROG, ND_LOW_TO_HIGH);
       if ( status != 0 )
        MessagePopup("Error","Error in Configuring SCAN_START input Line");
        exit(-1);
       InitializeTimer1();
       /* Module 1 Initialization Over */
       /* Module 2 Initialization Starts */
       buffer1 = (short *)malloc ( NUMPOINTS1 * sizeof(short));
       status = Init_DA_Brds (2, &brd);
       if ( status != 0 )
        MessagePopup("Error","Error in initializing VXI device");
        exit(-1);
       status = SCAN_Setup (2, NUMMODULES1, ChannelList, ChannelGain);
       if ( status != 0 )
        MessagePopup("Error","Error in configuring VXI device 2");
        exit(-1);
       status = DAQ_DB_Config (2, 1);
       status = DAQ_Config (2, 1, 0);
       status = AI_Configure (2, -1, 0, 10, 1, 0);
       /* Module 2 Initialization Over */
    What mistake i am doing to configure module-2 to 0-10 Volt input range.

    Hello Vishnu,
    Unfortunately, the VXI-DAQ cards are no longer supported, but you can find information about using them in the manual.  The VXI-MIO Series User Manual  has details about setting the input range in Chapter 3 on page 3-4.
    Good luck with your application!
    Meghan
    Applications Engineer

  • Visual Studio or LabWindows/CVI?

    I have a bit of a dilemma.
    I currently own Visual Studio 2010, IMAQ Vision Development Module 2013, and Measurement Studio (not sure of version). I currently do all of my programming in VB.net. Because IMAQ VDM is stuck in .Net framework 3.5 and there will be no further .net development by NI, I need to plan for the future. My applications need run on Win 8, 9, 43, or whatever my company decides to migrate to from Win 7.
    My understanding is that the NI modules I currently own will work with LabWindows/CVI. Correct? I also believe I can use them with C++ using the VS IDE. Is this also correct?
    Within my applications I do a lot of interfacing with Excel, writing text files, and interfacing to non-NI devices (cameras, DAQs, scanners, etc). I am able to do these things pretty easily using VB.net using vendor-provided SDK's.
    Therefore, my question is this...given the investment I have in software already, do I gain anything by migrating to LabWindows/CVI? What do I lose?
    I should point out that regardless of the path I choose I will need to bone up on my programming skills in the corresponding language.
    Thanks for all your help!

    Hello Steverino!
    Here are some advantages when using LabWindows/CVI over Visual Studio, which make the product more suitable for various industry-related applications:
    You are correct, LabWindows/CVI integrates with the NI platform: NI hardware and software, like TestStand or LabVIEW (e.g. debugging source code from one software to another, seamlessly).
    NI hardware and third-party hardware connectivity.
    OpenMP support.
    CVI integrates with intrument control.
    CVI Run-Time benefits from User Protection.
    Run-Time checking (e.g. for uninitialized variables).
    Scientific User Interface Controls and GUI Editor.
    Advanced debugging capabilities:
    Remote debugging support from ADE.
    Real-Time debugging support from ADE.
    Memory leak detection using the LabWindows/CVI Resource Tracking Window.
    Just-In-Time debugging.
    Deployment: build custom installers and patches that you can ship as stand-alone easy-to-use installers.
    LabWindows/CVI libraries: Advanced Analysis, Toolbox, Connectivity (Network Variables, Network Streams, DataSocket), etc.
    Support for LabWindows/CVI Toolkits: SQL Toolkit, Vision, PID, RT.
    Regards,
    - Johannes.

  • Software Development Engineer positions at Hysitron, Inc. in Minneapolis (LabWindows CVI exp preferred)

    Software Development Engineer
    Hysitron, Inc. is a premier scientific instrument manufacturer. Founded in 1992 with headquarters located in Eden Prairie, MN we are committed to promoting nanotechnology by developing advanced transducer and control technology. This leadership has made Hysitron the world leader in nanomechanical test instruments. The TriboIndenter®, TriboScope®, Ubi, and other Hysitron innovations have opened new horizons for scientists interested in investigating and understanding mechanical properties of materials at nano-scale. Hysitron fosters an environment and culture where innovation flourishes, teamwork is encouraged, and superior performance is rewarded.
    Hysitron invites applications for multiple software development engineer positions from those aspiring to explore and succeed in the nano world. Hysitron, Inc. is an Equal Opportunity Employer M/F/D/V
    Job responsibilities
    The software development engineers would be responsible for developing test and measurement software applications for nano-mechanical testing instrumentation. Job deliverables would include:
    -          Develop software applications in C based Labwindows CVI for Hysitron Instrumentation
    -          Support the development of applications to address challenges in instrument automation and control
    -          Test software applications using debugging and simulation tools
    -          Perform software releases and software quality assurance activities
    -          Participate in the design of new software products
    -          Perform maintenance activities for existing products
    -          Adapt and deliver on quality software development practices
    Minimum qualifications
    -          BS in Computer Science/ Computer Engineering/ Equivalent Scientific or engineering discipline
    -          Min of 3 yrs experience in Instrumentation software development in an industrial or R&D environment
    -          Expert at programming language C, knowledge of C++
    -          Working knowledge of various communication protocols, e.g. USB, RS232, IEEE, RS485, TCP/IP, Modbus
    -          Knowledge of general software design/documentation processes in test and measurement systems
    -          Proficient problem solving skills
    -          Strong analytical and technical skills
    -          Excellent communication and interpersonal skills
    Preferred Qualifications
    -          Proficient with LabWindows CVI and XML
    -          Working experience with DSP(Code Composer Studio) and/or FPGA level programming
    -          Exposure to digital electronics and instrumentation
    -          Working experience in Robotics interface programming
    -          Experience with Controls/Automation engineering
    Application and Information
    Qualified candidates should send a letter of application and their resumes to (please include ‘SW Engineer’ in subject line):
    Hysitron, Inc.
    10025 Valley View Rd
    Eden Prairie, MN 55344 USA
    Phone: (952) 835-6366
    Fax: (952) 835-6166
    E-MAIL: [email protected]
    Web: www.hysitron.com

    This position is still accepting resumes/CVs.

  • How to use CAN256 and CAN257 in Labwindows CVI?

    I am trying to learn about CAN programming in LabWindows CVI. None of the samples do anything other than generate cryptic error messages. I do not have a card or interface device yet, but reading in the help files I found this:
    "NI-CAN provides a virtual CAN card with two interfaces, CAN256 and CAN257. The two virtual interfaces are connected by a virtual bus. When you write CAN frames to one virtual interface, those frames are received by the other virtual interface, and can be read as channels. This feature allows you to read and write CAN data in the same manner as two real CAN interfaces connected by a real CAN cable. The conversion does not require real NI CAN hardware, and your application is not required to check for specific CAN IDs."
    I modified the Waveform ouput project and add CAN256 to the dropdown in the uir file. However when I run it, I get the same error message as always, error -1074388725.
    Is there an example CVI code someplace to demonstrate the use of these virtual channels?

    Thanks Drew.
    Ultimately, my customer provided me with a WriteCAN256.vi and ReadCAN257.vi that were perfect for my needs. The WriteCAN256.vi along with my NI USB 8473s allowed me to provide data collection on multiple CAN devices and to verify that my Software can handle all data types from CAN devices.
    Note: My customer allowed me to share his .vi's. They are enclosed ...
    Best Regards,
    Don W
    Attachments:
    CanBus Read (Frames)_85.vi ‏55 KB
    CanBus Write (Frames)_85.vi ‏48 KB

Maybe you are looking for

  • Upgrade do Plano de Fotografia para o Plano Completo para Estudantes

    Olá, Gostaria de trocar o meu Plano de Fotografia pelo Plano Completo CC para Estudantes. Como faço, já que me associei ao Plano de fotografia há alguns poucos meses e o vencimento anual deste ainda está distante? Obrigado, Lucas

  • Cannot save PO

    Hi All, I have entered all the required header and item details values while creating a PO (any type) in ME21N. And now when i press either the Check icon or Save icon, Organization data and Vedor fields in the header part is getting disappered and i

  • Tcode for Purchase order Changes

    Hello Expert I Know there is one Tcode from which we could find changes happen in Purchase order at item level . Can any one let me know on the same which Tcode. I know the regular option by selecting the line item Environment->Item changes thanks Ab

  • Guest Self-Service on ISE

    hi all; dose the ISE support the  guest self-service , we are planning to broadcast Guest SSID , this SSID will redirect the Guest for self-service page to enter his mobile number , then the guest will click on subnet button , after that the ISE will

  • Sharing ripped tunes

    I have a large library of MP3s, all ripped from CDs I own. I have a shared family computer (a MacMini), and my itunes library is set up and seems peachy keen for personal use. But I want to be able to share the files I have with other members of my f