Quantcast
Channel: Measurement Studio for VC++ topics
Viewing all 652 articles
Browse latest View live

Error Code 0XFFFB38OE

$
0
0

I am trying to create a simulated PXIe-1085, and import an .ini file because the given options do not display the PXIe-1085.

 

"Could not import chassis information Error Code 0XFFFB38OE"

 


How to get Chassis serial number with system configuration C API?

$
0
0

I am able to get all of the hardware serial and alias information, but how do you specifically get the chassis itself?

Get Values from NISysCfgTimestampUTC timestamp using C API

$
0
0

Hello,

I verify External Calibration is supported by the device,

 

NISysCfgGetResourceProperty(resource, NISysCfgResourcePropertySupportsExternalCalibration, supportsECalBool);

 

 

and get a NISysCfgTimestampUTC  timestamp (struct unsigned int u32Data[4]) with zero values.

NISysCfgGetResourceProperty(resource, NISysCfgResourcePropertyInternalCalibrationLastTime, lastExtCal);

 

My initial thought is I should just grab these values where each signifies year, month, day,

NISysCfgTimestampUTC  typdef to the function below from what I understand converts to seconds from 1970.

NISysCfgValuesFromTimestamp(lastExtCal, secondsSinceEpoch1970, fractionalSeconds);

 

 

I get  a large value secondsSinceEpoch1970 = 18446744071626706816 , fractionalSeconds = 0.0000

 

What am I doing wrong?

problems adding header files

$
0
0

Hi, 

 

For my project I downloaded the Measurement software and installed the NI-488.2 drivers.

 

Now, at the end of my stdafx.h file I am trying to include the libraries from here:

 

 

#include "NiGraph3DComponent.h"
#include "Ni4882Component.h"
#include "NiCommonComponent.h"
#include "NiDAQmxComponent.h"
#include "NiDataSocketComponent.h"
#include "NiMathComponent.h"
#include "NiUiComponent.h"
#include "NiUiCommonComponent.h"
#include "NiUtilityComponent.h"
#include "NiVisaComponent.h"
using namespace NI;


However, when I try to compile it, it says all these header files cannot be found. How do I install these files or where do I find them so that I can include the libraries?

 

 

 

 

How to configure multiple AI channels scanning at differerent rates in Visual C++

$
0
0

Hi,

is it possible to scan multiple AI channels (e.g. 8) at different sampling rates each of them?

If yes, I am intersted in knowing the DAQmx C++ function that should be used to configure the rates this way.

I am using NI USB 6000-6001-6002 series cards.

Thanks.

how to check if measurement is done through SRQ

$
0
0

Here is the code, but it doesn't work, can anybody help?

 

main()

{

status = viOpenDefaultRM(&defaultRM);
status = viOpen(defaultRM, "GPIB0::18::INSTR", VI_NULL, VI_NULL, &viSA);
viSetAttribute(viSA, VI_ATTR_TMO_VALUE, 20000);
viClear(viSA);

viInstallHandler(viSA, VI_EVENT_SERVICE_REQ, myCallback, bufferHandle);
viInstallHandler(viSA, VI_EVENT_IO_COMPLETION, myCallback, bufferHandle);
viEnableEvent(viSA, VI_EVENT_SERVICE_REQ, VI_HNDLR, VI_NULL);
viEnableEvent(viSA, VI_EVENT_IO_COMPLETION, VI_QUEUE, VI_NULL);

//start porform channel power measurement....

viPrintf(viSA, ":INITiate:CHPower\n");
status = viWaitOnEvent(viSA, VI_EVENT_IO_COMPLETION, 30000, &etype, &eventContext);

 

if (status < VI_SUCCESS) {
/* Waveform not received...exiting */
free(bufferHandle);
viClose(defaultRM);
return;
}

//try to fetch channel power here, but it never get there.

viPrintf(viSA, ":FETCH:CHP:CHP?\n");
viRead(viSA, (ViBuf)buf, 20, &numRead);
}

 

//callback

ViStatus _VI_FUNCH myCallback(ViSession vi, ViEventType etype, ViEvent eventContext, ViAddr userHandle)
{

ViJobId jobID;
ViStatus status;
ViUInt16 stb;
status = viReadSTB(vi, &stb);
status = viReadAsync(vi, (ViBuf)userHandle, 1024, &jobID);
return VI_SUCCESS;

}

 

