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

Multiple file search crashes CVI

$
0
0

I just got a new hard drive and re-installed CVI.  I have the subscription and made sure to download all the latest updates.  My version is 15.0.1 (240) Base Package.  Anytime I try to run a Find across multiple files, I get the pop-up message "A custom control callback raised an exception."  After I hit OK and the message closes, CVI is locked up.  I have to close it and restart it.

 

I've tried several combinations of search options (case sensitive or not, whole word or not, search only C, search only H, etc.) to see if I could narrow it down to a specific set of options.  I tried this on existing projects and in a new project and it always crashed.  As far as I can tell, the only trigger for the error is searching multiple files.  I can search within a single file and it works fine.  But as soon as I try to search more than one file, it crashes.

 

I'm trying to analyze some code provided by a customer that is spread out across multiple files, and this is making it very difficult.  Any suggestions on how to fix this would be greatly appreciated.

 

Tony G.


Disable Table Cell Selection

$
0
0

Probably best to describe what I'm trying to do.

 

I want to allow the user to select a row using the row label button which highlights all the cells in that row. That works.

I ONLY want the user to be able to select a row using the row label button. No cell selection of any kind allowed.

 

I've tried making the cells VAL_INDICATOR and NO_EDIT_TEXT, but you can still mouse click on a single cell, select text (but can't edit it). 

Any way to completely disallow cell selection? The idea is:

 

The user selects a row (which represents a DAQ channel), then mouses over to select an item from a tree containing information regarding the data that will be captured using that channel, That information then populates the two columns in the table. The next row is then automatically highlighted and the user picks another item from the tree.

 

If they make a mistake, then can select the row label, thereby highlighting the row, but clicking on a cell should do nothing.

 

Any ideas how to implement? Graphic jpg clip of the uir panel under work attached for clarification.

How to make an Image global?

$
0
0

Hi

I am trying to access an Image acquired using NIIMaqdx from a different .c module within the same program. Basically, I have written the live image acquisition in a separate .c file and I need to be able to get snap shots from the main source file. I guess the question is how to make the NIIMAQ "Image" variable global.

 

Thanks in advance!

 

Nabs

DLL retaining data once passed

$
0
0

Hello,

 

     I have to make a DLL in Labwindows CVI. I want to arrange in such a  way that once I provide some information to DLL from program, for eg a variable no1 using function getno(int number) from CVI side , it gets stored in variable no in dll.The function does no=number in DLL. Now I should be able to use this value no for other functions in DLL when I call from CVI. That is I call manipulate() function after a few lines in CVI then manipulate should be able to use no I passed before. Any provision to do this?

 

With Regards

Shalini

Setup GPIB controller on a PC and GPIB listner on PXI

$
0
0

Hello everybody, 

I am trying to setup a GPIB communication between a PC to a PXI controller.

I have the following setup:

Chassis PXIe-1078

Controller PXIe-8821

GPIB interface module - PXI-GPIB

GPIB-USB-HS+ between my PC and the PXI-GPIB interface module.

 

What should be the sw configuration on PC side, and how should I configure my PXI side in order to exchange information. 

Current setup of NI_MAX attached. 

For now, NI-MAX identifies the GPIB-USB adapter, on both sides. 

 

Thanks in advance for the support! Smiley Happy

Synchronizing cameras with encoder and I/O expansion board

$
0
0

Hello, 

 

I am trying to acquire simultaneous images from two identical camera link line scan JAI cameras via two NI 1433 boards. Both the cameras are getting their trigger signals from a quadrature wheel encoder.

 

I am noticing the frame read from the two cameras are not in sync with one camera's frame rate always higher than the other.

 

Camera 1's frame-grabber board is also getting the encoder's quadrature input via an I/O expansion board. Camera 2, however, does not have an I/O expansion board associated with it. I am keeping track of the frame count from each camera using the pulses out of the smb pin on the frame grabber.

 

A few of questions on this:

1) Is this a right approach for synchronizing multiple cameras?

2) Do I need another I/O expansion board for the second camera?

3) Is there a way a single I/O expansion board can connect to multiple frame grabbers?

 

thanks!

 

 

Tamper Evident Data Recording

$
0
0

 

