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

error: Undefined symbol at Vision Example

$
0
0

Hi,

 

I have an issue to run Vision example code Load and Display.prj.

All .lib .h ..etc are included into the project (details in the attached picture) but something is still wrong.

What else is missing?

 

Thx!


Connecting a trigger pulse from PXI-6683H/PFI1 to PXIe-5172 digitizer

$
0
0

I have a PXI chassis with some digital IO boards, a PXI-6683H IRIG-B board, and a PXIe-5172 8 channel digitizer. I'm using LabWindows/CVI 2017, and trying to connect a trigger from the IRIG board to the digitizer.

 

I need to use PFI1 or PFI2 on the 6683H as a trigger input. The input pulse is a 60 ns TTL pulse every 50 ms. When the trigger occurs, I need to initiate a 60 us read on up to six channels of the 5172, at the full speed of 250 MSPS.

 

I can already read the data on the digitizer, I just don't know how to connect the trigger from the IRIG-B board to the digitizer. I've looked at a lot of NISync routines, but didn't see any examples.

 

Thanks in advance for your help. Any ideas would be appreciated.

Moving Average using condition.

$
0
0

Hi,
I am trying to calculate the moving average of 5 numbers based on a condition as attached in the word document.
I have created the Vi for the same. 
However , I am facing some logical errors in sending back the average value to the condition check via the shift register.
Can anybody please verify my program and help me solve it .

Thanking you immensely,



【후불】창원『출장샵ノ출장안마』『상담카톡 MIN0301』 애인대행 ☛ ǒlǒ_2349_4lǒ6 업소추천*출장대행*추천업소*출장업소*출장만남*출장업소*마사지

$
0
0

【후불】창원『출장샵ノ출장안마』『상담카톡  MIN0301』 애인대행 ☛  ǒlǒ_2349_4lǒ6 업소추천*출장대행*추천업소*출장업소*출장만남*출장업소*마사지

【후불】창원『출장샵ノ출장안마』『상담카톡  MIN0301』 애인대행 ☛  ǒlǒ_2349_4lǒ6 업소추천*출장대행*추천업소*출장업소*출장만남*출장업소*마사지

【후불】창원『출장샵ノ출장안마』『상담카톡  MIN0301』 애인대행 ☛  ǒlǒ_2349_4lǒ6 업소추천*출장대행*추천업소*출장업소*출장만남*출장업소*마사지

ConnectToTCPServer callback in different .c file not working.

$
0
0

Hello,

I have problem with ConnectToTCPServer in my program. Basically i have files scanner.c and scanner.h where ConnectToTCPServer is covered as below:

 

int EstablishScannerConnection(int scannerHandle, char *ip, int port)  {

int status=0;

strcpy (scannerObj[scannerHandle].ip, ip);     // kopiuj ip

scannerObj[scannerHandle].port = port;        // kopiuj port

scannerObj[scannerHandle].connect = 0;

status = ConnectToTCPServer(&scannerObj[scannerHandle].handle, scannerObj[scannerHandle].port, scannerObj[scannerHandle].ip, TCPCallback, 0, 2000);

 

if(status < 0) {

scannerObj[scannerHandle].errorMsg = GetTCPErrorString(status); scannerObj[scannerHandle].error = status;

if(scannerObj[scannerHandle].errorCallback) scannerObj[scannerHandle].errorCallback();

else

ErrorMSG( scannerHandle ); } else scannerObj[scannerHandle].connect = 1;

return scannerObj[scannerHandle].connect;

}

 

also in this file i have got TCPcallback:

 

 

int CVICALLBACK TCPCallback (unsigned handle, int event, int error,  void *callbackData) {
int status, i;

// szukaj numeru uchwytu
for (i=0; i< MAX_SCANNERS; i++) {
if(handle == scannerObj[i].handle) break;
}

switch (event) {
case TCP_DATAREADY:

scannerObj[i].dataLen = 0;
scannerObj[i].errorMsg = 0;

status = ClientTCPRead (handle, scannerObj[i].data , sizeof(scannerObj[i].data), 1000);

if ( status < 0) scannerObj[i].errorMsg = GetTCPErrorString(status);
else scannerObj[i].dataLen = strlen(scannerObj[i].data);

//scannerGetDataCB(i);
if(scannerObj[i].getDataCallback) scannerObj[i].getDataCallback(handle);
break;


case TCP_DISCONNECT:

CloseScannerConnection(i);
char outputMsg[1024]="0";
Fmt (outputMsg, "Scanner#%d\n\nIP: %d:%d:%d:%d\n\n%s\n\nDisconnected ", i, scannerObj[i].ip[0], scannerObj[i].ip[1], scannerObj[i].ip[2], scannerObj[i].ip[3]);
MessagePopup("Scanner", outputMsg);
if(scannerObj[i].closeConnCallback) scannerObj[i].closeConnCallback();
break;
}

return 0;
}

 

In main file I have:

 

