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

Router switch

$
0
0

Cisco Catalyst WS-C3650-48FS-L is the next generation stackable enterprise-level switch that integrated with 48 POE+ Ethernet ports and 4 x 1G SFP uplink ports in LAN base feature set.

Product Code WS-C3650-48FS-L 
Enclosure TypeRack-mountable - 1U
Feature SetLAN base
Uplink Interfaces4 x 1G SFP
Ports48 x 10/100/1000 (POE+)
Available PoE Power775W
Maximum stacking number9
Stack bandwidth160 Gbps
Forwarding Performance77.37Mpps
Switching Capacity176 Gbps
RAM4 G
Flash Memory2 G
Dimensions44.5 x 48.6 x 4.4 cm
Package Weight17.49 Kg

Router switch

$
0
0

The Cisco Catalyst 3650 Series Switch, with Cisco StackWise-160 Technology, can stack 9 switches and support up to 160 Gpbs stack bandwidth. The WS-C3650-24TS-L integrates with 24 Ethernet ports and 4 x 1G SFP uplink ports in IP Base Feature set.

Link between documentation tags and FPs

$
0
0

Hello all,

When crating a function panel, I remember that there's some way to partially populate it automatically based on the documentation tags (HIFN, HIPAR...) but I can't seem to find the way to do it. Or is it the other way around, creating function prototypes and documentation tags from a newly created FP ?!?

Thanks

Can't call function from dll or lib file

$
0
0

Hello,

I am trying to call c++ function SendCANMessage from .lib file into my CVI project by following steps from this link:

Link (Part: 2nd way to use a DLL).

I have included 2 .h and 2 .c++ files into DLL project in Visual Studio, added __declspec(dllexport) in front of functions that I want to use in CVI

and built project successfully. Then I have added .lib and .dll files that I got from this build into my CVI project. and tried to call one of functions from .c file (from CVI). When i build project, it says:

Capture.JPG

 

Function declaration in .h file is: CAN_ERROR SendCANMessage(CAN_msg *pMsg, DWORD dwTimeout); and I have 

defined CAN_ERROR, CAN_msg and DWORD earlier in my .c file.

I found that -10 means this: "Identifier not defined globally in the module.", but i don't know what to do about it.

I think that CVI don't see any of functions in .lib and .dll files and i need help how to include it properly, because I just added

these files by Edit->Add Files To Project and added files. I provided archive with all files that are included in CVI project.

Best regards,

Igor

 

problem with ATTR_CTRL_MODE - don't work

$
0
0

Hello, I try to use the attribute ATTR_CTRL_MODE but each time, its has no effect.
In my GUI, I have 1 numeric and 1 String.
On a checkbox click I want to change the mode: Indicator -> Hot.

 

code sample :

void xxxxxxx

{

  GetCtrlVal(PanelHandle2, PANEL_2_CHECKBOX,&status);      
   if(status==0)
    {

    SetCtrlAttribute(PanelHandle2, PANEL_2_STRING,ATTR_CTRL_MODE ,VAL_HOT);
    SetCtrlAttribute(PanelHandle2, PANEL_2_NUMERIC_4,ATTR_CTRL_MODE ,VAL_HOT);

 

    }

 

else {

       SetCtrlAttribute(PanelHandle2, PANEL_2_STRING,ATTR_CTRL_MODE ,VAL_INDICATOR);

      SetCtrlAttribute(PanelHandle2, PANEL_2_NUMERIC,ATTR_CTRL_MODE ,VAL_INDICATOR);

    }

 

 

}

Is this correct? - In my case, it has no effect.

-----------------------

Thank you for your answers.

GetMonitorAttribute return error value

Can the PCI-8532 use at Labwindows/CVI programming environment

$
0
0

Hi

I am a new use for NI PCI-8532 card, I installed the NI industrial communication for DeviceNet, bur I can't find any Labwindows/CVI sample code for it. So I am not sure the card can programmed by the CVI and where can find some sample code.

Finally I want to know how to config the PCI-8532 in NI-MAX, like set the interface name/baud rate and so on....

Export Variable or Struct from CVI DLL to TestStand

$
0
0