nivirtualbench.lib for Borland C++ builder

$
0
0

I am working on a project which involves integrating Virtual Bench into an existing desktop application that was developed by our customer using Borland C++ Builder.

I have run the virtual bench installer "NIVirtualBench1700f0.exe" and I have been able to operate the virtual bench using the packaged application. Also I have compiled the example code provided under visual studio and it is working fine.

But I am unable to link the virtual bench library when I compile using Borland C++ Builder. I have checked the install path for the library and found that the file named "nivirtualbench.lib" is missing from the ni folder where the borland library should be.

I attached screen shots below showing the folder locations for both the borland and visual studio library files.

It looks like the library is missing.

Does anyone know where I might be able to download the Borland library for virtual bench?

Capture_1.PNGCapture_2.PNG

DAQmx compatibility with MSVC 2015 compiler

$
0
0

Dear all,

 

I'm trying to realize a software in Cpp using the compiler MSVC 2015 64bit. But apparently the Nidaq.lib provided with my NI pcie card was compiled by a 32bit compiler (probably gcc since my testing software works properly when I use Mingw 32bits). is there another lib compiled for 64 bits compilers somewhere?

thanks in advance for you help


C sample to send CAM Message via Xnet and USB-8502 device

$
0
0

We have an USB-8502 with one CAN port. We are using it to communicate with an automobile ECU. We can successfully send and receive messages using NI-XNET Bus Monitor.

 

Now we need to make a C application to exchange custom CAN messages with the ECU via the USB-8502. Could you please help us with an sample code ?

Checking device state through ANSI C

$
0
0

Hello,
Hardware: cDAQ-9174 with three modules, NI 9263(Outputs) and 2x NI 9215(Inputs).


In NI Max I can see the 'Status' of my devices and their modules, if they're plugged in or not.
I'd like to know how to get this device's status. In particular if it is connected to the computer, so I can tell the user "Duh.. the device isn't plugged in.". I should be able to tell if a device is disconnected or not and what modules are physically installed and in which slot. I've looked at DAQmx's functions NI-DAQmx C Reference Help for one that would report a "status" like property, but I couldn't find one.
Most device properties report the same independently of the device being connected to the computer or not, simply reports what's configured in NI Max.

Thanks

read timestamp from DAQ device

$
0
0

hi everyone

i need help...

i use the NI-PCI 6225 card.

I want to read the 1000 samples with the time of each sample.I used 

DAQmxConfigurLogging C API, but in the TDMS file that was generated, there was no time for each sample.

What should I do to achieve this?

Thanks

Signal acquiring C program does not work for DAQmxBase on macos using daq 6008

$
0
0

So I am new to daqmxBase and daq .

 

What I want to achieve:

- To simply record voltage from the analog input channel of my daq device ( NI DAQ 6008 )

- Use a C program to do the same and compile it using  clang or gcc at the "terminal" of my macos

 

Software Details:

- macos High Sierra 10.13.3

- downloaded the nidaqmxBase 15 software for macos

 

C Program that I am trying to compile

http://www.ni.com/tutorial/5409/en/

- this code basically includes "NIDAQmx.h" which gives off an error so I changed it to "nidaqmxbase/NIDAQmxBase.h"

- also I changed all DAQmx functions to DAQmxBase functions

 

THE ERROR

- The C program simply would not compile and give the following error:

Undefined symbols for architecture x86_64:

  "_DAQmxBaseCfgSampClkTiming", referenced from:

      _main in daqmirror-da73d6.o

  "_DAQmxBaseClearTask", referenced from:

      _main in daqmirror-da73d6.o

  "_DAQmxBaseCreateAIVoltageChan", referenced from:

      _main in daqmirror-da73d6.o

  "_DAQmxBaseCreateTask", referenced from:

      _main in daqmirror-da73d6.o

  "_DAQmxBaseGetExtendedErrorInfo", referenced from:

      _main in daqmirror-da73d6.o

  "_DAQmxBaseReadAnalogF64", referenced from:

      _main in daqmirror-da73d6.o

  "_DAQmxBaseStartTask", referenced from:

      _main in daqmirror-da73d6.o

  "_DAQmxBaseStopTask", referenced from:

      _main in daqmirror-da73d6.o

ld: symbol(s) not found for architecture x86_64

 

 

I am new to C as well as the daqmxBase library so could you please suggest at to what is causing this error?

The code was directly copy pasted from the ni website and still it fails to compile.

Also, none of the examples compile . They too give the same error.

Synchronization routines for PXIe-6368 Cards

$
0
0

Hi all

I have installed PXIe-1085 chassis with 03 PXIe-6368 cards and am trying to synchronize them in C++ but not successful yet. On the NI Discussion forum, i have found one synchronization method "Reference Clock Synchronization" in a relevant article http://zone.ni.com/devzone/cda/tut/p/id/11369.

 

I need some help how to write C APIs equivalent to VI shown in figure-8 of above article please 

 

Thanks

Error running NI-DAQmx ANSI C example in Windows 7

$
0
0

Hi,

I am facing some problem while compiling a DAQmx example modified by me.

please see the attachment and help me in correcting it.

The errors are as follow:

 1    IntelliSense: expected a ';'   

 2    IntelliSense: return value type does not match the function type  

 

I am using visual studio 2010 and labview 2017

Also I am totally new in this DAQmx coding so please suggest me some source from where I can find the function of DAQmx and its basic working.

Thanks in advance...

Regards,

Nikhil Kumar

Student at IITG

 

Acquiring waveform using DSOZ204A, VC++ and Visa library

$
0
0

Hello everyone,

 

I'm actually trying to acquire a waveform of my infiniium DSOZ204A from Keysight.

I use the Visa Library 32bit and VC++ 2008 express edition.

I've copied, pasted and modified the code given by Keysight in their documentation. After a few bug correction the communication was established and I was able to modify some attributes.

But, when the acquiring process comes everything goes wrong. I send the command :WAVeformSmiley Very HappyATA? to access the buffer where the data is and when it comes to the reading part I have an error : "VISA error: a format specifier in the format string is not valid". Then, a security implemented by Keysight in the code tell me that the IEEE block buffer is full.

Does anyone know where the problem is?

 

I thought the problem could come from the runtime Library, but obviously not. Maybe a pointer is not well defined...

 

Please find the code:

/*
 * Keysight VISA Example in C
 * ------------------------------------------------------------------
 * This program illustrates a few commonly-used programming
 * features of your Keysight Infiniium Series oscilloscope.
 */

#include <stdio.h>            /* For printf(). */
#include <string.h>           /* For strcpy(), strcat(). */
#include <time.h>             /* For clock(). */
#include <visa.h>             /* Keysight VISA routines. */

#define VISA_ADDRESS "TCPIP0::141.121.237.226::hislip0::INSTR"
#define IEEEBLOCK_SPACE 5000000

/* Function prototypes */
void initialize(void);          /* Initialize to known state. */
void capture(void);             /* Capture the waveform. */
void analyze(void);             /* Analyze the captured waveform. */

void do_command(char *command);        /* Send command. */
int do_command_ieeeblock(char *command); /* Command w/IEEE block. */
void do_query_string(char *query);     /* Query for string. */
void do_query_number(char *query);     /* Query for number. */
void do_query_numbers(char *query);     /* Query for numbers. */
int do_query_ieeeblock(char *query);   /* Query for IEEE byte block. */
int do_query_ieeeblock_words(char *query);   /* Query for word block. */
void check_instrument_errors();        /* Check for inst errors. */
void error_handler();                  /* VISA error handler. */

/* Global variables */
ViSession defaultRM, vi;        /* Device session ID. */
ViStatus err;                   /* VISA function return value. */
char str_result[256] = {0};     /* Result from do_query_string(). */
double num_result;              /* Result from do_query_number(). */
unsigned char ieeeblock_data[IEEEBLOCK_SPACE];   /* Result from
                                   do_query_ieeeblock(). */
signed short ieeeblock_data_words[IEEEBLOCK_SPACE];   /* Result from
                                   do_query_ieeeblock_words(). */