#include "scanner.h"  

 

int main (int argc, char *argv[]) {

...

if(EstablishScannerConnection(SCANNER_OP130, SCANNER_OP130_IP, SCANNER_OP130_PORT))  {
   SetCtrlVal (panelHandle, PANEL_LED_SCANNER, 1);
} else {
   SetCtrlVal (panelHandle, PANEL_LED_SCANNER, 0);
}

}

 

My problem is that I have got connection with TCPServer by my TCPCallback is not working - i do not have callback TCP_DATAREADY or any different when data is ready. When I put ConnectToTCPServer as below into main it is working (I have callback for TCP_DATAREADY, but  TCP_DISCONNECT is not working):

 

int main (int argc, char *argv[]) {

...

if(ConnectToTCPServer(&scanerHandle, scannerObj[scanerHandle].port, scannerObj[scanerHandle].ip, TCPCallback, 0, 2000)==0) {
   SetCtrlVal (panelHandle, PANEL_LED_SCANNER, 1);
} else {
   SetCtrlVal (panelHandle, PANEL_LED_SCANNER, 0);
}

}

 

I am using one thread, and ProcessSystemEvents(); in that thread:

CmtScheduleThreadPoolFunction (DEFAULT_THREAD_POOL_HANDLE, ThreadMain, NULL, &threadMainHandle);

 

I will be appreciable to give me direction how to fix it.

 

 

 

 

'General Protection' fault 0x684FE961

$
0
0

Hey,

I am using cursors and displaying annotation in a graph using the following code:

 

int CVICALLBACK assgraph (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
double x,y;
float ox=0,oy=0;
char aminos[20];
if (n < 50 || p == 1) break;
GetPanelHandleFromTabPage (panelHandle, PANEL_TAB, 2, &graphTabPanelHandle);
GetGraphCursor (graphTabPanelHandle, TABPANEL_3_assgraph, 1, &x, &y);
SetCtrlVal (graphTabPanelHandle, TABPANEL_3_X, x);
SetCtrlVal (graphTabPanelHandle, TABPANEL_3_Y, y);
DeleteGraphAnnotation (graphTabPanelHandle,TABPANEL_3_assgraph, -1);
sprintf (aminos, "%c%d-%c%d",seqarray[(int)x],(int)x,seqarray[(int)y],(int)y);
if (x > n-10) ox=ox-3;
if (y > n-10) oy=oy-3;
if (x < 10) ox=ox+1;
if (y < 10) oy=oy+3;
AddGraphAnnotation(graphTabPanelHandle,TABPANEL_3_assgraph, x+ox, y+oy, aminos, 3, 3);
break;
}
return 0;
}

 

When I press the graph in different locations 10-12 times fast I get the following message:

 

FATAL RUN-TIME ERROR: "...c", line 463, col 8, thread id 0x00004670: The program has caused a 'General Protection' fault at 0x684FE961.

Strangely, the line RunUserInterface (); in int main (int argc, char *argv[])  function is highlighted - I don't understand why this function even works (is it a bug?), when I tried to put a breaking point there it did not stop. 

 

How can I prevent this error?

Thanks!

Unable to Load DLL's to RealTime Target

$
0
0

Hello,

 

I am trying to do deploy a code to a realtime Target from CVI, but getting some DLL errors. Before going to the details, here are the system details

  • Windows 7 Desktop PC (64bit OS)
  • NI Reatime 15 installed on PXI reatime target
  • LabWindows/CVI 2015 on Desktop pc
  • Microsoft visual c++ redistributable and run time components are installed on the pc

When attempting to deploy the code the following error messages were shown.

2.png

 

after clicking continue in the above dialog, following error appears.

1.png

 

The error on build output says "MSVCP100.dll (also MSVCR100.dll) cannot be copied to target because it could not be found"

 

if trying to use some daqmx functions, the following error also appears.

 

3.jpg

 

I have verified that MSVCP100.dll, MSVCR100.dll and nicaiu,dll are present in the Windows/System32 folder. 

what could be the problem? The RT system is fine though when simple codes are deployed.

 

 

Error Ordinal Not Found when launching a CVI executable

$
0
0

Hello,

 

I try to switch from WIN7 to WIN10 on a TEST computer.

The program start correctly under WIN7.

 