I am using LabWindows/CVI 2012 and TestStand 2012.  Is there a way to export a variable or structure using DLLEXPORT (or some other method) and access it from TestStand the way you access exported functions?  Thank you.

 


Runtime Crash

$
0
0

Hi,

I have a serious runtime error that crash the application. It's a random error.

I check windows (win7) events and I have this situtation:

     Faulting application name: appS.EXE, version: 1.0.0.0, time stamp: 0x58bc94e8
    Faulting module name: appS.EXE, version: 1.0.0.0, time stamp: 0x58bc94e8
    Exception code: 0xc0000005
    Fault offset: 0x00105159 
    Faulting process id: 0x%9
    Faulting application start time: 0x%10
Faulting application path: %11
Faulting module path: %12
Report Id: %13

 

 

Runtime Crash

$
0
0

Hi,

I have a serious runtime error and my application crash in random mode. I check windows (WIN7 is SO) events and I see this situation:

Faulting application name: appS.EXE, version: 1.0.0.0, time stamp: 0x58bc94e8
Faulting module name: appS.EXE, version: 1.0.0.0, time stamp: 0x58bc94e8
Exception code: 0xc0000005
Fault offset: 0x00105159
Faulting process id: 0x%9
Faulting application start time: 0x%10
Faulting application path: %11
Faulting module path: %12
Report Id: %13

This application run in other system and there isn't runtime problems. 

Can you help me?

Why do two windows open?

$
0
0

Hello,


I apologize in advance for my English.

Do not you know why I'm going to open two windows when I run the program and select a language, and not just one one?

I do not know what to erase in order to open only one window from the correct language.

That's how I open up practically twice the program in classical language and the other in the selected language.
Progam is then loaded progressBar for a long time.

Thank you very much for your help.

Have a nice day
Majkl
 
 
 

Fault Tolerant Programming in RealTime

$
0
0

The Windows version of my DAQ program is rich with Try/Catch statements to avoid crashing on errors that are not worth crashing over. 

In C, however, I am struggling with handling faults.  I'll give one example from last night.  I wish I would have taken a picture because I don't know exactly where in the code it happened.

 

It was something like this:

token = strtok(buffer, "\t");
if (strstr(token, "ENGINE CONTROL"))
{
    token = strtok(NULL, "\t");
    CLControls[0]->FinalSetpoint = atoi(token);  			
    token = strtok(NULL, "\t");
    CLControls[1]->FinalSetpoint = atoi(token);  
    token = strtok(NULL, "\t");
    CLControls[0]->RampLength = CLControls[1]->RampLength = atoi(token);
    CLControls[0]->ThisSetpoint = EngineSpeed; 					
    CLControls[0]->LastSetpoint = EngineSpeed; //CLControls[1]->LastSetpoint = CLControls[1]->ThisSetpoint;
    CLControls[1]->ThisSetpoint = DL5.Torque; 					 
    CLControls[1]->cumError = 0;
    CLControls[0]->Active = CLControls[1]->Active = 1;
}

token was null which means that the message didn't get through for some reason.  While running in debugging mode (which we always do), it froze execution and threw a NULL argument to library function error. 

 

Freezing the program is not acceptable because we are running engines and we have safeties and coolant control systems tied to the software.

 

The obvious answer is that I need to study up on error handling in C, however, It seems as though when I am in debug mode, even if I try to handle an error it will always throw a message box and break out of execution.

 

I have three questions.

1.What is the best reference for error handling in Labwindows/CVI for real time applications?

2. Can I run through the development environment and still be fault tolerant?

3. Is it possible to set up the debugger to not break/crash on some kinds of errors?

 

Thank you!

 

Numbers from Array to Panel

$
0
0

Hello,

I'm new in labWindows. I don't know how to show every values from array in Panel. I always get only one number. Im sorry for my ugly code. Please, help me. Smiley Happy

 

int CVICALLBACK binary (int panel, int control, int event,
						void *callbackData, int eventData1, int eventData2)
{ switch (event)
	{
		case EVENT_COMMIT:
			GetCtrlVal(panelHandle,PANEL_wynik,tablica3);
			sscanf(tablica3, "%d", &t);
			int i=0;
			while(t) 
			{
				tabInt[i++]=t%2;
				t=t/2;
			}
			for(int j=i-1; j>=0; j--)
			{
				g =	tabInt[j];
				sprintf(tablica3, "%ld", g);
			}
			SetCtrlVal(panelHandle, PANEL_wynik, tablica3);
			break;
	}
	return 0;
}

 

