Quantcast
Channel: LabWindows/CVI topics
Viewing all 5355 articles
Browse latest View live

FPGA Interface C API 2.0 NiFpga_Open

$
0
0

According NiFpga_Open documentation : 

 

NiFpga_Status NiFpga_Open(const char* bitfile, const char* signature, const char* resource, uint32_t attribute, NiFpga_Session* session)

Opens a session to the FPGA. This call ensures that the contents of the bitfile are programmed to the FPGA. 

 

All the API functions use session as input parameters.

 

Here is my question : I would like to have 2 different software :

- one to download the fpga software (using NiFpga_Open)

- one to monitore the I/O (using NiFpga_ Read, Write etc.. but not NiFpga_Open).

 

Is it possible ?

 

In other words, one the FPGA is downloaded, I would like to shut down the PC. And next time it starts, I would like to use the second software without having to download again the software in the FPGA.

 

If I memorize the session value after using NiFpga_Open, can I use it in an other software ??

 

Thanks.


FPGA Interface C API 2.0 NiFpga_Open (download)

$
0
0

Does the function NiFpga_Open download systematically the specified bitfile ?

 

If the bitfile is already in the FPGA, does NiFpga_Open download the bitfile if it is the same ?

 

Thanks.

Use the sound board with CVI/Labwindows

$
0
0

Hello,

 

How can I do for use the sound board with CVI/Labwindows. I would like read and write analog wave with my computer.

 

Thank you,

Best Regard.

 

Romain7283

DataSocket Error when Used with Multi-thread

$
0
0

When I used DS_SetDataValue() function in the thread A that started instantly after openEX() function to connect with the DataSocket Server, the Server could receive the data and the DS_SetDataValue() function of client ran correctly. But when I ran DS_SetDataValue() function in the thread A that started long afer the connection with DataSocker Server (that is to say I ran a data acquiring callback function between the connection and writing operation to the DataSocket Server, and the thread A was started at the end of data acquiring callback function), there always was a error "NON-FATAL RUN-TIME ERROR:   "cam.c", line 1087, col 13, thread id 0x000008BC, function id 1:   Function DS_SetDataValue: (return value == -2147024809 [0x80070057]). 参数不正确。" 

Any ideas why this happens?

 

Thanks!

Windows Firewall and Ethernet

$
0
0

Hello,

 

I need to know what Windows Firewall rules need to be set for TestStand/CVI to see the ARP protocol. We see nothing, no ethernet traffic.

 

I have a system (Army Gold Master 7, using TestStand and CVI) that has "standard" government firewall rules. We are trying to communicate over Ethernet to specialized devices and we see no traffic unless we disable the firewall. We are not on the internet (not allowed by gov). The specialized devices send out a broadcast for request for IP but the software never sees it.

 

I've added rules (inbound and outbound) to allow traffic to and from my application (CVI application that does a lot of TestStand active X calls). In the logs I saw something about cviproxy so I set rules to allow that. I've set allow rules for TestStand Runtime engine. I've also turned off Windows defender.

 

Any suggestions? BTW, we will not be allowed to turn off the firewall once it's deployed.

 

Thanks

Run-time Moveable Control resource leaks

$
0
0

Hi,

 

I've noticed a small resource leak issue with the Run-time Movable Control library (movectrl.fp).  The issue comes up when a control is made movable, then later the MOVECTRL_ATTR_ENABLED attribute is set to 0 to make the control non-movable, and then the control is discarded, either directly or by discarding the panel that the control is on.  

 

Diving into the source code for the instrument, the reason is clear.  In the callback function DynamicCtrlCallback(...) which is chained to the control that is made movable, the first thing that happens is a check that the movable attribute is set, and if not, the function bails out with an early return.  The problem is that after this there is the handler for EVENT_DISCARD, that frees up the resources used by the movable control.  The problem is that if the movable attribute is not set, when the control is discarded the handler for the EVENT_DISCARD is never reached and therefore the resources are not freed.

 

I thought I would post this to let anyone using the Run-time Movable Controls library that as a workaround you should set the MOVECTRL_ATTR_ENABLED to enabled before discarding a movable control as to not leak memory.  And so that hopefully NI can fix this in a future release :smileywink:.

 

Thanks.

DisplayPanel: but the panel don't appears