After a good compilation (CVI 2010) of the Main executable under WIN10  and all used dll, I have an issue when I launch the executable. (see attached pi

 

I don't understant what is expected by the executable.

Thanks for your support.

 

Fred


Parallel Port Accessing in LabWindows/CVI-2013 SP2 RT module with NI-PXIe-8135 controller

$
0
0

Hi All,

I want to access the RT-8135 controller parallel port in LabWindow/CVI directly but inp and outp functions are not accessible in RT controller. How I can access it quickly?  

Setup Information:

NI-PXIe-8135 controller is running with NI Real-Time Phar Lap ETS 13.1 OS

LabWindows/CVI 2013 with Real Time Module

 

Best Regards,

 Sohail Anjum

Assembling a packet from a mixture of chars arrays and an int using Fmt

$
0
0

Hi,

I need to assemble a packet containing 2 qualifier bytes, 2 length bytes big endian, and variable length command bytes.

I can do this in one line and this is what I have come up with:

 

int Send((unsigned char *command,int port,int length) 

unsigned char qualifiers[] = {0xAA,0x55,0}; 

unsigned char packet[0x10005];

//length is length of command array and stored as little endian on my machine.

Fmt(packet,"%s%c[b2o1]%c%s[t-w*]",qualifiers,length,length,length,command);

 

To get the 2 length bytes in place with high order byte first i'm using the byte order modifier. Since i'm printing to a string I need to use %c because I don't want the int length converted to ascii. But i need length to appear twice as an argument to fill in the 2 length bytes in my packet.

Is there anyway to get the length in the packet correctly with 1 less length argument?

 

Thank you

LINX function

$
0
0

Hi everybody,

How is the "ultrasonic HC-SR04" function of the LINX functions installed?

 

Thank you.

 

Include File in Build by Configuration

$
0
0

I have a situation where I'd like to build against two different lib files depending on which DLL will be used in the final distribution.  LabWIndows/CVI has the ability to Include/Exclude File in Build, but there doesn't appear to be a way to have this change based on the selected configuration.

 

Is there a way to do this, or could someone suggest another way that I can accomplish this?

 

Thanks,

          Al

Change Project Include Path

$
0
0

Is there a way to change where a CVI project looks for header files through the IDE? The first time I compiled the CVI project the IDE prompted me to direct it to the location of the header file. I created a branch of the project with the header file and want to redirect the path that CVI uses to find the header. The only way I have been able to get it to work is to change the original path which forces the user prompt to direction CVI to the new location.

 

The header file is not included in the project tree.

 

The old path is in CVI_includes.txt but is there a way to change that through the IDE?

Visa Time out ZVH

$
0
0

Hello,

I try to remote control R&S ZVH using Visa.

The command IDN pass ok and i have the identity of the instrument.

Aloso the command init pass ok.

The problem is with the other SCPI commands that helps to configure the instrument, I can send them but while i send "Query" there is an error time out Visa for reading.

I can increase visa time out for reading but nothing change.

Here is the link of the instrument manuel: https://cdn.rohde-schwarz.com/pws/dl_downloads/dl_common_library/dl_manuals/gb_1/z/zvh_1/ZVH-K40_RemoteControl_en_FW152.pdf

 

Could you help me .

Thanks a lot. 

Callback function for label appearance.

$
0
0

Is any option to access the label using Callback function.

 


Tag is moving when text with newline character is inserted

$
0
0

According to the help tags are associated with a given line.

 

Now I see that tags move a line down if I insert some text which contains a newline...

Let me try to illustrate the observed behavior:

 

TAG   xxxxxxxxxx1

          xxxxxxxxxx2

becomes

          xxxxxxxxxx1yyyyy

TAG   yyxxxxxxxxxx2

 

Is this the intended behavior? Somehow I find it counter-intuitive, I would prefer tags being associated with the beginning of a line, not with its end.

 

This line year is ending, may the next bring us many reasons of being grateful.

another way to display tooltips in the UI editor

$
0
0

Hello,

I accidentally discovered an interesting feature:

 

If you have a tooltip text configured the tooltip usually only shows in the UI editor once you click the 'Operate Tool' button - but it also shows while the 'Edit ...control' popup panel of one of the controls of the respective panel is displayed.

Interestingly the situation is different if the 'Control Coordinates and Dimensions' popup panel is displayed, so I don't think that this behavior is by design but still it is sort of useful Smiley Wink

Access Violation(0xC0000005) at EIP=0x773F2D6C

$
0
0

Hi, I am trying to open the remote control editor on my lab view version 13.02(32 bit) on my Microsoft surface pro 4(64bit). The problem is that whenever I create a new remote control Vi in my robot project, the remote control editor pops up but suddenly freezes when I click on it  and then my LabView crashes. This has happened continuously and I have been trying to find a solution. It then shows me this dialogue box as shown in the picture below. Any and all solutions are really appreciated. Thanks.

Access Violation(0xC0000005) at EIP=0x773F2D6C

Issue connecting to Barcode Scanner using ConnectToTCPServer

$
0
0

Hello everyone,

 

I am having a weird issue when using ConnectToTCPServer  to connect to a barcode scanner. 

 

The first attempt at connecting will always fail due to a timeout error, but then if I immediately call the function and try again, it connects without issue. I have tried increasing the timeout value to see if that was the issue, but no matter how large I make it, it will always fail on the first attempt.

 

I am using the same function to connect to a printer, and I am having no issues with that.

 

Has anyone experienced this issue before or know how I can resolve it?

 

Thanks!

 

 

 

Viewing all 5340 articles
Browse latest View live


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