Can't compiling when using HW_PROFILE_INFO of GetCurrentHwProfileA SDK function

$
0
0

Hello,

I've add a SDK function in an old program under CVI 9.0 and Windows 7.

This function is GetCurrentHwProfileA (or without A at the end of the name).

I've write Microsoft sample in a file to my project.

 

HW_PROFILE_INFO profil;    
 GetCurrentHwProfile(&profil);
 

The problem is that HW_PROFILE_INFO structure is not found by the compiler.

I got error message: "Undeclared identifier 'HW_PROFILE_INFO' even if I've add winbase.h after Windows.h header. winbase.h already existes in the "\National Instruments\CVI90\sdk\include\" folder.

Util.c - 4 errors
 126, 1   Undeclared identifier 'HW_PROFILE_INFO'.
 126, 17   syntax error; found 'identifier' expecting ';'.
 126, 17   Undeclared identifier 'profil'.
 127, 5   Missing prototype.

 

I tried to add recommanded macro /D_WIN32_WINNT=_WIN32_WINNT_WIN7, but without any sucess.

Is there somebody to help me and tell me what to do to solve this issue?

Best regards.

Didier

Monitor new file on folder

$
0
0

Hello,

 

Here is my problem : I try to monitor a folder and when a new file is created, i want to know it.

 

I ckecked so many discussion and I saw "FileSystemWatcher" which seems to work with Labview.

 

So, is it possible to do the same thing with Labwindows/CVI 2017 ?

 

Thank you in advance.


Macro redefinition compile time error

$
0
0

#define FOO       1   

#define FOO       0.9

 

I had the above definitions in my code and cvi didn't complain while compiling, I thought it would, Can someone explain?

 

Thank you

 

      

CVI 2013 error: Undefined symbol '_imaqXXX' referenced in "c:\...obj" only in release build

$
0
0

Hi all,

I'm having trouble building my project as a release version in CVI 2013.

The program builds and runs in debug mode, but when I try to build in release mode (32-bit) I get a lot of link errors, all related to _imaqXxxxx functions.

In CVI, I can open the function panel of every imaqXxx function I am using. All functions are part of the NI vision library.

I can build a Static Library without the errors, only the release build doens't seem to work.

I tried rebuilding a lot of time after deleting the old project.lib files as well as deleting the cvibuild folder.

The exact build errors are attached.

 

So my questions are:

-What's different between Debug and Release (concerning using the NI vision library)? Since everything seems to be fine in Debug mode, I assume I have all the necessary files available, but apparently not in the right place/way for a release version(?)

-What is missing in my project? How can I fix this?

 

Thank you in advance.

Best regards,

Wama3399

 

The graph control right-hand Y-axis tick marks look like negative signs

$
0
0

Hello,    

The graph control right-hand Y-axis tick marks just to the left of the numeric values that make up the scale look like negative signs.  This causes significant confusion.  Just for this reason, I am not able to use the graph control of the LabWindows CVI !

As far as I know, similar questions appeared here in the past but i could not see proper solutions so far in the forums. I believe it must be very easy to fix this for the programmers of the NI , but no solution so far

I am currently using LabWindows 2017 and the same problem still continues...

Is there a solution to this terrible issue??

Running a 32-bit LabWindows CVI program on a 64-bit Windows 10 environment

$
0
0

Hello,

 

We have been using a program written on 2010 LabWindows CVI and Windows XP environment. We now getting new computer with Windows 10.

Can we use the same program?

I tried to generate a 64-bit version and build a new release. But I get an error message

saying

"dataskt.h" The LabWindows/CVI DataSocket library is not supported on X64

 

Thanks

 

Bobby

Can LabWindows CVI 2010 be installed on Windows 10 Environment?

$
0
0

Hello,

 

Is it possible to install LabWindows/CVI 2010 on a computer with Windows 10 environment.

I have a program written on WINDOWS XP and need to run it on a Windows 10 computer.

Thanks

 

Bobby

Viewing all 5342 articles
Browse latest View live


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