double dbl_results[10];         /* Result from do_query_numbers(). */

/* Main Program
 * --------------------------------------------------------------- */
void main(void)
{
  /* Open the default resource manager session. */
  err = viOpenDefaultRM(&defaultRM);
  if (err != VI_SUCCESS) error_handler();

  /* Open the session using the oscilloscope's VISA address. */
  err = viOpen(defaultRM, VISA_ADDRESS, VI_NULL, VI_NULL, &vi);
  if (err != VI_SUCCESS) error_handler();

  /* Set the I/O timeout to fifteen seconds. */
  err = viSetAttribute(vi, VI_ATTR_TMO_VALUE, 15000);
  if (err != VI_SUCCESS) error_handler();

  /* Clear the interface. */
  err = viClear(vi);
  if (err != VI_SUCCESS) error_handler();

  /* Initialize - start from a known state. */
  initialize();

  /* Capture data. */
  capture();

  /* Analyze the captured waveform. */
  analyze();

  /* Close the vi session and the resource manager session. */
  viClose(vi);
  viClose(defaultRM);
}

/* Initialize the oscilloscope to a known state.
 * --------------------------------------------------------------- */
void initialize (void)
{
  /* Clear status. */
  do_command("*CLS");

  /* Get and display the device's *IDN? string. */
  do_query_string("*IDN?");
  printf("Oscilloscope *IDN? string: %s\n", str_result);

  /* Load the default setup. */
  do_command("*RST");
}

/* Capture the waveform.
 * --------------------------------------------------------------- */
void capture (void)
{
  int num_values;
  FILE *fp;

  /* Set probe attenuation factor. */
  do_command(":CHANnel1:PROBe 1.0");
  do_query_string(":CHANnel1:PROBe?");
  printf("Channel 1 probe attenuation factor: %s\n", str_result);

  /* Use auto-scale to automatically configure oscilloscope. */
  do_command(":AUToscale");

  /* Set trigger mode. */
  do_command(":TRIGger:MODE EDGE");
  do_query_string(":TRIGger:MODE?");
  printf("Trigger mode: %s\n", str_result);

  /* Set EDGE trigger parameters. */
  do_command(":TRIGger:EDGE:SOURCe CHANnel1");
  do_query_string(":TRIGger:EDGE:SOURce?");
  printf("Trigger edge source: %s\n", str_result);

  do_command(":TRIGger:LEVel CHANnel1,-2E-3");
  do_query_string(":TRIGger:LEVel? CHANnel1");
  printf("Trigger level, channel 1: %s\n", str_result);

  do_command(":TRIGger:EDGE:SLOPe POSitive");
  do_query_string(":TRIGger:EDGE:SLOPe?");
  printf("Trigger edge slope: %s\n", str_result);

  /* Save oscilloscope setup. */

  /* Read system setup. */
  num_values = do_query_ieeeblock(":SYSTem:SETup?");
  printf("Read setup string query (%d bytes).\n", num_values);

  /* Write setup string to file. */
  fp = fopen ("c:\\scope\\config\\setup.stp", "wb");
  num_values = fwrite(ieeeblock_data, sizeof(unsigned char), num_values,
    fp);
  fclose (fp);
  printf("Wrote setup string (%d bytes) to ", num_values);
  printf("c:\\scope\\config\\setup.stp.\n");

  /* Change settings with individual commands:
  
  /* Set vertical scale and offset. */
  do_command(":CHANnel1:SCALe 0.1");
  do_query_string(":CHANnel1:SCALe?");
  printf("Channel 1 vertical scale: %s\n", str_result);

  do_command(":CHANnel1:OFFSet 0.0");
  do_query_string(":CHANnel1:OFFSet?");
  printf("Channel 1 offset: %s\n", str_result);

  /* Set horizontal scale and offset. */
  do_command(":TIMebase:SCALe 0.0002");
  do_query_string(":TIMebase:SCALe?");
  printf("Timebase scale: %s\n", str_result);

  do_command(":TIMebase:POSition 0.0");
  do_query_string(":TIMebase:POSition?");
  printf("Timebase position: %s\n", str_result);

  /* Set the acquisition mode. */
  do_command(":ACQuire:MODE RTIMe");
  do_query_string(":ACQuire:MODE?");
  printf("Acquire mode: %s\n", str_result);

  /* Or, set up by loading a previously saved setup. */

  /* Read setup string from file. */
  fp = fopen ("c:\\scope\\config\\setup.stp", "rb");
  num_values = fread (ieeeblock_data, sizeof(unsigned char),
    IEEEBLOCK_SPACE, fp);
  fclose (fp);
  printf("Read setup string (%d bytes) from file ", num_values);
  printf("c:\\scope\\config\\setup.stp.\n");

  /* Restore setup string. */
  num_values = do_command_ieeeblock(":SYSTem:SETup", num_values);
  printf("Restored setup string (%d bytes).\n", num_values);

  /* Set the desired number of waveform points,
   * and capture an acquisition. */
  do_command(":ACQuire:POINts 32000");
  do_command(":DIGitize");
}

/* Analyze the captured waveform.
 * --------------------------------------------------------------- */
void analyze (void)
{
  double wav_format;
  double acq_type;
  double wav_points;
  double avg_count;
  double x_increment;
  double x_origin;
  double y_increment;
  double y_origin;

  FILE *fp;
  int num_values;   /* Number of bytes returned from instrument. */
  int i;

  /* Make measurements.
   * ------------------------------------------------------------- */
  do_command(":MEASure:SOURce CHANnel1");
  do_query_string(":MEASure:SOURce?");
  printf("Measure source: %s\n", str_result);

  do_command(":MEASure:FREQuency");
  do_query_number(":MEASure:FREQuency?");
  printf("Frequency: %.4f kHz\n", num_result / 1000);

  do_command(":MEASure:VAMPlitude");
  do_query_number(":MEASure:VAMPlitude?");
  printf("Vertical amplitude: %.2f V\n", num_result);

  /* Download the screen image.
   * ------------------------------------------------------------- */

  /* Read screen image. */
  num_values = do_query_ieeeblock(":DISPlay:DATA? PNG");
  printf("Screen image bytes: %d\n", num_values);

  /* Write screen image bytes to file. */
  fp = fopen ("c:\\scope\\data\\screen.png", "wb");
  num_values = fwrite(ieeeblock_data, sizeof(unsigned char), num_values,
    fp);
  fclose (fp);
  printf("Wrote screen image (%d bytes) to ", num_values);
  printf("c:\\scope\\data\\screen.bmp.\n");

  /* Download waveform data.
   * ------------------------------------------------------------- */

  /* Get the waveform type. */
  do_query_string(":WAVeform:TYPE?");
  printf("Waveform type: %s\n", str_result);

  /* Get the number of waveform points. */
  do_query_string(":WAVeform:POINts?");
  printf("Waveform points: %s\n", str_result);

  /* Set the waveform source. */
  do_command(":WAVeform:SOURce CHANnel1");
  do_query_string(":WAVeform:SOURce?");
  printf("Waveform source: %s\n", str_result);

  /* Choose the format of the data returned: */
  do_command(":WAVeform:FORMat WORD");
  do_query_string(":WAVeform:FORMat?");
  printf("Waveform format: %s\n", str_result);

  /* Display the waveform settings: */
  do_query_number(":WAVeform:XINCrement?");
  x_increment = num_result;
  printf("Waveform X increment: %e\n", x_increment);

  do_query_number(":WAVeform:XORigin?");
  x_origin = num_result;
  printf("Waveform X origin: %e\n", x_origin);

  do_query_number(":WAVeform:YINCrement?");
  y_increment = num_result;
  printf("Waveform Y increment: %e\n", y_increment);

  do_query_number(":WAVeform:YORigin?");
  y_origin = num_result;
  printf("Waveform Y origin: %e\n", y_origin);

  /* Read waveform data. */
  num_values = do_query_ieeeblock_words(":WAVeform:DATA?");
  printf("Number of data values: %d\n", num_values);

  /* Open file for output. */
  fp = fopen("c:\\scope\\data\\waveform_data.csv", "wb");

  /* Output waveform data in CSV format. */
  for (i = 0; i < num_values - 1; i++)
  {
    /* Write time value, voltage value. */
    fprintf(fp, "%9f, %6f\n",
      x_origin + ((float)i * x_increment),
      ((float)ieeeblock_data_words[i] * y_increment) + y_origin);
  }

  /* Close output file. */
   fclose(fp);
   printf("Waveform format WORD data written to ");
   printf("c:\\scope\\data\\waveform_data.csv.\n");
}