AMS2750E covers pyrometric requirements for thermal processing equipment used for heat treatment. It covers temperature sensors, instrumentation, thermal processing equipment, system accuracy tests, and temperature uniformity surveys. 

 

Paragraph 3.2.7.1.1 of  AMS2750E states “The system must create electronic records that cannot be altered without detection”.

 

Anybody got any ideas how to do this with LabWindows?

CVI Image_control

$
0
0

I want to get the roi postion of the imagecontrol


Threading question

$
0
0

Hi

I am new to threading.

I am trying to reuse functions that store data in variables and structures etc.  Rather than doubling up on everything and using if else etc. I was thinking about using arrays and 2D arrays.

There would be the main thread which can call 2 other threads, each thread more or less a duplicate except for data storage and control etc.

 

Is the 2d array idea viable?

 

 

help message like comic

$
0
0

hi everyone,

i want ask you something.

I want show an help message when the cursor pass on a label like a comics.

 

is it possible?

 

thanks in advance

Create a function code for comparing data frame and response frame in CVI

$
0
0

Hi,

I'm new in CVI  i want to create a function that can compare between data frame and response frame and this my try any help please 

thank you 

ActiveX Excel - Add A New Worksheet To An Open Workbook

$
0
0

Looking for example code to add a new worksheet to an open workbook in Excel 2013. Using CVI 2015.

 

I programatically got the Excel app opened, a workbook file loaded with multiple sheets, I'm reading from those existing sheets and indexing them for access, etc., I just can't figure out how to add a new sheet and then name it so I can write data to it.

 

Sadly, none of the CVI examples have that particular functionality in the code that I can find.

 

The help info for the exel2000.fp for the Excel_NewWorksheet( ) function states:

 

NOTE: Due to an unusual behavior in Microsoft Excel the object handle obtained from this function actually refers to the workbook object that contains the worksheet. Passing this workbook object handle to worksheet functions will result in a "No such interface supported." error (-2147467262). You must index into the worksheets collection of the workbook object to obtain an object handle for the worksheet. Use this function to create a new _Worksheet object, and obtain a handle to the object.

 

As helpful as that is, I can't get it to work. Can someone please provide a solution?

 

TIAA!

 

 

 

how to connected to the Internet and change system date/time?

$
0
0

Hello
I want to know if my computer is currently connected to the Internet.
So I'm looking for several related functions. But I could not find it.

 

And I want to change the date/time on my computer. I have tried the following functions:

SetSystemDate();
SetSystemTime();

I changed it on my development PC. However, after making it as a distribution, it was not changed on the Panel PC.
The OS of the Panel PC is Windows 7 Embeded.
I want to know if there is another way to change the date and time.

 

Thank you.

create a function in CVI

$
0
0

 Hi,

i need  to create a function that can be called several times in my code to compare different sent and received frames, and pass the sent and received bytes by reference or value (array of bytes) to the function.
please i'm new in CVI  i need some  examples of  functions codes  .
some examples of the frames sended and received.
thank you

DateStr outputting incorrect value?

$
0
0

I got a report of an anomaly on a production application.  It occurred yesterday.  A few UUTs apparently "skipped ahead" by several hours of testing inexplicably.  My software records unit test results every 4 seconds, so I have pretty good visibility of such errors.  Here is a screenshot:

 

2017-05-05 10_31_14-_E__time warp.txt - Notepad++ [Administrator].png

 

Notice columns 2-3.  These are produced by calls to DateStr() and TimeStr().  Several columns over, you'll see a test time string also in HH:MMSmiley FrustratedS format.  This value is calculated by calling GetCurrentDateTime().

 

You'll notice that between the Date/TimeStr columns and my elapsed column, they agree that some sort of time warp happened, to the tune of 27 hours!

 

I checked the PC's real time clock.  It was correct to within a few minutes, correct date, correct AM/PM.  

 

This codebase has been released and stable for a few years now, so I wouldn't expect issues around the use of this part of my logging mechanism.  This is the first time I've ever witnessed an error quite like this where I couldn't depend on CVI's date/time functions.

 

Should I be worried?


USB/GPIB to Ethernet Switch Interface?

$
0
0