$
0
0

hello, this is my problem:

some times when my application is running for a few minuts, when I use the DisplayPanel function , the panel don´t appears at screen.

I capture the return result of the operation, but this is the result:

DISPLAY PANEL STATUS[0]: No error has occurred

but the pannel don´t appears.

An idea of the problem?

thanks

 

 

How to send commands to command button to look like an event

$
0
0

Hi all

I am trying to find the proper way to send a software command to a command button.

For example say you have a simple (OK) command button, within that command button the callback function has multiple lines of code that are run from within that one callback.

Now what I want to do is call the (OK) button in another function as if the user pushed the button without effectively having the function to wait for all the process in the (OK) callback to finish, I want it to call the (OK) button and get out of its function and continue on.

What I have seems to work but I am not sure if this is the proper way of coding it.

Code sample to turn on =1and off 0:    OK Callback (panelnumber =2, controlnumber = 2, event=2 , callback= NULL, event1=0, event2=0)

if(ON)

{

SetCtrlVal(panelmain, PANELMAIN_OK,ON)

OK(2,2,2,NULL,0,0);

 }

else

{

SetCtrlVal(panelmain, PANELMAIN_OK,OFF)

OK(2,2,2,NULL,0,0);

}

 

 


Opengl solution compatible in 32 bits and 64 bits systems

$
0
0

hello,

I used cviogl instrument of Labwindows CVI 2010 for OpenGL visualisation in 32 bits systems. But, this instrument is not compatible for 64 bits systems.  I just wana know if there is a OpenGL solution 32bit and 64 bit compatible?

thanks in advance.

Julio

labwindows win7 issue

$
0
0

Hello,

 I have a problem,if I build the distibution in win7 and it will fail if run the program in XP,  if I build the distibution in XP,it can run the program in XP.

 

I compare the difference between win7 distribution package and XP,  some dll's version is different,like the "IPHLPAPI.dll""WS2_32.dll",  and these 2 dlls are added to distribution package automatically,I can not manually add the " right dlls" to distribution package which can run in xp,

how can I do?

how to reduce the process time of function [GetGlobalMouseState ();]?

$
0
0

I use a function of

GetGlobalMouseState (NULL, &globalX, &globalY, &leftBtn, &rightBtn,
                             &keyStates);

to check the keystates in order to find out which is being pressed. however, after the program starts to run, this function starts to take more and more time to process, making the entire program slower.

how do i get rid of this time issue?

How to prevent a union field selecting window at the debug time?

$
0
0

Using the GetDiskFreeSpaceEx() API to get the disk free space volume at the debug time, it always popup such a window:

 

捕获.jpg

 

I'd like to know how the prevent the enquiry?

 

David

TDMS log last N hours

$
0
0

Hi, i'm working on project. We are doing acquisition during very long time (can be 60 days). I need to log on harddrive the last 2 hours .

In normal condition i need to save 5 minutes every 2 hours . In case of failure i need to save the last 2 hours. (Frequency of acquisition is low 20HZ)

Is it possible to use tdms recording to achieve this . At first i'm thinking to limit sample by file, then extract data from tdms to create new one.

 

Regards

 

Using Windows API in my LabWindows CVI code

$
0
0

Hi all.

 

I would like any and all help. I am developing on LabWINDOWS 2010 and am trying to use the Windows API, particularly the multimedia APIs, in my CVI code. What I am trying to do is audio development, only it has to be in .NET or Visual C++ platform. I have developed the code and UIR, but when I build the solution it tanks on me. Of course when I use MS Visual C++ 2008 or 2010 there are no errors and I could use MS Visual C++ to develop my application, but the development of the user interface and the controls is much more straight forward with CVI and there are more controls to work with than there are with MS Visual C++. Most of the errors that I get are related to the following header files: "MMSystem.h", "devicetopology.h",  and the "endpointvolume.h". When I try and build a skelton project with no controls or indicators on the .UIR I get the errors like:

 

"devicetopology.h"(2301,20) Missing parameter type.

"devicetopology.h"(2301,40) syntax error; found '*' expecting ')'.

 "MMSystem.h"(151,1) Unrecognized declaration.

"MMSystem.h"(850,96) syntax error; found 'identifier' expecting ')'.

 