/* Send a command to the instrument.
 * --------------------------------------------------------------- */
void do_command(command)
char *command;
{
  char message[80];

  strcpy(message, command);
  strcat(message, "\n");
  err = viPrintf(vi, message);
  if (err != VI_SUCCESS) error_handler();

  check_instrument_errors();
}

/* Command with IEEE definite-length block.
 * --------------------------------------------------------------- */
int do_command_ieeeblock(command, num_bytes)
char *command;
int num_bytes;
{
  char message[80];
  int data_length;

  strcpy(message, command);
  strcat(message, " #8%08d");
  err = viPrintf(vi, message, num_bytes);
  if (err != VI_SUCCESS) error_handler();

  err = viBufWrite(vi, ieeeblock_data, num_bytes, &data_length);
  if (err != VI_SUCCESS) error_handler();

  check_instrument_errors();

  return(data_length);
}

/* Query for a string result.
 * --------------------------------------------------------------- */
void do_query_string(query)
char *query;
{
  char message[80];

  strcpy(message, query);
  strcat(message, "\n");

  err = viPrintf(vi, message);
  if (err != VI_SUCCESS) error_handler();

  err = viScanf(vi, "%t", str_result);
  if (err != VI_SUCCESS) error_handler();

  check_instrument_errors();
}

/* Query for a number result.
 * --------------------------------------------------------------- */
void do_query_number(query)
char *query;
{
  char message[80];

  strcpy(message, query);
  strcat(message, "\n");

  err = viPrintf(vi, message);
  if (err != VI_SUCCESS) error_handler();

  err = viScanf(vi, "%lf", &num_result);
  if (err != VI_SUCCESS) error_handler();

  check_instrument_errors();
}

/* Query for numbers result.
 * --------------------------------------------------------------- */
void do_query_numbers(query)
char *query;
{
  char message[80];

  strcpy(message, query);
  strcat(message, "\n");

  err = viPrintf(vi, message);
  if (err != VI_SUCCESS) error_handler();

  err = viScanf(vi, "%,10lf\n", dbl_results);
  if (err != VI_SUCCESS) error_handler();

  check_instrument_errors();
}

/* Query for an IEEE definite-length byte block result.
 * --------------------------------------------------------------- */
int do_query_ieeeblock(query)
char *query;
{
  char message[80];
  int data_length;

  strcpy(message, query);
  strcat(message, "\n");
  err = viPrintf(vi, message);
  if (err != VI_SUCCESS) error_handler();

  data_length = IEEEBLOCK_SPACE;
  err = viScanf(vi, "%#b\n", &data_length, ieeeblock_data);
  if (err != VI_SUCCESS) error_handler();

  if (data_length == IEEEBLOCK_SPACE )
  {
    printf("IEEE block buffer full: ");
    printf("May not have received all data.\n");
  }

  check_instrument_errors();

  return(data_length);
}

/* Query for an IEEE definite-length word block result.
 * --------------------------------------------------------------- */
int do_query_ieeeblock_words(query)
char *query;
{
  char message[80];
  int data_length;

  strcpy(message, query);
  strcat(message, "\n");
  err = viPrintf(vi, message);
  if (err != VI_SUCCESS) error_handler();

  data_length = IEEEBLOCK_SPACE;
  err = viScanf(vi, "%#hb\n", &data_length, ieeeblock_data_words);
  if (err != VI_SUCCESS) error_handler();

  if (data_length == IEEEBLOCK_SPACE )
  {
    printf("IEEE block buffer full: ");
    printf("May not have received all data.\n");
  }

  check_instrument_errors();

  return(data_length);
}

/* Check for instrument errors.
 * --------------------------------------------------------------- */
