Jump to content

bandersen

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by bandersen

  1. QUOTE (Wendy L @ Nov 1 2008, 03:56 AM)

    Hello banderson,

    LabWindows/CVI does install two Visual Studio project wizards:

    LabWindows/CVI Project - A project for creating an application that incorporates the LabWindows/CVI run-time libraries

    LabWindows/CVI Conversion - Converts an existing LabWindows/CVI project into a Visual C++ project

    These appear in the Visual C++>>LabWindows/CVI section of the New project dialog in Visual Studio (once you install LabWindows/CVI).

    These wizards do not support Visual Studio 2008.

    We are actively working on a new version of LabWindows/CVI that will support the latest version of Visual Studio (i.e using CVI libraries in VS08, and using the VS08/MFC 9.0 compiler within CVI). This version should release by the end of the year.

    Also, since it seems that you are a C/C++ Visual Studio developer, something to note is that we are also actively working on releasing a version of Measurement Studio that supports C++/MFC 9.0 in Visual Studio 2008 (class libraries, Data acquisition and instrument control APIs, integration etc). This release will come out the same time as the new version of CVI referenced above. If you have SSP, you'll get the new version automatically. If you need beta versions of CVI or Measurement Studio, feel free to contact me at wendy(dot)logan(at)ni(dot)com.

    Note: .NET in VS 2008 is already supported by Measurement Studio, NI-DAQmx, VISA, GPIB, and the modular instruments drivers such as NI-Scope.

    Thanks

    Wendy L

    Product Manager - LabWindows/CVI and Measurement Studio

    Hi

    And thanks for the answers. I have been told that it is possible to include the .h files from Labview and then use these files to do the drawing of the graph. I have also solved the linker problem. But now I get a -10 error when I try to use PlotWaveform. Could you please have a look at my code:

    #include "stdafx.h"

    #include <stdio.h>

    #include <winsock2.h>

    #include <stdlib.h>

    #include <utility.h>

    #include <ansi_c.h>

    #include <cvirte.h>

    #include <userint.h>

    if (InitCVIRTE (0, 0,0)==0)

    return -1; //Out of memory

    int panelHandle = NewPanel(parentPanel,"Graph",top,left,height,with);

    printf("panelHandle: %d\n",panelHandle);

    int nNewCtrl = NewCtrl(panelHandle,CTRL_NUMERIC,0,10,10);

    printf("nNewCtrl: %d\n",nNewCtrl);

    DisplayPanel (panelHandle);

    int PlotWaveform_RETURN_VALUE = PlotWaveform (panelHandle, nNewCtrl, myArray,4,VAL_DOUBLE,1.0,0.0,0.0,1.0,VAL_FAT_LINE,VAL_DOTTED_SOLID_SQUARE,VAL_SOLID,1,VAL_RED);

    printf("PlotWaveform_RETURN_VALUE: %d\n",PlotWaveform_RETURN_VALUE);

    RefreshGraph (panelHandle, nNewCtrl);

    The result when I run the program is the following:

    panelHandle: 1

    nNewCtrl: 2

    PlotWaveform_RETURN_VALUE: -10

    What is the problem with the PlotWaveform function, what does the -10 error indicate?

    BR

    Benjamin

  2. Hi

    I want to use the following Labview/CVI commando: PlotWaveform in Visual Studio 2008.

    I have included the following files:

    #include "stdafx.h"

    #include <stdio.h>

    #include <winsock2.h>

    #include <stdlib.h>

    #include <utility.h>

    #include <ansi_c.h>

    #include <cvirte.h>

    #include <userint.h>

    I have linked to the following Labview DLL files: WS2_32.lib labview.lib lvsb.lib

    I have the following relevant commands in my project:

    //Setup CVI

    if (InitCVIRTE (0, 0,0)==0)

    return -1; //Out of memory

    // Plot waveform

    PlotWaveform (panelHandle, PANEL_GRAPH, waveformPtr,

    numberofpoints, VAL_DOUBLE, 1.0,0.0,InitialX,

    XInitial,VAL_THIN_LINE,VAL_NO_POINT, VAL_SOLID, 1, VAL_BLUE);

    // Refresh graph now

    RefreshGraph (panelHandle, PANEL_GRAPH);

    But I get the follownig error:

    Error 1 error LNK2001: unresolved external symbol _InitCVIRTEEx@12

    Error 2 error LNK2001: unresolved external symbol _PlotWaveform@72

    Error 3 error LNK2001: unresolved external symbol _RefreshGraph@8

    I donĀ“t understand the error, could it bee a linker problem?

    Does anyone understand the errors? Or do you have a guide for how you use Labview commands in Visual Studio?

    I have used the following guide:

    http://www.ni.com/pdf/manuals/370109b.pdf

    But I ended up with the errors I explained.

    BR

    Benjamin

×
×
  • Create New...

Important Information

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