That is just a few of them, but they typically say the same thing. I have included the header files and libraries in my project, and  have made sure that they are in the CVI "sdk" directory. I have tried example code that have these header files and the result is still the same. I know that I should not have these type of issue, at least I don't think I should. Like I said I could use as much help as possible of figuring out what is the matter. Did I install the CVI improperly? Are there patches that I need to actually use windows APIs? I am attaching to this post my code and the code I downloaded from a LabWINDOWS forum. When I ran the code from the forum I got the same errors.   

 

Thanks in advance.

NI MAX entry for a Non-NI/VISA Instrument LabWindows/CVI Driver

$
0
0

Hi All,

 

Sorry in advance if this is not the right forum.

 

I have created a IVI class and specific instrument driver in LabWindows/CVI for a Video Generator. The generator is a networked, SCPI based instrument. It does not automatically appear in MAX like other NI based instruments.

 

How or what do I need to do to MAX to use the instrument? Is it as simple as adding the logical name, driver session and advanced driver entries to MAX? Do I need to create a new instrument in the HW section such that the driver session has a device to point to? I have been playing aroud with the networked instrument section in MAX and nothing seemed to make sense to me.

 

Any help would be greatly appreciated!

 

Thanks

 

Minesh


Can LabWindows CVI 6.0 still be downloaded?

$
0
0

I need version 6.0 of Lab Windows CVI for my current project and I can't find it to download it.  I was also wondering if a later version like 7.1 which I have, could be converted back to 6.0?

PCI-6503 configuration - split port C

$
0
0

Quite a few years ago I wrote a program that used a DIO-24 to read and write data from a test fixtrue with FIFOs and other junk on it. I could not find a clean way to configre the 8255  in mode 0 with ports A, B, and C_lo_nibble as inputs and C_hi_nibble as output with any of the supplied NI code.

 

At the time the solution was to use WriteToPhysicalMemory and ReadFromPhysicalMemory as below:

 

// configure 8255

    Get_DAQ_Device_Info (1, ND_BASE_ADDRESS, &dio24_base);
    dio24_portA=dio24_base;
    dio24_portB=dio24_base+1;
    dio24_portC=dio24_base+2;
    dio24_control=dio24_base+3;
    sb[0]=0x093;    WriteToPhysicalMemory ( dio24_control, sb, 1);
//

 

Over the years newer similar projects switched to PCI-6503s and all worked fine until a NI security patch removed support for WriteToPhysicalMemory and ReadFromPhysicalMemory and other direct memory access.

 

See:

<http://digital.ni.com/public.nsf/allkb/A07451671E7263598625792800677970>

 

The simple DIG_Prt_Config does not seem to support split input/output on the 8255's port C.

 

Can anyone point me in a relatively simple method of regaining split I/O on port C of the 6503?

 

Thanks in advance,

Ed Yoho

 

Read From Physical Memory

$
0
0

  Info On My Project    

   I am working on LabWindows CVI 12.0 for development . This project is a real time application for hardware, which is having Phar Lap ETS as RTOS...     My requirement is to verify the memory healthiness of the Target System...  

 

I have tried ReadFromPhysicalMemory api . But this api is now outdated in Labwindows newer versions.

 

So Is there any alternative option for reading from RAM??

 

Please help for solving this issue..

 

 

 

 

Unrecoverable Internal Error at 0023:100A41DE

$
0
0

Hello,

I have a problem when I try to create a Distribution Kit in Labwindows CVI 9 on Windows 7.

When I try to open Manage Distributions, the following message appears:

"Unrecoverable Internal Error at 0023:100A41DE. Labwindows/CVI will be aborted".

Labwindows/CVI is closed.

When I try to open "Edit..." in distributions, the same message appears.

I can't create a new distribution kit and so edit it.
Can you help me please because it's very blocking?
Thank you.

Best regards.

Karine.

Is it better to make multiple arrays of data or one big array and access it many times?

$
0
0

I am going to acquire up to 5 samples per second of 50 channels over 30 minutes then average ten of the channels and generate a report.  There are other bits of information needed to complete my task and graphs.  Would it be "faster" for the PC to have one large 4d array with all the information or faster to make several separate arrays?  Would it be more reliable to have one or many(fewer code lockups)?

Viewing all 5355 articles
Browse latest View live