void check_instrument_errors()
{
  char str_err_val[256] = {0};
  char str_out[800] = "";

  err = viQueryf(vi, ":SYSTem:ERRor? STRing\n", "%t", str_err_val);
  if (err != VI_SUCCESS) error_handler();
  while(strncmp(str_err_val, "0,", 2) != 0 )
  {
    strcat(str_out, ", ");
    strcat(str_out, str_err_val);
    err = viQueryf(vi, ":SYSTem:ERRor? STRing\n", "%t", str_err_val);
    if (err != VI_SUCCESS) error_handler();
  }

  if (strcmp(str_out, "") != 0)
  {
    printf("INST Error%s\n", str_out);
    err = viFlush(vi, VI_READ_BUF);
    if (err != VI_SUCCESS) error_handler();
    err = viFlush(vi, VI_WRITE_BUF);
    if (err != VI_SUCCESS) error_handler();
  }
}

/* Handle VISA errors.
 * --------------------------------------------------------------- */
void error_handler()
{
  char err_msg[1024] = {0};

  viStatusDesc(vi, err, err_msg);
  printf("VISA Error: %s\n", err_msg);
  if (err < VI_SUCCESS)
  {
    exit(1);
  }
}

 

 


OnImageGrabbed event handler will call off on particular time on camera running?

$
0
0

i am using basler acA4600-10uc camera device. when i connect the camera to recording , OnImageGrabbing event handler will call off on suddenly 

i don't know why to happen. when i set the high resolution  camera to recording the live image or video.i try all other possible way to solve this problem in my side. i don't  know have any problem in camera device or hardware. can anyone help me to solve this problem pls.

Acquiring analogue input data before event is fired (DAQmxRegisterEveryNSamplesEvent)

$
0
0

In short: I wonder if it is possible to fire the event callback before the 'nSamples' are reached?

 

Right now I am acquiring data via the DAQmxRegisterEveryNSamplesEvent every nSamples, which works just fine. However if I finish my measurements at any given time, I will have some remaining samples in the buffer. This data I'd like to access as well.

 

The information for DAQmxRegisterEveryNSamplesEvent states:

'When you stop a task explicitly any pending events are discarded. For example, if you call DAQmxStopTask then you do not receive any pending events.'

Therefore I believe I'll miss out on this data, even though I haven't actually stopped the task yet. 

 

http://zone.ni.com/reference/en-XX/help/370471AE-01/daqmxcfunc/daqmxregistereverynsamplesevent/ 

 

Migrating legacy application from VS2003 Measurement studio on windows server 2003 x86 to VS2010 measurement studio windows server 2012 x64

$
0
0

Hi Team,

 

We have a legacy software utility which we are planning to Migrate from Visual Studio 2003 to Visual Studio 2010. Migration will be from Windows Server 2003(x86) to target platform Windows Server 2012(x64).

In Windows Server 2003(x86), below are the MeasurementStudio components used in our software,

  • cwui.ocx
  • instrsup.dll
  • mesa.dll

 Could you please provide us supported version of MeasurementStudio for Visual Studio 2010 and Windows Server 2012 x64-bit platform?

 

Thanks & Regards,

Vijayakumar R

Trigger Multiple C Series 9234 at same rate

$
0
0

Hello all,

 

I am very new to NI development.  I have a task in which I have 3 NI 9234 modules that I would like to trigger at the same time and collect a certain amount of data .  I am hoping to do this in C/C++ using the DAQmx libraries, but having trouble finding a good example in the various other programs.  

 

My first task would be to collect a finite set of samples at the same time using the 3 modules (aka, Dev1/a0, Dev2/a0, Dev3/a0).

My second task would be to trigger the collect with an external pulse (similar to the pulse generation example project).

 

Please let me know if this is possible.

I will continue to look into this, but have difficulty getting the task to run properly. 

Thank you,

Kevin

Support for legacy software migration

$
0
0

Hi,

 

We have a legacy software application currently running in Windows 2003 server (x86) which we are planning to move it to Windows 2012 server.

 

Our existing application uses the below mentioned MeasurementStudio components v6.0.3.597.

1. cwui.ocx
2. instrsup.dll
3. mesa.dll

 

Please let us know whether the same version of the MeasurementStudio components (32-bit) will be supported in Windows 2012 Server?

 

Regards,

Tamil Selvan.

Viewing all 652 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>