I am fabricating a test setup with LabWindows.  I want to take a bunch of instruments, such as: multimeters, oscope, power supplies, mcu can bus board etc. and merge them into one big interface that outputs ethernet to a computer with LabWindows.  Then, I would like to make drivers (or something else?) that can ping each instrument and read/write to it accordingly in the test procedure I develop.  The idea was to clean things up and provide more bandwidth over the ethernet, opposed to using a million usb's for everything.  I don't know if the ethernet interface idea would be the best option, but it was a thought. 

 

I was wondering if anyone else has had any experience with this sort of thing?  If so, what kind of instrumentation was used? And, what kind of general things did you have to accommodate for when making your LabWindows application (drivers, ini files, configuration stuff etc.)?

 

Thanks,

Alex

"Synchronous" Multimeter Measurements

$
0
0

As the title may imply, I would like to use a digital multimeter to measure several lines at once for my LabWindows application.  I want to measure 8 or so signals at once and run threads in LabWindows that monitors each signal.  I have come across some products that basically require one multimeter and a switch interface that allows for several lines to be connected to the multimeter.  Then, the switch interface will multiplex to each line according.  

 

I am curious if anyone has performed a similar task in their LabWindows career?  Is there anything that can perform this multiplex switching, but at such a rate that you could measure each line in an "almost synchronously", asynchronously fashion, and still have LabWindows process the measurements individually? If so, what are some of the instruments you used for this kind of task?

 

Thanks,

Alex

Invoke Node Error

$
0
0

Good Morning, 

 

I created a project with multiple VIs, my main Idea is running the whole project respectively through Next Button. 

 

my project contain from the first Logo page >> Login Details >> Info Details >> Real Time Data Details and >> Adding new user. 

 

through the Next Button, it work properly. I created a case structure and inside the true case ( i opened a VI reference using vi path, connecting to an Invoke node (FP-open) >> Invoke node (Run VI) then I close the VI reference and connected it to the error handling. in the False case i created something related to the case itself. 

 

after that I created a Previous Button (Error Started here ) in the button i build same case structure i used to the Next Button but in previous order. 

 

when I'm running my VI and move forward from Logo to other VIs it work properly, but when I start going backwards through Previous Button- I'm having an error called (ERROR 1000) - Not in a State Compatible with this Operation.

 

I read through the instruction, but I guess I'm having a blind spot that I can't figure it out yet. 

 

 

Also how can i create a global variable to stop button, now if you pressed the stop button it will shut down the logo vi, i want to make it close the whole project. 

 

so if you can suggest a solution to me will be great. 

 

 

 

 

 

Cheers,

Invoke Node Error

How To Move A Sheet In Excel

$
0
0

I created a new sheet in Excel. The Excel app does not allow the creation of a new sheet after the last sheet, you have to create a new sheet (the default is 'next to the last') and move it into the last sheet position, which is what I'm trying to do.

 

The code below ads the new sheet and works fine until the last function call, which returns an HRESULT of -2147467262. Can someone have a look and see what's wrong here?

 

		// Determine the number of sheets in the workbook
		ret = Excel_GetProperty (ExcelSheetsHandle, NULL, Excel_SheetsCount, CAVT_LONG, &sheetCount);
// Make a handle for the last sheet in the workbook ret = Excel_SheetsItem (ExcelSheetsHandle, NULL, CA_VariantInt(sheetCount), &ExcelSheetHandle);
// The Move function wants a VARIANT type not an object, so make a variant from the object handle of the last sheet in the workbook. ret = CA_VariantSetObjHandle (&LastSheetV, ExcelSheetHandle, CAVT_DISPATCH);
// Add the new sheet ret = Excel_SheetsAdd (ExcelSheetsHandle, NULL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, &ExcelSheetHandle); // Now move it using the LastSheetV variant in the After position of the SheetsMove function call. ret = Excel_SheetsMove (ExcelSheetHandle, NULL, CA_DEFAULT_VAL, LastSheetV);
// >> ERROR << Halt and catch fire.

Anyone see what's wrong? Still learning ActiveX protocol.

 

And BTW, where does one find the HRESULT error codes?

 

Viewing all 5349 articles
Browse latest View live


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