Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
2 ratings:
 4 out of 5     Rate this Document

DIG_Change_Message_Config with PCI-6527 Card Doesn't Work with Visual C++

Primary Software: Driver Software>>NI-DAQ
Primary Software Version: 6.9.1
Primary Software Fixed Version: N/A
Secondary Software:

Problem: DIG_Change_Message_Config does not work in the Visual C++ programming enviroment with the PCI-6527. When I try to use this function, it gives me an application error. Why does this happen, and how can I avoid this error?

Solution: The problem is caused by the channel string parameters in the DIG_Change_Message_Config. During the parsing of these strings, NIDAQ will try to modify them, so if a string is stored in read-only memory, this operation will result in the memory write exception. Depending on the compiler and Operating System, a constant string may be stored in read-only memory as it is the case with Visual C++. To correct this problem, just allocate an array of type Char for the two strings parameters as follows:

char riseStr[4] = {"0.0");
char fallStr[4] = {"0.1");

DIG_Change_Message_Config(devNum,1,riseStr,fallStr,0,0,0);

Related Links:

Attachments:





Report Date: 09/25/2001
Last Updated: 12/28/2001
Document ID: 2DOA7VN5

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit